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

Re: gEDA-user: gEDA file format - couple of questions on attributes.



> 1) are there any restrictions on the characters in attribute
>    names and values (other than no "=" in the name) ?

The implementation of the "attribute name, value" parser
is in the function around line 357 of
"./libgeda/src/o_attrib.c" file:

357  gboolean
358  o_attrib_string_get_name_value (const gchar *string,
                          gchar **name_ptr, gchar **value_ptr)

The above parser function, though not perfect, allows
flexibility within UTF-8 encoded string. As such, within
the "T" object string portion, the first detected "="
with no space char " " on either adjacent side of it,
separates the "attribute name" and the "attribute value".
"attribute value" portion can contain any UTF-8 encoded
string (except an immediate '\0'), including "=".

Other than the above, there seems to be no other restrictions
imposed by the frontend.

Beyond the gschem file format, there could be other
restriction on attributes imposed by some processing
entity (DRC, etc) and backend netlister. But those are
backend specific, and upto the particular backend
specific needs.

> 2) Can attributes be multiline text or are they always
>    single line text (but perhaps several)?

"Attribute" or "text" can be multiline as stated in the
"text" section of:
   http://geda.seul.org/wiki/geda:file_format_spec

The "num_lines" field in the "T" object type line indicates
the number of lines in the string.




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