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

eeshow/kicad/sch.h, sch-parse.c: also retrieve sheet width and height

This commit is contained in:
Werner Almesberger 2016-08-22 04:01:19 -03:00
parent 0caae88fa9
commit 2515c3b964
2 changed files with 7 additions and 0 deletions

View File

@ -310,6 +310,8 @@ static struct sheet *new_sheet(struct sch_ctx *ctx)
sheet->next_obj = &sheet->objs;
sheet->next = NULL;
sheet->w = sheet->h = 0;
sheet->has_children = 0;
sheet->oid = NULL;
@ -490,6 +492,9 @@ static bool parse_line(const struct file *file, void *user, const char *line)
}
break;
case sch_descr:
if (sscanf(line, "$Descr %*s %d %d",
&ctx->curr_sheet->w, &ctx->curr_sheet->h) == 2)
return 1;
if (sscanf(line, "Title \"%m[^\"]\"", &s) == 1) {
ctx->curr_sheet->title = s;
return 1;

View File

@ -103,6 +103,8 @@ struct sheet {
struct sch_obj **next_obj;
struct sheet *next;
int w, h;
bool has_children; /* aka sub-sheets */
/* caching */