1
0
mirror of git://projects.qi-hardware.com/fped.git synced 2024-09-28 23:51:59 +03:00

- KiCad is very liberal when it comes to valid part names, and so are we now

(i.e., we now accept anything but control and non-ASCII characters)



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5446 99fdad57-331a-0410-800a-d7fa5415bdb3
This commit is contained in:
werner 2009-08-14 22:12:16 +00:00
parent 7af014b516
commit 6f00ab6ac2
2 changed files with 5 additions and 3 deletions

2
fpd.y
View File

@ -207,7 +207,7 @@ part_name:
YYABORT;
}
for (p = $2; *p; *p++)
if (!is_id_char(*p, 0)) {
if (*p < 32 || *p > 126) {
yyerrorf("invalid part name");
YYABORT;
}

View File

@ -1120,9 +1120,11 @@ static int validate_part_name(const char *s, void *ctx)
{
if (!*s)
return 0;
while (*s)
if (!is_id_char(*s++, 0))
while (*s) {
if (*s < 32 || *s > 126)
return 0;
s++;
}
return 1;
}