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

Re: gEDA-user: GAttrib refdes appends '.'



> Why does gattrib show some components with a dot ( period ) appended to 
> their refdes?

IIRC, Gattrib appends a dot to the refdes if the "numslots" attribute is
set. Then, assuming you have a slotted part (i.e. numslots > 0),
each slot of the part is listed on a separate line.  For example:

refdes  attr1  attr2
U1.1    foo    bar
U1.2    baz
U2
U3.            foo1

etc.

In the above example, U1 is a slotted part with numslots=2.   Each
slot of U1 is listed on a separate line.  U2 has no "numslots"
attribute at all, and U3 has numslots=0.

In an effort to clean up our parts libararies, our diligent developers
have been adding the "numslots" attribute to all components, including
things like single caps & resistors.  In the case of single parts,
numslots=0, which turns off slotting.  However, since gattrib is
triggered off the presence of the "numslots", and not its value, it
appends the ".".  All this happens in gattrib/src/s_attrib.c at the
bottom of the file.

As for why it works this way?  I belive gattrib was segfaulting on
slotted parts before this features was implemented.  Either that, or
it was badly munging parts.  In any event, it needed a way to handle
parts with multiple slots, and the above way was the easiest to
create.  

> I could find anything in the manual about what the '.' symbolizes. 

Gattrib has a manual???

Stuart