1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-07-07 22:30:44 +03:00

sch2fig/sch.c (draw_text, sch_parse): support text left, down; ignore busses

This commit is contained in:
Werner Almesberger 2016-07-26 18:36:46 -03:00
parent f9140bc53f
commit 8db4055882

View File

@ -78,6 +78,13 @@ static void draw_text(int x, int y, const char *s, int dir, int dim,
case 1: /* up */
text_rot(&txt, 90);
break;
case 2: /* left */
txt.hor = text_max;
break;
case 3: /* down */
text_rot(&txt, 90);
txt.hor = text_max;
break;
default:
assert(2 + 2 == 5);
}
@ -293,6 +300,18 @@ bool sch_parse(struct sch_ctx *ctx, const char *line)
ctx->text = fig_label;
return 1;
}
if (sscanf(line, "Entry Wire Line%n", &n) == 0 && n) {
ctx->state = sch_text;
unsupported("Entry Wire Line");
ctx->text = NULL;
return 1;
}
if (sscanf(line, "Entry Bus Bus%n", &n) == 0 && n) {
ctx->state = sch_text;
unsupported("Entry Bus Bus");
ctx->text = NULL;
return 1;
}
/* Connection */