1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-11-18 00:00:38 +02:00

eeshow/sch.h (sch_obj_glabel): indicate global labels (in data) more clearly

This commit is contained in:
Werner Almesberger 2016-08-10 20:49:01 -03:00
parent d63b534fb3
commit 08de2f7b4b
4 changed files with 6 additions and 1 deletions

View File

@ -224,6 +224,7 @@ static bool obj_eq(const struct sch_obj *a, const struct sch_obj *b)
return 1; return 1;
case sch_obj_noconn: case sch_obj_noconn:
return 1; return 1;
case sch_obj_glabel:
case sch_obj_text: case sch_obj_text:
if (a->u.text.fn != b->u.text.fn) if (a->u.text.fn != b->u.text.fn)
return 0; return 0;

View File

@ -549,7 +549,8 @@ static bool parse_line(const struct file *file, void *user, const char *line)
} }
*to = 0; *to = 0;
obj->u.text.s = s; obj->u.text.s = s;
submit_obj(ctx, sch_obj_text); submit_obj(ctx, obj->u.text.fn == dwg_glabel ?
sch_obj_glabel : sch_obj_text);
} }
return 1; return 1;
case sch_wire: case sch_wire:
@ -627,6 +628,7 @@ static void free_sheet(struct sheet *sch)
for (obj = sch->objs; obj; obj = next) { for (obj = sch->objs; obj; obj = next) {
next = obj->next; next = obj->next;
switch (obj->type) { switch (obj->type) {
case sch_obj_glabel:
case sch_obj_text: case sch_obj_text:
free((char *) obj->u.text.s); free((char *) obj->u.text.s);
break; break;

View File

@ -148,6 +148,7 @@ void sch_render(const struct sheet *sheet)
case sch_obj_noconn: case sch_obj_noconn:
dwg_noconn(obj->x, obj->y); dwg_noconn(obj->x, obj->y);
break; break;
case sch_obj_glabel:
case sch_obj_text: case sch_obj_text:
{ {
const struct sch_text *text = &obj->u.text; const struct sch_text *text = &obj->u.text;

View File

@ -40,6 +40,7 @@ struct sch_obj {
sch_obj_junction, sch_obj_junction,
sch_obj_noconn, sch_obj_noconn,
sch_obj_text, sch_obj_text,
sch_obj_glabel,
sch_obj_comp, sch_obj_comp,
sch_obj_sheet, sch_obj_sheet,
} type; } type;