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

gEDA-cvs: gaf.git: branch: master updated (1.5.0-20080706-125-g1a1460c)



The branch, master has been updated
       via  1a1460c65a9d4e0aee35e39fff0f083c95bd380d (commit)
      from  2fe94f7887ccf4b990bb285fc9def966ce857e0b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


=========
 Summary
=========

 gattrib/src/s_object.c      |   30 ++--
 gattrib/src/s_sheet_data.c  |   16 +-
 gattrib/src/s_table.c       |   20 +-
 gattrib/src/s_toplevel.c    |    8 +-
 gnetlist/src/vams_misc.c    |    8 +-
 gschem/src/g_hook.c         |   18 +-
 gschem/src/o_attrib.c       |   14 +-
 gschem/src/o_misc.c         |    8 +-
 gschem/src/x_attribedit.c   |    7 +-
 libgeda/include/prototype.h |    6 +-
 libgeda/include/struct.h    |    7 +-
 libgeda/src/g_smob.c        |   59 +++---
 libgeda/src/o_attrib.c      |  523 ++++++++++++++++++-------------------------
 libgeda/src/o_bus_basic.c   |    4 +-
 libgeda/src/o_net_basic.c   |    4 +-
 15 files changed, 313 insertions(+), 419 deletions(-)


=================
 Commit Messages
=================

commit 1a1460c65a9d4e0aee35e39fff0f083c95bd380d
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Sat Aug 16 19:18:24 2008 +0100

    Remove the ATTRIB struct as it only contained one variable.
    
    The OBJECT.attribs GList now points directly at the text objects which
    hold and display the attribute name and value.

:100644 100644 547f34c... 4a28465... M	gattrib/src/s_object.c
:100644 100644 7fcdad9... de0ec64... M	gattrib/src/s_sheet_data.c
:100644 100644 1807471... 1404223... M	gattrib/src/s_table.c
:100644 100644 4608d43... 9edcdde... M	gattrib/src/s_toplevel.c
:100644 100644 fb7094c... 072264e... M	gnetlist/src/vams_misc.c
:100644 100644 8488832... aaca3f0... M	gschem/src/g_hook.c
:100644 100644 c7fb8a1... 51386f9... M	gschem/src/o_attrib.c
:100644 100644 de1bd0b... 7349910... M	gschem/src/o_misc.c
:100644 100644 b29a00f... 8661726... M	gschem/src/x_attribedit.c
:100644 100644 b5549ec... 32799ce... M	libgeda/include/prototype.h
:100644 100644 28f0d64... d8abe96... M	libgeda/include/struct.h
:100644 100644 fc1b0c9... 98d0083... M	libgeda/src/g_smob.c
:100644 100644 5ad5dcd... d9d7b59... M	libgeda/src/o_attrib.c
:100644 100644 3f92618... 3b2cfca... M	libgeda/src/o_bus_basic.c
:100644 100644 caf49ac... 3cb9038... M	libgeda/src/o_net_basic.c

=========
 Changes
=========

commit 1a1460c65a9d4e0aee35e39fff0f083c95bd380d
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Sat Aug 16 19:18:24 2008 +0100

    Remove the ATTRIB struct as it only contained one variable.
    
    The OBJECT.attribs GList now points directly at the text objects which
    hold and display the attribute name and value.

diff --git a/gattrib/src/s_object.c b/gattrib/src/s_object.c
index 547f34c..4a28465 100644
--- a/gattrib/src/s_object.c
+++ b/gattrib/src/s_object.c
@@ -64,7 +64,7 @@
  * 2. It gets the position info from o_current's refdes attrib and
  *    calls o_text_add to add pos info and name=value string 
  *    to attrib_graphic.
