[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: Some problems



On Wed, 2007-04-25 at 08:41 -0400, Dan McMahill wrote:
> I don't think this is really possible.  You can't use "a-b" as a 
> variable name in C either.

I've looked at this, and it seems this particular issue is due to a
prefix of the newlib footprint being a valid oldlib expansion:

PKG_SOT23-95P-280L1-5N__LTC_S5_Package(foo,bar,blah)

M4 reads PKG_SOT23 
it doesn't treat "-" as part of the macro name, as stated before, and
treats this line as an invocation of PKG_SOT23 with no arguments, then
proceeds with -95P-280L1-5N__LTC_S5_Package(foo,bar,blah)

This doesn't expand anywhere, so we get it output at the end of an SOT23
expansion (hence the syntax error in PCB).

A fix might to be adding a suffix, as well as a prefix to the footprint
names, prior to feeding into M4, then naming like John's which starts
with a valid oldlib name, but continues with extension information will
not trigger the false expansion.

Currently,  0805-> PKG_0805(...)
If we used, 0805-> PKG_0805__FOOBAR(...) (Or some other unlikely string)

Currently 0805-my-variant -> PKG_0805-my-variant(...)
And output is [STUFF FROM PKG_0805 EXPANSION]-my-variant(...)

If we used a suffix, we'd not match PKG_0805, and M4 passes out the
variant invocation un-munged.

(This works until someone decides to name their newlib footprint with a
valid oldlib name, then our suffix - so it should be obscure!)

I _believe_ this workaround would require extensive search/replace in
the oldlib library, a fix for gsch2pcb, and pcb.


-- 
Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA

Tel: +44 (0)7729 980173 - (No signal in the lab!)



_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user