mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-12-22 17:36:29 +02:00
eeshow/kicad/sch.h, sch-parse.c: also retrieve sheet width and height
This commit is contained in:
parent
0caae88fa9
commit
2515c3b964
@ -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;
|
||||
|
@ -103,6 +103,8 @@ struct sheet {
|
||||
struct sch_obj **next_obj;
|
||||
struct sheet *next;
|
||||
|
||||
int w, h;
|
||||
|
||||
bool has_children; /* aka sub-sheets */
|
||||
|
||||
/* caching */
|
||||
|
Loading…
Reference in New Issue
Block a user