mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-11-23 02:22:49 +02: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:
parent
a1d5e2dcef
commit
024ffd4e47
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user