From 1d47668b98831de49f33ebcb38ba503d72b340be Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Tue, 17 Apr 2012 21:26:21 -0300 Subject: [PATCH] genex/comp.c (read_desc): component missing in tree yields a warning, not error We basically treat descriptions now more like libraries: they're allowed to contain more things than what we list in the tree. --- genex/comp.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/genex/comp.c b/genex/comp.c index dcc709c..4824823 100644 --- a/genex/comp.c +++ b/genex/comp.c @@ -143,7 +143,7 @@ void read_desc(FILE *file) char buf[1100]; /* more than enough */ struct node *node; char *p, *end; - int lineno = 0; + int skip = 0, lineno = 0; while (fgets(buf, sizeof(buf), file)) { lineno++; @@ -170,11 +170,15 @@ void read_desc(FILE *file) fprintf(stderr, "component \"%s\" not found in line %d\n", buf, lineno); - exit(1); + skip = 1; + continue; } for (anchor = &node->comment; *anchor; anchor = &(*anchor)->next); + skip = 0; } + if (skip) + continue; /* remove leading whitespace */ while (*p && isspace(*p))