1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-06-29 00:03:52 +03:00

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.
This commit is contained in:
Werner Almesberger 2012-04-17 21:26:21 -03:00
parent 54ecc10cbb
commit 1d47668b98

View File

@ -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))