mirror of
git://projects.qi-hardware.com/fped.git
synced 2024-11-16 20:20:38 +02: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:
parent
7af014b516
commit
6f00ab6ac2
2
fpd.y
2
fpd.y
@ -207,7 +207,7 @@ part_name:
|
|||||||
YYABORT;
|
YYABORT;
|
||||||
}
|
}
|
||||||
for (p = $2; *p; *p++)
|
for (p = $2; *p; *p++)
|
||||||
if (!is_id_char(*p, 0)) {
|
if (*p < 32 || *p > 126) {
|
||||||
yyerrorf("invalid part name");
|
yyerrorf("invalid part name");
|
||||||
YYABORT;
|
YYABORT;
|
||||||
}
|
}
|
||||||
|
@ -1120,9 +1120,11 @@ static int validate_part_name(const char *s, void *ctx)
|
|||||||
{
|
{
|
||||||
if (!*s)
|
if (!*s)
|
||||||
return 0;
|
return 0;
|
||||||
while (*s)
|
while (*s) {
|
||||||
if (!is_id_char(*s++, 0))
|
if (*s < 32 || *s > 126)
|
||||||
return 0;
|
return 0;
|
||||||
|
s++;
|
||||||
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user