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

genex/libs.c: skip ~ at the beginning of a component name

The ~ means that the component name is invisible.
This commit is contained in:
Werner Almesberger 2012-04-17 09:53:02 -03:00
parent a1d5e2dcef
commit 024ffd4e47

View File

@ -85,7 +85,7 @@ void add_lib(const char *path)
struct lib *lib;
struct entry *e = NULL;
char buf[1024]; /* @@@ */
char *spc;
char *name, *spc;
const char *s;
file = fopen(path, "r");
@ -111,7 +111,10 @@ void add_lib(const char *path)
path);
exit(1);
}
spc = strchr(buf+4, ' ');
name = buf+4;
if (*name == '~')
name++;
spc = strchr(name, ' ');
if (!spc) {
fprintf(stderr, "invalid DEF line in %s\n", path);
exit(1);
@ -119,7 +122,7 @@ void add_lib(const char *path)
*spc = 0;
e = alloc_type(struct entry);
e->names = NULL;
add_name(e, buf+4);
add_name(e, name);
e->units = atoi(s);
if (!e->units) {
fprintf(stderr, "invalid number of units in %s\n",