1
0
mirror of git://projects.qi-hardware.com/fped.git synced 2024-11-26 04:49:41 +02:00

Bug-fixing ...

- obj.c: embarrasingly, the default offset wasn't a distance
- connect_obj: didn't update the object's frame pointer, deeply confusing
  deletion



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5524 99fdad57-331a-0410-800a-d7fa5415bdb3
This commit is contained in:
werner 2009-08-22 14:29:48 +00:00
parent 60147b98e2
commit 18be341c2d
2 changed files with 3 additions and 6 deletions

View File

@ -101,6 +101,7 @@ void connect_obj(struct frame *frame, struct obj *obj)
{ {
struct obj **walk; struct obj **walk;
obj->frame = frame;
for (walk = &frame->objs; *walk; walk = &(*walk)->next); for (walk = &frame->objs; *walk; walk = &(*walk)->next);
*walk = obj; *walk = obj;
} }

8
obj.c
View File

@ -25,6 +25,7 @@
#define DEFAULT_SILK_WIDTH make_mil(15) /* @@@ */ #define DEFAULT_SILK_WIDTH make_mil(15) /* @@@ */
#define DEFAULT_OFFSET make_mil(0) /* @@@ */
#define MAX_ITERATIONS 1000 /* abort "loop"s at this limit */ #define MAX_ITERATIONS 1000 /* abort "loop"s at this limit */
@ -94,11 +95,6 @@ error:
static int generate_objs(struct frame *frame, struct coord base, int active) static int generate_objs(struct frame *frame, struct coord base, int active)
{ {
static const struct num zero_offset = {
.type = nt_mm,
.exponent = 0,
.n = 0,
};
struct obj *obj; struct obj *obj;
char *name; char *name;
int ok; int ok;
@ -157,7 +153,7 @@ static int generate_objs(struct frame *frame, struct coord base, int active)
case ot_meas: case ot_meas:
assert(frame == root_frame); assert(frame == root_frame);
offset = eval_unit_default(obj->u.meas.offset, frame, offset = eval_unit_default(obj->u.meas.offset, frame,
zero_offset); DEFAULT_OFFSET);
if (is_undef(offset)) if (is_undef(offset))
goto error; goto error;
inst_meas_hint(obj, offset.n); inst_meas_hint(obj, offset.n);