mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-12-23 12:54:35 +02:00
eeshow/sch-parse.c (parse_line): use sub-sheet name as title, instead of title
In Anelok, all sheets have the same title, but different sub-sheet names. So this is probably a more reliable heuristic.
This commit is contained in:
parent
7cc2142e83
commit
82635e8a41
@ -304,7 +304,7 @@ static struct sheet *new_sheet(struct sch_ctx *ctx)
|
||||
static bool parse_line(const struct file *file, void *user, const char *line);
|
||||
|
||||
|
||||
static const struct sheet *recurse_sheet(struct sch_ctx *ctx,
|
||||
static struct sheet *recurse_sheet(struct sch_ctx *ctx,
|
||||
const struct file *related)
|
||||
{
|
||||
const char *name = ctx->obj.u.sheet.file;
|
||||
@ -509,11 +509,16 @@ static bool parse_line(const struct file *file, void *user, const char *line)
|
||||
|
||||
sheet_obj = submit_obj(ctx, sch_obj_sheet);
|
||||
if (ctx->recurse) {
|
||||
const struct sheet *sheet;
|
||||
struct sheet *sheet;
|
||||
|
||||
sheet = recurse_sheet(ctx, file);
|
||||
if (!sheet)
|
||||
return 0;
|
||||
if (sheet_obj->u.sheet.name) {
|
||||
free((char *) sheet->title);
|
||||
sheet->title =
|
||||
stralloc(sheet_obj->u.sheet.name);
|
||||
}
|
||||
sheet_obj->u.sheet.sheet = sheet;
|
||||
} else {
|
||||
sheet_obj->u.sheet.sheet = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user