- * 3. It calls o_attrib_add to wrap attrib_graphic with (ATTRIB )
+ * 3. It calls o_attrib_add to wrap attrib_graphic with (attribute OBJECT )
  *
  *------------------------------------------------------------------ */
 void s_object_add_comp_attrib_to_object(OBJECT *o_current, 
@@ -108,7 +108,7 @@ void s_object_add_net_attrib_to_object(OBJECT *o_current, char *new_attrib_name,
  * 2. It gets the position info from o_current's refdes attrib and
  *    calls o_text_add to add pos info and name=value string 
  *    to attrib_graphic.
- * 3. It calls o_attrib_add to wrap attrib_graphic with (ATTRIB )
+ * 3. It calls o_attrib_add to wrap attrib_graphic with (attribute OBJECT )
  * Question:  Do I really need separate fcns for comps, nets, and 
  * pins???
  *
@@ -147,7 +147,7 @@ void s_object_replace_attrib_in_object(OBJECT *o_current,
 				       gint show_name_value)
 {
   GList *a_iter;
-  ATTRIB *a_current;
+  OBJECT *a_current;
   char *old_attrib_text;
   char *old_attrib_name;
   char *new_attrib_text;
@@ -156,22 +156,22 @@ void s_object_replace_attrib_in_object(OBJECT *o_current,
   a_iter = o_current->attribs;
   while (a_iter != NULL) {
     a_current = a_iter->data;
-    if (a_current->object->type == OBJ_TEXT 
-	&& a_current->object->text != NULL) {  /* found an attribute */
+    if (a_current->type == OBJ_TEXT
+	&& a_current->text != NULL) {  /* found an attribute */
       
       /* may need to check more thoroughly here. . . . */
-      old_attrib_text = g_strdup(a_current->object->text->string);
+      old_attrib_text = g_strdup(a_current->text->string);
       o_attrib_get_name_value(old_attrib_text, &old_attrib_name, NULL);
       
       if (strcmp(old_attrib_name, new_attrib_name) == 0) {
 	/* create attrib=value text string & stuff it back into pr_current */
 	new_attrib_text = g_strconcat(new_attrib_name, "=", new_attrib_value, NULL);
-	g_free(a_current->object->text->string);   /* remove old attrib string */
-	a_current->object->text->string = g_strdup(new_attrib_text);   /* insert new attrib string */
+	g_free(a_current->text->string);   /* remove old attrib string */
+	a_current->text->string = g_strdup(new_attrib_text);   /* insert new attrib string */
 	if (visibility != LEAVE_VISIBILITY_ALONE) 
-	  a_current->object->visibility = visibility;
+	  a_current->visibility = visibility;
 	if (show_name_value != LEAVE_NAME_VALUE_ALONE)
-	  a_current->object->show_name_value = show_name_value; 
+	  a_current->show_name_value = show_name_value;
 	g_free(new_attrib_text);
 	g_free(old_attrib_text);
 	g_free(old_attrib_name);
@@ -201,7 +201,7 @@ void s_object_replace_attrib_in_object(OBJECT *o_current,
 void s_object_remove_attrib_in_object(OBJECT *o_current, char *new_attrib_name) 
 {
   GList *a_iter;
-  ATTRIB *a_current;
+  OBJECT *a_current;
   OBJECT *attribute_object;
   char *old_attrib_text;
   char *old_attrib_name;
@@ -209,11 +209,11 @@ void s_object_remove_attrib_in_object(OBJECT *o_current, char *new_attrib_name)
   a_iter = o_current->attribs;
   while (a_iter != NULL) {
     a_current = a_iter->data;
-    if (a_current->object->type == OBJ_TEXT 
-	&& a_current->object->text != NULL) {  /* found an attribute */
+    if (a_current->type == OBJ_TEXT
+	&& a_current->text != NULL) {  /* found an attribute */
       
       /* may need to check more thoroughly here. . . . */
-      old_attrib_text = g_strdup(a_current->object->text->string);
+      old_attrib_text = g_strdup(a_current->text->string);
       o_attrib_get_name_value(old_attrib_text, &old_attrib_name, NULL);
       
       if (strcmp(old_attrib_name, new_attrib_name) == 0) {
@@ -223,7 +223,7 @@ void s_object_remove_attrib_in_object(OBJECT *o_current, char *new_attrib_name)
 	printf("In s_object_remove_attrib_in_object, removing attrib with name = %s\n", old_attrib_name);
 #endif
 
-	attribute_object = a_current->object;
+	attribute_object = a_current;
 	s_object_delete_text_object_in_object(pr_current, attribute_object);
 
 	g_free(old_attrib_text);
diff --git a/gattrib/src/s_sheet_data.c b/gattrib/src/s_sheet_data.c
index 7fcdad9..de0ec64 100644
--- a/gattrib/src/s_sheet_data.c
+++ b/gattrib/src/s_sheet_data.c
@@ -166,7 +166,7 @@ void s_sheet_data_add_master_comp_attrib_list_items(OBJECT *start_obj) {
   char *attrib_name;
   OBJECT *o_current;
   GList *a_iter;
-  ATTRIB *a_current;
+  OBJECT *a_current;
   
 #ifdef DEBUG
   fflush(stderr);
@@ -198,9 +198,9 @@ void s_sheet_data_add_master_comp_attrib_list_items(OBJECT *start_obj) {
 	a_iter = o_current->attribs; /* This has a side effect.  Why? */
 	while (a_iter != NULL) {
 	  a_current = a_iter->data;
-	  if (a_current->object->type == OBJ_TEXT 
-	      && a_current->object->text != NULL) {  /* found an attribute */
-	    attrib_text = g_strdup(a_current->object->text->string);
+	  if (a_current->type == OBJ_TEXT
+	      && a_current->text != NULL) {  /* found an attribute */
+	    attrib_text = g_strdup(a_current->text->string);
 	    o_attrib_get_name_value(attrib_text, &attrib_name, NULL);
 
 	      /* Don't include "refdes" or "slot" because they form the row name */
@@ -370,7 +370,7 @@ void s_sheet_data_add_master_pin_attrib_list_items(OBJECT *start_obj) {
   OBJECT *o_current;
   OBJECT *o_lower_current;
   GList *a_iter;
-  ATTRIB *pin_attrib;
+  OBJECT *pin_attrib;
   
 #ifdef DEBUG
   fflush(stderr);
@@ -405,9 +405,9 @@ void s_sheet_data_add_master_pin_attrib_list_items(OBJECT *start_obj) {
 	      a_iter = o_lower_current->attribs;
 	      while (a_iter != NULL) {
 		pin_attrib = a_iter->data;
-		if (pin_attrib->object->type == OBJ_TEXT 
-		    && pin_attrib->object->text != NULL) {  /* found an attribute */
-		  attrib_text = g_strdup(pin_attrib->object->text->string);
+		if (pin_attrib->type == OBJ_TEXT
+		    && pin_attrib->text != NULL) {  /* found an attribute */
+		  attrib_text = g_strdup(pin_attrib->text->string);
 		  o_attrib_get_name_value(attrib_text, &attrib_name, &attrib_value);
 		  if ( (strcmp(attrib_name, "pinnumber") != 0) 
 		       && (attrib_value != NULL) ) {  
diff --git a/gattrib/src/s_table.c b/gattrib/src/s_table.c
index 1807471..1404223 100644
--- a/gattrib/src/s_table.c
+++ b/gattrib/src/s_table.c
@@ -238,7 +238,7 @@ void s_table_add_toplevel_comp_items_to_comp_table(OBJECT *start_obj) {
   gchar *attrib_name;
   gchar *attrib_value;
   GList *a_iter;
-  ATTRIB *a_current;
+  OBJECT *a_current;
   gint old_visibility, old_show_name_value;
 
 
@@ -280,13 +280,13 @@ void s_table_add_toplevel_comp_items_to_comp_table(OBJECT *start_obj) {
         a_iter = o_current->attribs;
         while (a_iter != NULL) {
           a_current = a_iter->data;
-          if (a_current->object->type == OBJ_TEXT
-              && a_current->object->text != NULL) {  /* found an attribute */
+          if (a_current->type == OBJ_TEXT
+              && a_current->text != NULL) {  /* found an attribute */
             /* may need to check more thoroughly here. . . . */
-            attrib_text = g_strdup(a_current->object->text->string);
+            attrib_text = g_strdup(a_current->text->string);
             o_attrib_get_name_value(attrib_text, &attrib_name, &attrib_value);
-	    old_visibility = a_current->object->visibility;
-	    old_show_name_value = a_current->object->show_name_value;
+	    old_visibility = a_current->visibility;
+	    old_show_name_value = a_current->show_name_value;
 
 	    /* Don't include "refdes" or "slot" because they form the row name. */
 	    /* Also don't include "net" per bug found by Steve W.  4.3.2007 -- SDB */
@@ -432,7 +432,7 @@ void s_table_add_toplevel_pin_items_to_pin_table(OBJECT *start_obj) {
   gchar *attrib_name;
   gchar *attrib_value;
   GList *a_iter;
-  ATTRIB *pin_attrib;
+  OBJECT *pin_attrib;
 
   if (verbose_mode) {
     printf("- Starting internal pin TABLE creation\n");
@@ -475,9 +475,9 @@ void s_table_add_toplevel_pin_items_to_pin_table(OBJECT *start_obj) {
 	    a_iter = o_lower_current->attribs;
 	    while (a_iter != NULL) {
 	      pin_attrib = a_iter->data;
-	      if (pin_attrib->object->type == OBJ_TEXT
-		  && pin_attrib->object->text != NULL) {  /* found an attribute */
-		attrib_text = g_strdup(pin_attrib->object->text->string);
+	      if (pin_attrib->type == OBJ_TEXT
+		  && pin_attrib->text != NULL) {  /* found an attribute */
+		attrib_text = g_strdup(pin_attrib->text->string);
 		o_attrib_get_name_value(attrib_text, &attrib_name, &attrib_value);
  
 		if ( (strcmp(attrib_name, "pinnumber") != 0) 
diff --git a/gattrib/src/s_toplevel.c b/gattrib/src/s_toplevel.c
index 4608d43..9edcdde 100644
--- a/gattrib/src/s_toplevel.c
+++ b/gattrib/src/s_toplevel.c
@@ -598,7 +598,7 @@ void s_toplevel_update_component_attribs_in_toplevel(OBJECT *o_current,
   char *old_attrib_value;
   gchar *refdes;
   GList *a_iter;
-  ATTRIB *a_current;
+  OBJECT *a_current;
   int count = 0;  /* This is to fake out a fcn called later */
   gint row, col;
   gint visibility = 0;
@@ -623,10 +623,10 @@ void s_toplevel_update_component_attribs_in_toplevel(OBJECT *o_current,
   a_iter = o_current->attribs;
   while (a_iter != NULL) {
     a_current = a_iter->data;
-    if (a_current->object->type == OBJ_TEXT
-	&& a_current->object->text != NULL) {  /* found a name=value attribute pair. */
+    if (a_current->type == OBJ_TEXT
+	&& a_current->text != NULL) {  /* found a name=value attribute pair. */
       /* may need to check more thoroughly here. . . . */
-      old_name_value_pair = g_strdup(a_current->object->text->string);
+      old_name_value_pair = g_strdup(a_current->text->string);
 
       /* Else clause is suggestion from Ales */
 #if 1
diff --git a/gnetlist/src/vams_misc.c b/gnetlist/src/vams_misc.c
index fb7094c..072264e 100644
--- a/gnetlist/src/vams_misc.c
+++ b/gnetlist/src/vams_misc.c
@@ -41,8 +41,7 @@ vams_get_attribs_list(OBJECT *object, SCM *list, OBJECT **return_found)
 {
   OBJECT *o_current;
   GList *a_iter;
-  ATTRIB *a_current;
-  OBJECT *found;
+  OBJECT *a_current;
   int val;
   char* found_name = NULL;
 
@@ -51,9 +50,8 @@ vams_get_attribs_list(OBJECT *object, SCM *list, OBJECT **return_found)
   a_iter = o_current->attribs;
   while(a_iter != NULL) {
     a_current = a_iter->data;
-    found = a_current->object;
-    if (found != NULL && found->text && found->text->string) {
-      val = o_attrib_get_name_value(found->text->string,
+    if (a_current->text && a_current->text->string) {
+      val = o_attrib_get_name_value(a_current->text->string,
                                     &found_name, NULL);
 
       if (val) {
diff --git a/gschem/src/g_hook.c b/gschem/src/g_hook.c
index 8488832..aaca3f0 100644
--- a/gschem/src/g_hook.c
+++ b/gschem/src/g_hook.c
@@ -54,7 +54,7 @@ static void custom_world_get_object_list_bounds
  * Principle stolen from o_attrib_return_attribs */
 SCM g_make_attrib_smob_list(GSCHEM_TOPLEVEL *w_current, OBJECT *curr_object)
 {
-  ATTRIB *a_current;      
+  OBJECT *a_current;
   OBJECT *object;
   GList *a_iter;
   SCM smob_list = SCM_EOL;
@@ -73,8 +73,8 @@ SCM g_make_attrib_smob_list(GSCHEM_TOPLEVEL *w_current, OBJECT *curr_object)
   a_iter = object->attribs;
   while(a_iter != NULL) {
     a_current = a_iter->data;
-    if (a_current->object->type == OBJ_TEXT) {
-      if (o_text_get_string (w_current->toplevel, a_current->object)) {
+    if (a_current->type == OBJ_TEXT) {
+      if (o_text_get_string (w_current->toplevel, a_current)) {
         smob_list = scm_cons (g_make_attrib_smob (w_current->toplevel, a_current),
                               smob_list);
       }
@@ -351,9 +351,8 @@ SCM g_set_attrib_text_properties(SCM attrib_smob, SCM scm_colorname,
   }
 
   if (attribute &&
-      attribute->attribute &&
-      attribute->attribute->object) {
-    object = (OBJECT *) attribute->attribute->object;
+      attribute->attribute) {
+    object = attribute->attribute;
     if (object &&
 	object->text) {
       o_erase_single(w_current, object);
@@ -407,7 +406,7 @@ static void custom_world_get_single_object_bounds
                                         GList *exclude_attrib_list,
 					GList *exclude_obj_type_list) {
     OBJECT *obj_ptr = NULL;
-    ATTRIB *a_current;
+    OBJECT *a_current;
     GList *a_iter;
     int rleft, rright, rbottom, rtop;
     const gchar *text_value; 
@@ -472,11 +471,10 @@ static void custom_world_get_single_object_bounds
 	  a_iter = obj_ptr->attribs;
 	  while (a_iter != NULL) {
       a_current = a_iter->data;
-	    g_assert(a_current->object);
 
-	    if (a_current->object->type == OBJ_TEXT) {
+	    if (a_current->type == OBJ_TEXT) {
 	      custom_world_get_single_object_bounds(toplevel,
-						    a_current->object,
+						    a_current,
 						    &rleft, &rtop, 
 						    &rright, &rbottom,
 						    exclude_attrib_list,
diff --git a/gschem/src/o_attrib.c b/gschem/src/o_attrib.c
index c7fb8a1..51386f9 100644
--- a/gschem/src/o_attrib.c
+++ b/gschem/src/o_attrib.c
@@ -52,7 +52,7 @@
 void o_attrib_add_selected(GSCHEM_TOPLEVEL *w_current, SELECTION *selection,
                            OBJECT *selected)
 {
-  ATTRIB *a_current;
+  OBJECT *a_current;
   GList *a_iter;
 
   g_assert( selection != NULL );
@@ -65,14 +65,10 @@ void o_attrib_add_selected(GSCHEM_TOPLEVEL *w_current, SELECTION *selection,
     while (a_iter != NULL) {
       a_current = a_iter->data;
 
-      if (a_current->object) {
-
-        /* make sure object isn't selected already */
-        if (a_current->object->saved_color == -1) {
-          o_selection_add(selection, a_current->object);
-          o_redraw_single(w_current, a_current->object);
-        }
-
+      /* make sure object isn't selected already */
+      if (a_current->saved_color == -1) {
+        o_selection_add(selection, a_current);
+        o_redraw_single(w_current, a_current);
       }
 
       a_iter = g_list_next (a_iter);
diff --git a/gschem/src/o_misc.c b/gschem/src/o_misc.c
index de1bd0b..7349910 100644
--- a/gschem/src/o_misc.c
+++ b/gschem/src/o_misc.c
@@ -737,7 +737,7 @@ void o_update_component(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current)
 {
   TOPLEVEL *toplevel = w_current->toplevel;
   OBJECT *tmp_list, *new_complex;
-  ATTRIB *a_current;
+  OBJECT *a_current;
   GList *a_iter;
   gboolean is_embedded;
   const CLibSymbol *clib;
@@ -797,8 +797,8 @@ void o_update_component(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current)
     OBJECT *o_attrib;
     gchar *name;
     char *attrfound;
-    g_assert (a_current->object->type == OBJ_TEXT);
-    o_attrib_get_name_value (o_text_get_string (toplevel, a_current->object),
+    g_assert (a_current->type == OBJ_TEXT);
+    o_attrib_get_name_value (o_text_get_string (toplevel, a_current),
                              &name, NULL);
 
     attrfound = o_attrib_search_name_single(o_current, name, NULL);
@@ -812,7 +812,7 @@ void o_update_component(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current)
 
       /* make a copy of the attribute object */
       o_list_copy_to (toplevel, o_current,
-                      a_current->object, NORMAL_FLAG, &o_attrib);
+                      a_current, NORMAL_FLAG, &o_attrib);
       /* add the attribute to old */
       o_attrib_add (toplevel, o_current, o_attrib);
       /* redraw the attribute object */
diff --git a/gschem/src/x_attribedit.c b/gschem/src/x_attribedit.c
index b29a00f..8661726 100644
--- a/gschem/src/x_attribedit.c
+++ b/gschem/src/x_attribedit.c
@@ -75,7 +75,7 @@ void attrib_edit_dialog_ok(GtkWidget * w, GSCHEM_TOPLEVEL *w_current)
   OBJECT *attribptr;
   OBJECT *object;
   GList *s_current = NULL;
-  ATTRIB *a_current;
+  OBJECT *a_current;
   GList *a_iter;
   int vis, show;
   int invocation_flag;
@@ -199,11 +199,10 @@ void attrib_edit_dialog_ok(GtkWidget * w, GSCHEM_TOPLEVEL *w_current)
             if (replace) {
               while (a_iter != NULL) {
                 a_current = a_iter->data;
-                const gchar *str = o_text_get_string (toplevel, a_current->object);
+                const gchar *str = o_text_get_string (toplevel, a_current);
                 if (str) {
                   if (!strncmp (str, newtext, strchr (newtext, '=') - newtext)) {
-                    o_text_change(w_current, a_current->object,
-                                  newtext, vis, show);
+                    o_text_change(w_current, a_current, newtext, vis, show);
                     replaced = TRUE;
                     toplevel->page_current->CHANGED = 1;
                   }
diff --git a/libgeda/include/prototype.h b/libgeda/include/prototype.h
index b5549ec..32799ce 100644
--- a/libgeda/include/prototype.h
+++ b/libgeda/include/prototype.h
@@ -46,7 +46,7 @@ void g_rc_parse(TOPLEVEL *toplevel, const gchar* rcname,
 gint g_rc_parse_specified_rc(TOPLEVEL *toplevel, const gchar *rcfilename);
 
 /* g_smob.c */
-SCM g_make_attrib_smob(TOPLEVEL *curr_w, ATTRIB *curr_attr);
+SCM g_make_attrib_smob(TOPLEVEL *curr_w, OBJECT *curr_attr);
 SCM g_set_attrib_value_internal(SCM attrib_smob, SCM scm_value, TOPLEVEL **world, OBJECT **o_attrib, char *new_string[]);
 gboolean g_get_data_from_object_smob(SCM object_smob, TOPLEVEL **toplevel, 
 				     OBJECT **object);
@@ -97,9 +97,9 @@ void o_arc_rotate_world(TOPLEVEL *toplevel, int world_centerx, int world_centery
 void o_arc_mirror_world(TOPLEVEL *toplevel, int world_centerx, int world_centery, OBJECT *object);
 
 /* o_attrib.c */
-ATTRIB *o_attrib_search(GList *list, OBJECT *item);
+OBJECT *o_attrib_search(GList *list, OBJECT *item);
 void o_attrib_add(TOPLEVEL *toplevel, OBJECT *object, OBJECT *item);
-void o_attrib_free(TOPLEVEL *toplevel, ATTRIB *current);
+void o_attrib_free(TOPLEVEL *toplevel, OBJECT *current);
 void o_attrib_attach(TOPLEVEL *toplevel, OBJECT *parent_list, OBJECT *text_object, OBJECT *object);
 void o_attrib_free_all(TOPLEVEL *toplevel, GList *list);
 void o_attrib_print(GList *attributes);
diff --git a/libgeda/include/struct.h b/libgeda/include/struct.h
index 28f0d64..d8abe96 100644
--- a/libgeda/include/struct.h
+++ b/libgeda/include/struct.h
@@ -35,7 +35,6 @@ typedef struct st_box BOX;
 typedef struct st_picture PICTURE;
 typedef struct st_text TEXT;
 
-typedef struct st_attrib ATTRIB;
 typedef struct st_object OBJECT;
 typedef struct st_page PAGE;
 typedef struct st_toplevel TOPLEVEL;
@@ -275,10 +274,6 @@ struct st_object {
 }; 
 
 
-struct st_attrib {
-  OBJECT *object;       /* object attribute is connected to */
-};
-
 struct st_conn {
   OBJECT *other_object;	/* The "other" object connected to this one */
   int type;		/* Always in reference to how the "other" */
@@ -618,7 +613,7 @@ struct st_color {
 
 struct st_attrib_smob {
   TOPLEVEL *world;   /* We need this when updating schematic */
-  ATTRIB   *attribute;
+  OBJECT   *attribute;
 };
 
 struct st_object_smob {
diff --git a/libgeda/src/g_smob.c b/libgeda/src/g_smob.c
index fc1b0c9..98d0083 100644
--- a/libgeda/src/g_smob.c
+++ b/libgeda/src/g_smob.c
@@ -70,11 +70,10 @@ static int g_print_attrib_smob(SCM attrib_smob, SCM port,
 
   if (attribute &&
       attribute->attribute &&
-      attribute->attribute->object &&
-      attribute->attribute->object->text &&
-      attribute->attribute->object->text->string ) {
+      attribute->attribute->text &&
+      attribute->attribute->text->string ) {
     scm_puts("#<attribute ", port);
-    scm_display (scm_makfrom0str (attribute->attribute->object->text->string),
+    scm_display (scm_makfrom0str (attribute->attribute->text->string),
                  port);
     scm_puts(">", port);
   }
@@ -93,7 +92,7 @@ static int g_print_attrib_smob(SCM attrib_smob, SCM port,
  *  \param [in] curr_attr  The current attribute.
  *  \return SCM
  */
-SCM g_make_attrib_smob(TOPLEVEL *curr_w, ATTRIB *curr_attr)
+SCM g_make_attrib_smob(TOPLEVEL *curr_w, OBJECT *curr_attr)
 {
   struct st_attrib_smob *smob_attribute;
 
@@ -130,10 +129,8 @@ SCM g_get_attrib_name_value(SCM attrib_smob)
 
   if (attribute &&
       attribute->attribute &&
-      attribute->attribute->object &&
-      attribute->attribute->object->text->string ) {
-    o_attrib_get_name_value(attribute->attribute->object->text->string, 
-                            &name, &value );
+      attribute->attribute->text->string ) {
+    o_attrib_get_name_value(attribute->attribute->text->string, &name, &value );
     returned = scm_cons (scm_makfrom0str (name),
                          scm_makfrom0str (value));
     g_free(name);
@@ -176,17 +173,16 @@ SCM g_set_attrib_value_internal(SCM attrib_smob, SCM scm_value,
 
   if (attribute &&
       attribute->attribute &&
-      attribute->attribute->object &&
-      attribute->attribute->object->text &&
-      attribute->attribute->object->text->string ) {
+      attribute->attribute->text &&
+      attribute->attribute->text->string ) {
 
-    o_attrib_get_name_value(attribute->attribute->object->text->string, 
+    o_attrib_get_name_value(attribute->attribute->text->string,
                             &name, NULL);
 
     *new_string = g_strconcat (name, "=", value, NULL);
 		
     *world = attribute->world;
-    *o_attrib = attribute->attribute->object;
+    *o_attrib = attribute->attribute;
 
     g_free(name);
   }
@@ -294,13 +290,12 @@ SCM g_calcule_new_attrib_bounds (SCM attrib_smob, SCM scm_alignment,
   toplevel = attribute->world;
   
   SCM_ASSERT ( attribute &&
-	       attribute->attribute &&
-	       attribute->attribute->object &&
-	       attribute->attribute->object->text &&
-	       attribute->attribute->object->text->string,
-	       attrib_smob, SCM_ARG1, "calcule-new-attrib-bounds");
+               attribute->attribute &&
+               attribute->attribute->text &&
+               attribute->attribute->text->string,
+               attrib_smob, SCM_ARG1, "calcule-new-attrib-bounds");
 
-  object = (OBJECT *) attribute->attribute->object;
+  object = (OBJECT *) attribute->attribute;
   
   /* Store the previous values */
   old_alignment = object->text->alignment;
@@ -395,11 +390,11 @@ SCM g_get_attrib_bounds(SCM attrib_smob)
 
   if (attribute &&
       attribute->attribute &&
-      attribute->attribute->object &&
-      attribute->attribute->object->text->string ) {
+      attribute->attribute->text &&
+      attribute->attribute->text->string ) {
 
-    world_get_text_bounds (toplevel, attribute->attribute->object,
-                           &left, &top, &right, &bottom);
+    world_get_text_bounds (toplevel, attribute->attribute, &left,
+                           &top, &right, &bottom);
 
     horizontal = scm_cons (scm_from_int(left), scm_from_int(right));
     vertical = scm_cons (scm_from_int(top), scm_from_int(bottom));
@@ -429,11 +424,10 @@ SCM g_get_attrib_angle(SCM attrib_smob)
 
   SCM_ASSERT ( attribute && 
                attribute->attribute &&
-	       attribute->attribute->object &&
-	       attribute->attribute->object->text,
+               attribute->attribute->text,
                attrib_smob, SCM_ARG1, "get-attribute-angle");
 
-  return scm_from_int(attribute->attribute->object->text->angle);
+  return scm_from_int(attribute->attribute->text->angle);
 }
 
 /*! \brief Free object smob memory.
@@ -518,7 +512,7 @@ SCM g_get_object_attributes(SCM object_smob)
   struct st_object_smob *object;
   SCM returned = SCM_EOL;
   GList *a_iter;
-  ATTRIB *a_current;
+  OBJECT *a_current;
 
   SCM_ASSERT ( SCM_NIMP(object_smob) && 
                ((long) SCM_CAR(object_smob) == object_smob_tag),
@@ -533,7 +527,7 @@ SCM g_get_object_attributes(SCM object_smob)
     a_iter = object->object->attribs;
     while (a_iter != NULL) {
       a_current = a_iter->data;
-      if (a_current->object && a_current->object->text) {
+      if (a_current && a_current->text) {
         returned = scm_cons (g_make_attrib_smob (toplevel, a_current),
                              returned);
       }
@@ -562,7 +556,7 @@ SCM g_get_attrib_value_by_attrib_name(SCM object_smob, SCM scm_attrib_name)
   SCM returned = SCM_EOL;
   gchar *name=NULL, *value=NULL;
   GList *a_iter;
-  ATTRIB *a_current;
+  OBJECT *a_current;
 
   SCM_ASSERT ( SCM_NIMP(object_smob) && 
                ((long) SCM_CAR(object_smob) == object_smob_tag),
@@ -581,9 +575,8 @@ SCM g_get_attrib_value_by_attrib_name(SCM object_smob, SCM scm_attrib_name)
     a_iter = object->object->attribs;
     while (a_iter != NULL) {
       a_current = a_iter->data;
-      if (a_current->object && a_current->object->text) {
-        o_attrib_get_name_value(a_current->object->text->string,
-                                &name, &value );
+      if (a_current && a_current->text) {
+        o_attrib_get_name_value(a_current->text->string, &name, &value );
         if (strcmp(name, attrib_name) == 0)
           returned = scm_cons (scm_makfrom0str (value), returned);
       }
diff --git a/libgeda/src/o_attrib.c b/libgeda/src/o_attrib.c
index 5ad5dcd..d9d7b59 100644
--- a/libgeda/src/o_attrib.c
+++ b/libgeda/src/o_attrib.c
@@ -55,13 +55,13 @@
  *  \par Function Description
  *  Search for an item in an attribute list.
  *
- *  \param [in] list  ATTRIB pointer to the list to be searched.
+ *  \param [in] list  list to be searched.
  *  \param [in] item  item to be found.
  */
-ATTRIB *o_attrib_search(GList *list, OBJECT *item)
+OBJECT *o_attrib_search(GList *list, OBJECT *item)
 {
   GList *a_iter;
-  ATTRIB *a_current;
+  OBJECT *a_current;
 
   if (item == NULL) {
     return(NULL);
@@ -71,10 +71,8 @@ ATTRIB *o_attrib_search(GList *list, OBJECT *item)
 
   while(a_iter != NULL) {
     a_current = a_iter->data;
-    if (a_current->object != NULL) {
-      if (item->sid == a_current->object->sid) {	
-        return(a_current);	
-      }
+    if (item->sid == a_current->sid) {
+      return(a_current);
     }
 
     a_iter = g_list_next (a_iter);
@@ -94,30 +92,23 @@ ATTRIB *o_attrib_search(GList *list, OBJECT *item)
  */
 void o_attrib_add(TOPLEVEL *toplevel, OBJECT *object, OBJECT *item)
 {
-  ATTRIB *new = NULL;
-
-  /* create an new st_attrib object */
-  new = (ATTRIB *) g_malloc(sizeof(ATTRIB));
-
-  /* fill item with correct data */
-  new->object = item;
-  new->object->attribute = 1; /* Set the attribute to true, hack define */
+  item->attribute = 1; /* Set the attribute to true, hack define */
   /* Show that that item is an attribute */
-  new->object->color = toplevel->attribute_color;
-
-  if (new->object->type == OBJ_TEXT) {
-    o_complex_set_color(new->object->text->prim_objs,
-                        new->object->color);
-  } else if (new->object->type == OBJ_COMPLEX || 
-             new->object->type == OBJ_PLACEHOLDER) {
-    o_complex_set_color(new->object->complex->prim_objs,
-                        new->object->color);
+  item->color = toplevel->attribute_color;
+
+  if (item->type == OBJ_TEXT) {
+    o_complex_set_color(item->text->prim_objs,
+                        item->color);
+  } else if (item->type == OBJ_COMPLEX ||
+             item->type == OBJ_PLACEHOLDER) {
+    o_complex_set_color(item->complex->prim_objs,
+                        item->color);
   }
 
   /* Add link from item to attrib listing */
-  new->object->attached_to = object;
+  item->attached_to = object;
 
-  object->attribs = g_list_append (object->attribs, new);
+  object->attribs = g_list_append (object->attribs, item);
 }
 
 /*! \brief Free single item in attribute list.
@@ -125,47 +116,37 @@ void o_attrib_add(TOPLEVEL *toplevel, OBJECT *object, OBJECT *item)
  *  Free single item in attribute list.
  *
  *  \param [in] toplevel  The TOPLEVEL object.
- *  \param [in] current    ATTRIB pointer to free.
+ *  \param [in] current   OBJECT pointer to remove attribute-ness from.
  *
  *  \note
  *  this routine is only called from free_all
  */
-void o_attrib_free(TOPLEVEL *toplevel, ATTRIB *current)
+void o_attrib_free(TOPLEVEL *toplevel, OBJECT *current)
 {
-  if (current != NULL) {
+  if (current == NULL)
+    return;
 
-    /* \todo this makes me nervous... very nervous */
-    if (current->object != NULL) {
-      current->object->attribute = 0;	
-      current->object->attached_to=NULL;
-      current->object->color = toplevel->detachedattr_color;
+  /* \todo this makes me nervous... very nervous */
+  current->attribute = 0;
+  current->attached_to=NULL;
+  current->color = toplevel->detachedattr_color;
 
-      if (current->object->type == OBJ_TEXT) {
-        o_complex_set_color(current->object->text->prim_objs, 
-                            current->object->color);
-      } else {
-        printf("Tried to set the color on a complex!\nlibgeda/src/o_attrib_free 1\n");
-      }
+  if (current->type == OBJ_TEXT) {
+    o_complex_set_color(current->text->prim_objs,
+                        current->color);
+  } else {
+    printf("Tried to set the color on a complex!\nlibgeda/src/o_attrib_free 1\n");
+  }
 
-      /* \todo not sure on this */
-      if (current->object->saved_color != -1) {
-        if (current->object->type == OBJ_TEXT) {
-          o_complex_set_saved_color_only(
-                                         current->object->text->prim_objs, 
-                                         toplevel->detachedattr_color);
-        } else {
-          printf("Tried to set the color on a complex!\nlibgeda/src/o_attrib_free 2\n");
-        }
-        current->object->saved_color = toplevel->
-        detachedattr_color;
-      }
+  /* \todo not sure on this */
+  if (current->saved_color != -1) {
+    if (current->type == OBJ_TEXT) {
+      o_complex_set_saved_color_only(current->text->prim_objs,
+                                     toplevel->detachedattr_color);
+    } else {
+      printf("Tried to set the color on a complex!\nlibgeda/src/o_attrib_free 2\n");
     }
-
-    /* \todo were do we detach the object->attached_to? above */
-    current->object=NULL;
-
-    g_free(current);
-
+    current->saved_color = toplevel->detachedattr_color;
   }
 }
 
@@ -191,7 +172,7 @@ void o_attrib_attach(TOPLEVEL *toplevel, OBJECT *parent_list,
 {
   OBJECT *o_current = NULL;
 
-  ATTRIB *found = NULL;
+  OBJECT *found = NULL;
   OBJECT *found2 = NULL; /* object in main list */
 
   o_current = text_object; 
@@ -260,7 +241,7 @@ void o_attrib_attach(TOPLEVEL *toplevel, OBJECT *parent_list,
  */
 void o_attrib_free_all(TOPLEVEL *toplevel, GList *list)
 {
-  ATTRIB *a_current; 
+  OBJECT *a_current;
   GList *a_iter;
 
   a_iter = list;
@@ -281,21 +262,18 @@ void o_attrib_free_all(TOPLEVEL *toplevel, GList *list)
  */
 void o_attrib_print(GList *attributes)
 {
-  ATTRIB *a_current;
+  OBJECT *a_current;
   GList *a_iter;
 
   a_iter = attributes;
 
   while (a_iter != NULL) {
     a_current = a_iter->data;
-    printf("Attribute points to: %s\n", a_current->object->name);
-    if (a_current->object && a_current->object->text) {
-      printf("\tText is: %s\n", a_current->object->text->string);
+    printf("Attribute points to: %s\n", a_current->name);
+    if (a_current->text) {
+      printf("\tText is: %s\n", a_current->text->string);
     }
 
-    if (!a_current->object) {
-      printf("oops found a null attrib object\n");
-    }
     a_iter = g_list_next (a_iter);
   }
 }
@@ -312,27 +290,12 @@ void o_attrib_print(GList *attributes)
  */
 void o_attrib_remove(GList **list, OBJECT *remove)
 {
-  GList *a_iter;
-  ATTRIB *a_current;
-
   g_return_if_fail (remove != NULL);
 
-  a_iter = *list;
-  while (a_iter != NULL) {
-    a_current = a_iter->data;
-    if (a_current->object == remove) {
-
-      remove->attribute = 0;
-      remove->attached_to = NULL;
+  remove->attribute = 0;
+  remove->attached_to = NULL;
 
-      /* Modifying the list we're iterating over is
-       * ok, since we return straight afterward */
-      *list = g_list_remove (*list, a_current);
-      g_free(a_current);
-      return;
-    }
-    a_iter = g_list_next (a_iter);
-  }
+  *list = g_list_remove (*list, remove);
 }
 
 /*! \brief Read attributes from a buffer.
@@ -489,8 +452,7 @@ OBJECT *o_read_attribs(TOPLEVEL *toplevel,
  */
 gchar *o_save_attribs(GList *attribs)
 {
-  ATTRIB *a_current=NULL;
-  OBJECT *o_current=NULL;
+  OBJECT *a_current=NULL;
   GList *a_iter;
   GString *acc;
   gchar *out;
@@ -502,56 +464,54 @@ gchar *o_save_attribs(GList *attribs)
   while ( a_iter != NULL ) {
     a_current = a_iter->data;
 
-    o_current = a_current->object;	
-
-    if (o_current->type != OBJ_HEAD) {
+    if (a_current->type != OBJ_HEAD) {
 
 #if DEBUG
-      printf("type: %d %c  ref: %d %c\n", o_current->type, o_current->type,
+      printf("type: %d %c  ref: %d %c\n", a_current->type, a_current->type,
              OBJ_PIN, OBJ_PIN);
 #endif
       
-      switch (o_current->type) {
+      switch (a_current->type) {
 
         case(OBJ_LINE):
-          out = (char *) o_line_save(o_current);
+          out = (char *) o_line_save(a_current);
           break;
 
         case(OBJ_NET):
-          out = (char *) o_net_save(o_current);
+          out = (char *) o_net_save(a_current);
           break;
 
         case(OBJ_BUS):
-          out = (char *) o_bus_save(o_current);
+          out = (char *) o_bus_save(a_current);
           break;
 
         case(OBJ_BOX):
-          out = (char *) o_box_save(o_current);
+          out = (char *) o_box_save(a_current);
           break;
 		
         case(OBJ_CIRCLE):
-          out = (char *) o_circle_save(o_current);
+          out = (char *) o_circle_save(a_current);
           break;
 
         case(OBJ_COMPLEX):
         case(OBJ_PLACEHOLDER):  /* new type -- SDB 1.20.2005 */
-          out = (char *) o_complex_save(o_current);
+          out = (char *) o_complex_save(a_current);
           break;
 
         case(OBJ_TEXT):
-          out = (char *) o_text_save(o_current);
+          out = (char *) o_text_save(a_current);
           break;
 
         case(OBJ_PIN):
-          out = (char *) o_pin_save(o_current);
+          out = (char *) o_pin_save(a_current);
           break;
 
         case(OBJ_ARC):
-          out = (char *) o_arc_save(o_current);
+          out = (char *) o_arc_save(a_current);
           break;
 
   	case(OBJ_PICTURE):
-	  out = (char *) o_picture_save(o_current); 
+	  out = (char *) o_picture_save(a_current);
 	  break;
 
         default:
@@ -626,12 +586,12 @@ o_attrib_get_name_value (const gchar *string, gchar **name_ptr, gchar **value_pt
  *  color (attribute_color).
  *
  *  \param [in]     toplevel   The TOPLEVEL object.
- *  \param [in,out] attributes  ATTRIB list to set colors on.
+ *  \param [in,out] attributes  OBJECT list to set colors on.
  *
  */
 void o_attrib_set_color(TOPLEVEL *toplevel, GList *attributes)
 {
-  ATTRIB *a_current;
+  OBJECT *a_current;
   GList *a_iter;
 
   a_iter = attributes;
@@ -639,40 +599,30 @@ void o_attrib_set_color(TOPLEVEL *toplevel, GList *attributes)
   while (a_iter != NULL) {
     a_current = a_iter->data;
 
-    if (a_current->object) {	
-			
-      if (a_current->object->type == OBJ_TEXT &&
-          a_current->object->text->prim_objs) {
+    if (a_current->type == OBJ_TEXT &&
+        a_current->text->prim_objs) {
 
-				/* I'm not terribly happy with this */
-		
-        if (a_current->object->saved_color != -1) {
+      /* I'm not terribly happy with this */
 
-          /* if the object is selected, make */
-          /* sure it it say selected */
-          o_complex_set_color(
-                              a_current->object->text->prim_objs,
-                              SELECT_COLOR);
-          a_current->object->color = 
-            SELECT_COLOR;
+      if (a_current->saved_color != -1) {
 
-          o_complex_set_saved_color_only(
-                                         a_current->object->text->prim_objs,
-                                         toplevel->attribute_color);
-          a_current->object->saved_color = toplevel->
-            attribute_color;
+        /* if the object is selected, make */
+        /* sure it it say selected */
+        o_complex_set_color(a_current->text->prim_objs, SELECT_COLOR);
+        a_current->color = SELECT_COLOR;
 
-        } else {
-          o_complex_set_color(
-                              a_current->object->text->prim_objs,
-                              toplevel->attribute_color);
-          a_current->object->color = 
-            toplevel->attribute_color;
-        }
-      }	
+        o_complex_set_saved_color_only(a_current->text->prim_objs,
+                                       toplevel->attribute_color);
+        a_current->saved_color = toplevel->attribute_color;
 
-      a_iter = g_list_next (a_iter);
+      } else {
+        o_complex_set_color(a_current->text->prim_objs,
+                            toplevel->attribute_color);
+        a_current->color = toplevel->attribute_color;
+      }
     }
+
+    a_iter = g_list_next (a_iter);
   }
 }
 
@@ -698,8 +648,7 @@ void o_attrib_set_color(TOPLEVEL *toplevel, GList *attributes)
 char *o_attrib_search_name(OBJECT *list, char *name, int counter) 
 {
   OBJECT *o_current;
-  ATTRIB *a_current;
-  OBJECT *found;
+  OBJECT *a_current;
   GList *a_iter;
   int val;
   int internal_counter=0;
@@ -714,36 +663,33 @@ char *o_attrib_search_name(OBJECT *list, char *name, int counter)
       a_iter = o_current->attribs;
       while(a_iter != NULL) {
         a_current = a_iter->data;
-        found = a_current->object;
-        if (found != NULL) {
-          if (found->type == OBJ_TEXT) {
-            val = o_attrib_get_name_value(found->text->string, 
-                                          &found_name, &found_value);
-
-            if (val) {
-              if (strcmp(name, found_name) == 0) {
-                if (counter != internal_counter) {
-                  internal_counter++;	
-                } else {
-                  return_string = g_strdup (found_value);
-		  g_free(found_name);
-		  g_free(found_value);
-                  return(return_string);
-                }
+        if (a_current->type == OBJ_TEXT) {
+          val = o_attrib_get_name_value(a_current->text->string,
+                                        &found_name, &found_value);
+
+          if (val) {
+            if (strcmp(name, found_name) == 0) {
+              if (counter != internal_counter) {
+                internal_counter++;
+              } else {
+                return_string = g_strdup (found_value);
+                g_free(found_name);
+                g_free(found_value);
+                return(return_string);
               }
-	      if (found_name) { g_free(found_name); found_name = NULL; }
-	      if (found_value) { g_free(found_value); found_value = NULL; }
-            }	
+            }
+            if (found_name) { g_free(found_name); found_name = NULL; }
+            if (found_value) { g_free(found_value); found_value = NULL; }
+          }
 
-#if DEBUG 
-            printf("0 _%s_\n", found->text->string);
-            printf("1 _%s_\n", found_name);
-            printf("2 _%s_\n", found_value);
+#if DEBUG
+          printf("0 _%s_\n", a_current->text->string);
+          printf("1 _%s_\n", found_name);
+          printf("2 _%s_\n", found_value);
 #endif
-          }
         }
         a_iter = g_list_next (a_iter);
-      }	
+      }
     }
 
     /* search for attributes outside */
@@ -782,12 +728,12 @@ char *o_attrib_search_name(OBJECT *list, char *name, int counter)
  *  Given an OBJECT list (i.e. OBJECTs on schematic page or
  *  inside symbol), search for the attribute called out in
  *  "string".  It iterates over all objects in the OBJECT list
- *  and dives into the attached ATTRIB list for 
+ *  and dives into the attached attribute OBJECT list for
  *  each OBJECT if it finds one.
- *  Inside the ATTRIB list it looks for an attached text 
+ *  Inside the attribute OBJECT list it looks for an attached text
  *  attribute matching "string".  It returns the
  *  pointer to the associated OBJECT if found.  If the attribute
- *  string is not found in the ATTRIB list, then the fcn
+ *  string is not found in the attribute OBJECT list, then the fcn
  *  looks on the OBJECT itself for the attribute.  Then it
  *  iterates to the next OBJECT.
  *
@@ -802,8 +748,7 @@ char *o_attrib_search_name(OBJECT *list, char *name, int counter)
 OBJECT *o_attrib_search_string_list(OBJECT *list, char *string)
 {
   OBJECT *o_current;
-  ATTRIB *a_current;
-  OBJECT *found;
+  OBJECT *a_current;
   GList *a_iter;
 
   o_current = list;
@@ -815,22 +760,19 @@ OBJECT *o_attrib_search_string_list(OBJECT *list, char *string)
 
       while(a_iter != NULL) {
         a_current = a_iter->data;
-        found = a_current->object;
-        if (found != NULL) {
-          if (found->type == OBJ_TEXT) {
+        if (a_current->type == OBJ_TEXT) {
 #if DEBUG
-	    printf("libgeda:o_attrib.c:o_attrib_search_string_list --");
-	    printf("found OBJ_TEXT, string = %s\n", found->text->string);
-#endif 
-            if (strcmp(string, found->text->string) == 0) {
-              return(found);
-            }
-          }	
+    printf("libgeda:o_attrib.c:o_attrib_search_string_list --");
+    printf("found OBJ_TEXT, string = %s\n", found->text->string);
+#endif
+          if (strcmp(string, a_current->text->string) == 0) {
+            return a_current;
+          }
         }
         a_iter = g_list_next (a_iter);
       }
-    }	
-  
+    }
+
     /* search for attributes outside (ie the actual object) */
     if (o_current->type == OBJ_TEXT) {
       if (strcmp(string, o_current->text->string) == 0) {
@@ -898,9 +840,9 @@ char *o_attrib_search_string_partial(OBJECT *object, char *search_for,
  *  \par Function Description
  *  This function will check if the text->string value of
  *  the passed OBJECT matches the <B>search_for</B> parameter.
- *  If not, it then searches the object's ATTRIB list (if 
- *  it has one.)
- *  Only this single OBJECT and its ATTRIB list is
+ *  If not, it then searches the object's attribute list
+ *  (if it has one.)
+ *  Only this single OBJECT and its attribute list is
  *  checked, and other OBJECTs on the page are not checked.
  *  \param [in] object      The OBJECT to compare.
  *  \param [in] search_for  Character string to compare against.  
@@ -910,8 +852,7 @@ char *o_attrib_search_string_partial(OBJECT *object, char *search_for,
 OBJECT *o_attrib_search_string_single(OBJECT *object, char *search_for)
 {
   OBJECT *o_current;
-  OBJECT *found;
-  ATTRIB *a_current;
+  OBJECT *a_current;
   GList *a_iter;
 
   o_current = object;
@@ -935,7 +876,7 @@ OBJECT *o_attrib_search_string_single(OBJECT *object, char *search_for)
     }
   }
 
-  /* Next check to see if this OBJECT has an ATTRIB list we */
+  /* Next check to see if this OBJECT has an attribute list we */
   /* can search.  If not return NULL.  If so, search it. */
   if (o_current->attribs == NULL) 
     return(NULL);
@@ -943,17 +884,14 @@ OBJECT *o_attrib_search_string_single(OBJECT *object, char *search_for)
   a_iter = o_current->attribs;
   while(a_iter != NULL) {
     a_current = a_iter->data;
-    found = a_current->object;
-    if (found != NULL) {
-      if (found->type == OBJ_TEXT) {
-	if(strcmp(found->text->string, search_for) == 0) {
-	    return(found);
-        }
+    if (a_current->type == OBJ_TEXT) {
+      if(strcmp(a_current->text->string, search_for) == 0) {
+        return a_current;
       }
     }
     a_iter = g_list_next (a_iter);
   }
-	
+
   return (NULL);
 } 
 
@@ -967,7 +905,7 @@ OBJECT *o_attrib_search_string_single(OBJECT *object, char *search_for)
  *  The value is the primary search key, but name is checked before
  *  an OBJECT is returned to ensure the correct OBJECT has been found.
  *
- *  \param [in] list     The ATTRIB list to search.
+ *  \param [in] list     The attribute OBJECT list to search.
  *  \param [in] value    Character string with value to search for.
  *  \param [in] name     Character string with name to compare.
  *  \param [in] counter  Which occurance to return.
@@ -977,8 +915,7 @@ OBJECT *o_attrib_search_string_single(OBJECT *object, char *search_for)
 OBJECT *o_attrib_search_attrib_value(GList *list, char *value, char *name,
 				     int counter) 
 {
-  OBJECT *found;
-  ATTRIB *a_current;
+  OBJECT *a_current;
   GList *a_iter;
   int val;
   int internal_counter=0;
@@ -995,33 +932,30 @@ OBJECT *o_attrib_search_attrib_value(GList *list, char *value, char *name,
 
   while(a_iter != NULL) {
     a_current = a_iter->data;
-    found = a_current->object;
-    if (found != NULL) {
-      if (found->type == OBJ_TEXT) {
-        val = o_attrib_get_name_value(found->text->string, 
-                                      &found_name, &found_value);
+    if (a_current->type == OBJ_TEXT) {
+      val = o_attrib_get_name_value(a_current->text->string,
+                                    &found_name, &found_value);
 
-        if (val) {
+      if (val) {
 #if DEBUG
-          printf("found value: %s\n", found_value);
-          printf("looking for: %s\n", value);
+        printf("found value: %s\n", found_value);
+        printf("looking for: %s\n", value);
 #endif
-          if (strcmp(value, found_value) == 0) {
-            if (counter != internal_counter) {
-              internal_counter++;	
-            } else {
-              if (strstr(found_name, name)) {
-		g_free(found_name);
-		g_free(found_value);
-                return(found);
-              }
+        if (strcmp(value, found_value) == 0) {
+          if (counter != internal_counter) {
+            internal_counter++;
+          } else {
+            if (strstr(found_name, name)) {
+              g_free(found_name);
+              g_free(found_value);
+              return a_current;
             }
           }
-	  if (found_name) { g_free(found_name); found_name = NULL; }
-	  if (found_value) { g_free(found_value); found_value = NULL; }
-        }	
-
+        }
+        if (found_name) { g_free(found_name); found_name = NULL; }
+        if (found_value) { g_free(found_value); found_value = NULL; }
       }
+
     }
     a_iter = g_list_next (a_iter);
   }
@@ -1038,7 +972,7 @@ OBJECT *o_attrib_search_attrib_value(GList *list, char *value, char *name,
  *  Counter is the n'th occurance of the attribute, and starts searching
  *  from zero.  Zero is the first occurance of an attribute.
  *
- *  \param [in] list     ATTRIB list to search.
+ *  \param [in] list     attribute OBJECT list to search.
  *  \param [in] name     Character string with attribute name to search for.
  *  \param [in] counter  Which occurance to return.
  *  \return Character string with attribute value, NULL otherwise.
@@ -1049,8 +983,7 @@ OBJECT *o_attrib_search_attrib_value(GList *list, char *value, char *name,
 char *
 o_attrib_search_attrib_name(GList *list, char *name, int counter)
 {
-  OBJECT *found;
-  ATTRIB *a_current;
+  OBJECT *a_current;
   GList *a_iter;
   int val;
   int internal_counter=0;
@@ -1062,30 +995,27 @@ o_attrib_search_attrib_name(GList *list, char *name, int counter)
 
   while(a_iter != NULL) {
     a_current = a_iter->data;
-    found = a_current->object;
-    if (found != NULL) {
-      if (found->type == OBJ_TEXT) {
-        val = o_attrib_get_name_value(found->text->string, 
-                                      &found_name, &found_value);
+    if (a_current->type == OBJ_TEXT) {
+      val = o_attrib_get_name_value(a_current->text->string,
+                                    &found_name, &found_value);
 
-        if (val) {
+      if (val) {
 #if DEBUG
-          printf("found name: %s\n", found_name);
-          printf("looking for: %s\n", name);
+        printf("found name: %s\n", found_name);
+        printf("looking for: %s\n", name);
 #endif
-          if (strcmp(name, found_name) == 0) {
-            if (counter != internal_counter) {
-              internal_counter++;	
-            } else {
-              return_string = g_strdup (found_value);
-	      g_free(found_name);
-	      g_free(found_value);
-              return(return_string);
-            }
+        if (strcmp(name, found_name) == 0) {
+          if (counter != internal_counter) {
+            internal_counter++;
+          } else {
+            return_string = g_strdup (found_value);
+            g_free(found_name);
+            g_free(found_value);
+            return(return_string);
           }
-	  if (found_name) { g_free(found_name); found_name = NULL; }
-	  if (found_value) { g_free(found_value); found_value = NULL; }
-        }	
+        }
+        if (found_name) { g_free(found_name); found_name = NULL; }
+        if (found_value) { g_free(found_value); found_value = NULL; }
       }
     }
     a_iter = g_list_next (a_iter);
@@ -1173,8 +1103,7 @@ char *o_attrib_search_name_single(OBJECT *object, char *name,
 				  OBJECT **return_found) 
 {
   OBJECT *o_current;
-  ATTRIB *a_current;
-  OBJECT *found;
+  OBJECT *a_current;
   GList *a_iter;
   int val;
   char *found_name = NULL;
@@ -1192,35 +1121,32 @@ char *o_attrib_search_name_single(OBJECT *object, char *name,
 
     while(a_iter != NULL) {
       a_current = a_iter->data;
-      found = a_current->object;
-      if (found != NULL) {
-        if (found->type == OBJ_TEXT) {
-          val = o_attrib_get_name_value(found->text->string, 
-					&found_name, &found_value);
+      if (a_current->type == OBJ_TEXT) {
+        val = o_attrib_get_name_value(a_current->text->string,
+                                      &found_name, &found_value);
 
-          if (val) {
-            if (strcmp(name, found_name) == 0) {
-              return_string = g_strdup (found_value);
-              if (return_found) {
-                *return_found = found;
-              }
-	      g_free(found_name);
-	      g_free(found_value);
-              return(return_string);
+        if (val) {
+          if (strcmp(name, found_name) == 0) {
+            return_string = g_strdup (found_value);
+            if (return_found) {
+              *return_found = a_current;
             }
-	    if (found_name) { g_free(found_name); found_name = NULL; }
-	    if (found_value) { g_free(found_value); found_value = NULL; }
+            g_free(found_name);
+            g_free(found_value);
+            return(return_string);
           }
+          if (found_name) { g_free(found_name); found_name = NULL; }
+          if (found_value) { g_free(found_value); found_value = NULL; }
+        }
 
 #if DEBUG
-          printf("0 _%s_\n", found->text->string);
-          printf("1 _%s_\n", found_name);
-          printf("2 _%s_\n", found_value);
+        printf("0 _%s_\n", found->text->string);
+        printf("1 _%s_\n", found_name);
+        printf("2 _%s_\n", found_value);
 #endif
-        }
       }
       a_iter = g_list_next (a_iter);
-    }	
+    }
   }
   /* search for attributes outside */
 
@@ -1242,7 +1168,7 @@ char *o_attrib_search_name_single(OBJECT *object, char *name,
       }
       if (found_name) { g_free(found_name); found_name = NULL; }
       if (found_value) { g_free(found_value); found_value = NULL; }
-    }	
+    }
   }
 
   if (return_found) {
@@ -1252,7 +1178,7 @@ char *o_attrib_search_name_single(OBJECT *object, char *name,
   g_free(found_name);
   g_free(found_value);
   return (NULL);
-} 
+}
 
 /*! \brief Search for N'th occurance of a named attribute.
  *  \par Function Description
@@ -1273,15 +1199,13 @@ char *o_attrib_search_name_single_count(OBJECT *object, char *name,
 					int counter) 
 {
   OBJECT *o_current;
-  ATTRIB *a_current;
-  OBJECT *found=NULL;
+  OBJECT *a_current;
   GList *a_iter;
   int val;
   char *found_name = NULL;
   char *found_value = NULL;
   char *return_string = NULL;
   int internal_counter=0;
-	
 
   o_current = object;
 
@@ -1289,43 +1213,38 @@ char *o_attrib_search_name_single_count(OBJECT *object, char *name,
     return(NULL);
   }
 
-  if (o_current->attribs != NULL) {
-    a_iter = o_current->attribs;
+  a_iter = o_current->attribs;
 
-    while(a_iter != NULL) {
-      a_current = a_iter->data;
-      found = a_current->object;
-      if (found != NULL) {
-        if (found->type == OBJ_TEXT) {
-          val = o_attrib_get_name_value(found->text->string, 
-					&found_name, &found_value);
+  while(a_iter != NULL) {
+    a_current = a_iter->data;
+    if (a_current->type == OBJ_TEXT) {
+      val = o_attrib_get_name_value(a_current->text->string,
+                                    &found_name, &found_value);
 
-          if (val) {
-            if (strcmp(name, found_name) == 0) {
-              if (counter != internal_counter) {
-                internal_counter++;
-              } else {
-                return_string = g_strdup (found_value);
-		g_free(found_name);
-		g_free(found_value);
-                return(return_string);
-              }
-            }
-            if (found_name) { g_free(found_name); found_name = NULL; }
-            if (found_value) { g_free(found_value); found_value = NULL; }
+      if (val) {
+        if (strcmp(name, found_name) == 0) {
+          if (counter != internal_counter) {
+            internal_counter++;
+          } else {
+            return_string = g_strdup (found_value);
+            g_free(found_name);
+            g_free(found_value);
+            return(return_string);
           }
-
-#if DEBUG 
-          printf("0 _%s_\n", found->text->string);
-          printf("1 _%s_\n", found_name);
-          printf("2 _%s_\n", found_value);
-#endif
         }
+        if (found_name) { g_free(found_name); found_name = NULL; }
+        if (found_value) { g_free(found_value); found_value = NULL; }
       }
-      a_iter = g_list_next (a_iter);
-    }	
 
+#if DEBUG
+      printf("0 _%s_\n", a_current->text->string);
+      printf("1 _%s_\n", found_name);
+      printf("2 _%s_\n", found_value);
+#endif
+    }
+    a_iter = g_list_next (a_iter);
   }
+
   /* search for attributes outside */
 
   if (o_current->type == OBJ_TEXT) {
@@ -1353,7 +1272,7 @@ char *o_attrib_search_name_single_count(OBJECT *object, char *name,
   g_free(found_name);
   g_free(found_value);
   return (NULL);
-} 
+}
 
 /*! \brief Search for slot attribute.
  *  \par Function Description
@@ -1807,8 +1726,7 @@ OBJECT ** o_attrib_return_attribs(OBJECT *object_list, OBJECT *sel_object)
   OBJECT **found_objects;
   int num_attribs=0;
   int i=0;
-  ATTRIB *a_current;	
-  OBJECT *o_current;
+  OBJECT *a_current;
   OBJECT *object;
   GList *a_iter;
 
@@ -1827,13 +1745,10 @@ OBJECT ** o_attrib_return_attribs(OBJECT *object_list, OBJECT *sel_object)
   a_iter = object->attribs;
   while(a_iter != NULL) {
     a_current = a_iter->data;
-    if (a_current->object != NULL) {
-      o_current = a_current->object;
-      if (o_current->type == OBJ_TEXT && 
-          o_current->text->string) {
-        found_objects[i] = o_current;
-        i++;
-      }
+    if (a_current->type == OBJ_TEXT &&
+        a_current->text->string) {
+      found_objects[i] = a_current;
+      i++;
     }
     a_iter = g_list_next (a_iter);
   }
diff --git a/libgeda/src/o_bus_basic.c b/libgeda/src/o_bus_basic.c
index 3f92618..3b2cfca 100644
--- a/libgeda/src/o_bus_basic.c
+++ b/libgeda/src/o_bus_basic.c
@@ -369,7 +369,7 @@ void o_bus_consolidate_lowlevel(OBJECT *object, OBJECT *del_object,
   int final1, final2;
   int changed=0;
   GList *a_iter;
-  ATTRIB *a_current;
+  OBJECT *a_current;
 
 #if DEBUG
   printf("o %d %d %d %d\n", object->line->x[0], object->line->y[0], object->line->x[1], object->line->y[1]);
@@ -429,7 +429,7 @@ void o_bus_consolidate_lowlevel(OBJECT *object, OBJECT *del_object,
     a_iter = del_object->attribs;
     while (a_iter != NULL) {
       a_current = a_iter->data;
-      a_current->object->attached_to = object;
+      a_current->attached_to = object;
       a_iter = g_list_next (a_iter);
     }
 
diff --git a/libgeda/src/o_net_basic.c b/libgeda/src/o_net_basic.c
index caf49ac..3cb9038 100644
--- a/libgeda/src/o_net_basic.c
+++ b/libgeda/src/o_net_basic.c
@@ -380,7 +380,7 @@ void o_net_consolidate_lowlevel(OBJECT *object, OBJECT *del_object,
   int final1, final2;
   int changed = 0;
   GList *a_iter;
-  ATTRIB *a_current;
+  OBJECT *a_current;
 
 #if DEBUG
   printf("o %d %d %d %d\n", object->line->x[0], object->line->y[0],
@@ -435,7 +435,7 @@ void o_net_consolidate_lowlevel(OBJECT *object, OBJECT *del_object,
     a_iter = del_object->attribs;
     while (a_iter != NULL) {
       a_current = a_iter->data;
-      a_current->object->attached_to = object;
+      a_current->attached_to = object;
       a_iter = g_list_next (a_iter);
     }
 




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