On Sun, 2008-09-21 at 22:02 -0400, Ales Hvezda wrote:
> [snip]
> > Can I have comments on the above "fix" please.
> >
> > It deletes code which is supposed to find generic attributes inside a
> > symbol in the VAMS gnetlist backend.
> >
> > Deleting the code keeps the current behaviour, since the code does not
> > work.
>
> I've looked over the patch and don't see anything wrong with it on the
> surface. Also, it's been a few weeks and nobody else has chimed in
> (either nobody cares or nobody is using the vams backend).
>
> I vote for committing the patch and let's see what happens.
Done (and a tidyup afterwards).
I did make a "fix" to have it pick out names of attributes inside the
symbols, but it just ended up clutterin the VAMS generic maps with
duplicate entries for all promoted symbol names. It also filled the map
with "cruft" from "uninteresting" floating attributes such as
"documentation=...." etc..)
FWIW, the extra patch to make it add the internal attributes is
attached. (Attaching for archical, as it is no longer part of my stgit
stack).
--
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!)
diff --git a/gnetlist/src/vams_misc.c b/gnetlist/src/vams_misc.c
index 0e31e85..7bc52ec 100644
--- a/gnetlist/src/vams_misc.c
+++ b/gnetlist/src/vams_misc.c
@@ -64,6 +64,26 @@ vams_get_attribs_list (OBJECT *object)
a_iter = g_list_next (a_iter);
}
+ /* search inside the symbol */
+ for (o_current = object->complex->prim_objs;
+ o_current != NULL;
+ o_current = o_current->next) {
+
+ if (o_current->type != OBJ_TEXT)
+ continue;
+
+ /* Only pickup floating attributes inside the complex object,
+ * ie. not attributes attached to pins within the complex */
+ if (o_current->attached_to != NULL)
+ continue;
+
+ val = o_attrib_get_name_value(o_current->text->string, &found_name, NULL);
+ if (val) {
+ list = scm_cons (scm_makfrom0str (found_name), list);
+ }
+ g_free (found_name);
+ }
+
return list;
}
_______________________________________________
geda-dev mailing list
[email protected]
http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev