1
0
mirror of git://projects.qi-hardware.com/fped.git synced 2024-11-22 07:30:16 +02:00

fped: don't output pad names consisting only of spaces

Such names have an invalid size and may trip the Postscript/PDF interpreter.

- postscript.c (ps_pad_name): don't output names consisting only of spaces



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@6002 99fdad57-331a-0410-800a-d7fa5415bdb3
This commit is contained in:
werner 2011-03-23 06:45:04 +00:00
parent 1409cfafd8
commit e1f4e03a28

View File

@ -192,9 +192,11 @@ static void ps_pad_name(FILE *file, const struct inst *inst)
{ {
struct coord a = inst->base; struct coord a = inst->base;
struct coord b = inst->u.pad.other; struct coord b = inst->u.pad.other;
const char *s;
unit_type h, w; unit_type h, w;
if (!*inst->u.pad.name) for (s = inst->u.pad.name; *s == ' '; s++);
if (!*s)
return; return;
h = a.y-b.y; h = a.y-b.y;
w = a.x-b.x; w = a.x-b.x;