[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gEDA-dev: Some gschem misfeatures noted this morning (10.5.2006)



Hi Stuart,

El jue, 05-10-2006 a las 10:41 -0400, Stuart Brorson escribió:
[snip]
> > I opened some of my normal test schematics with gschem this morning to
> > give the gschem changes a test drive.  I opened the schematics using
> > the wonderful new Cambridge Univ project manager xgsch2pcb -- I can
> > talk about that elesehwere.  Here are some misfeatures in gschem I
> > noted:
> >
> > 1.  I got this error reported in a pop-up status window:
> >
> > "Found an improper attribute: _VendorPN_"
> > "Found an improper attribute: _Price_"
> > "Found an improper attribute: _VendorPN_"
> > "Found an improper attribute: _Price_"
> > "Found an improper attribute: _VendorPN_"
> > "Found an improper attribute: _Price_"
> > "Found an improper attribute: _VendorPN_"
> > "Found an improper attribute: _Price_"
> > [... etc...]
> >
> > I have "Price" and "VendorPN" attibutes on all of my symbols (that is,
> > attribues attached in the schematic layer using gattrib) in this
> > design.  I wonder if gschem (or libgeda) is now enforcing the
> > attributes you are allowed to have attached to your symbols?  Or is
> > this some I18N thing (becuase of the underscores around the text)?
> >
> > Personally, I don't think gschem (or libgeda) should enforce any
> > attribute names.  It can suggest names for the newbie in the
> > pull-down, but if a user like me has defined additional attribute
> > names, that shouldn't cause a warning or an error.
> >
> > In any event, I don't think I deserve this error, whatever its cause.

[snip]

I tried adding the attributes Price and VendorPN to a part in a
schematic, closed gschem, run gschem again and opened the schematic, and
the log window showed no errors like that.

The error you see is the one you can get when you have some attribute
without value. I can reproduce something similar with the following
schematic:

v 20060906 1
C 48400 45400 1 0 0 7400-1.sym
{
T 48900 46300 5 10 0 0 0 0 1
device=7400
T 48700 46300 5 10 1 1 0 0 1
refdes=U?
T 48900 47650 5 10 0 0 0 0 1
footprint=DIP14
T 48400 45400 5 10 0 0 0 0 1
VendorPN=
}

However, the log is a little bit different (notice the '=' sign at the
end of the attribute name):

Found an improper attribute: _VendorPN=_
Found an improper attribute: _VendorPN=_
Found an improper attribute: _VendorPN=_
                                         ^^^ 
I can point you to the exact piece of code.

Look into libgeda/src/o_attrib.c, around line 892 you'll find the
o_attrib_get_name_value function.

The code documentation says:
 *  And if you get an invalid attribute (improper) with a name and no
 *  value, then it is NOT an attribute.
 *  Also, there cannot be any spaces beside the equals sign
At the end of the function you see:
  if (*value_ptr && (*value_ptr)[0] == '\0') {
    s_log_message("Found an improper attribute: _%s_\n", string);
[snip]
    return(FALSE);
  } else {
    return(TRUE);
  }

Maybe you can post the schematic so we can trace the bug?

Thanks,

Carlos



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