delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mail set sender to geda-user-bounces using -f |
Date: | Sat, 17 Mar 2012 13:16:20 -0400 |
Message-Id: | <201203171716.q2HHGKBO032473@envy.delorie.com> |
From: | DJ Delorie <dj AT delorie DOT com> |
To: | geda-user AT delorie DOT com |
In-reply-to: | |
<CAOxVtSQ1VSvMxXePObD3G++EX0NsBC=LxjV+LjfX5D9o3tcv=w AT mail DOT gmail DOT com> | |
(message from Sergey Alyoshin on Sat, 17 Mar 2012 16:07:35 +0300) | |
Subject: | Re: [geda-user] very old .pcb file |
References: | <alpine DOT DEB DOT 2 DOT 00 DOT 1203150341280 DOT 15144 AT zaphod DOT 661 DOT org> |
<20321 DOT 59968 DOT 314778 DOT 216654 AT vagabond DOT local> | |
<alpine DOT DEB DOT 2 DOT 00 DOT 1203161149570 DOT 8944 AT zaphod DOT 661 DOT org> | |
<20120316194917 DOT GA28072 AT malakian DOT lan> <CAOxVtSQ1VSvMxXePObD3G++EX0NsBC=LxjV+LjfX5D9o3tcv=w AT mail DOT gmail DOT com> | |
Reply-To: | geda-user AT delorie DOT com |
> With following patch, file http://661.org/tmp/ramcard.pcb can be > opened in pcb from git. > Is it acceptable? Would it be better to make up a name, like "Layer%d" ? Are we sure strdup() is the right thing to do? > diff --git a/src/parse_y.y b/src/parse_y.y > index 2ae9f6c..22d02cc 100644 > --- a/src/parse_y.y > +++ b/src/parse_y.y > @@ -863,6 +863,8 @@ layer > > /* memory for name is already allocated */ > Layer->Name = $4; > + if (Layer->Name == NULL) > + Layer->Name = strdup(""); > LayerFlag[$3-1] = true; > if (yyData->LayerN + 2 < $3) > yyData->LayerN = $3 - 2; >
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |