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

gEDA-cvs: gaf.git: branch: master updated (1.5.2-20090328-61-g4aa6cd6)



The branch, master has been updated
       via  4aa6cd61c253046806a5818bd6fd8be87296d634 (commit)
       via  a9d64bf7db382ed3c6ac2b89e0434af80bc1e19c (commit)
       via  047a3ecad3fe1bcd98c6eb209134772cd894fe6c (commit)
      from  d3bd67e8ccb5ed47f17603392f480f220380daa5 (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_attrib.c              |    3 +-
 gschem/src/g_hook.c                 |    5 ++-
 gschem/src/i_callbacks.c            |   10 +++++---
 gschem/src/o_arc.c                  |    2 +-
 gschem/src/o_attrib.c               |    8 +++---
 gschem/src/o_box.c                  |    2 +-
 gschem/src/o_bus.c                  |    2 +-
 gschem/src/o_circle.c               |    2 +-
 gschem/src/o_delete.c               |    2 +-
 gschem/src/o_line.c                 |    2 +-
 gschem/src/o_misc.c                 |    7 +++--
 gschem/src/o_net.c                  |   10 ++++----
 gschem/src/o_picture.c              |    2 +-
 gschem/src/o_pin.c                  |    2 +-
 gschem/src/o_place.c                |    5 ++-
 gschem/src/o_select.c               |   17 +++++++++-----
 gschem/src/o_slot.c                 |    5 ++-
 gschem/src/o_undo.c                 |    2 +-
 gschem/src/x_autonumber.c           |   18 ++++++++++-----
 gschem/src/x_dialog.c               |    2 +-
 gschem/src/x_multiattrib.c          |    6 +++-
 gschem/src/x_preview.c              |    2 +-
 libgeda/include/libgeda/prototype.h |   21 ++++++++---------
 libgeda/src/f_basic.c               |    4 +-
 libgeda/src/o_attrib.c              |   40 +++++++----------------------------
 libgeda/src/o_list.c                |    8 +++---
 libgeda/src/o_net_basic.c           |    8 +++---
 libgeda/src/o_pin_basic.c           |    4 +-
 libgeda/src/o_selection.c           |   12 +++++-----
 libgeda/src/s_basic.c               |    5 +--
 libgeda/src/s_page.c                |    6 ++--
 31 files changed, 109 insertions(+), 115 deletions(-)


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

commit 4aa6cd61c253046806a5818bd6fd8be87296d634
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    Pass the OBJECT having its attribs removed to o_attrib_detach_all()
    
    This function only worked correctly when passed an OBJECT.attribs
    GList, so it makes more sense to just pass the OBJECT whos attributes
    should be detached. The function can then set the OBEJCT.attribs to
    NULL, ensuring the OBJECT stays in a consistent state.

:100644 100644 1ecd9f8... 2c3a7ec... M	gschem/src/i_callbacks.c
:100644 100644 0f54b25... b4013ee... M	libgeda/include/libgeda/prototype.h
:100644 100644 b4b458a... d88a472... M	libgeda/src/o_attrib.c
:100644 100644 05f1d02... a77008c... M	libgeda/src/s_basic.c

commit a9d64bf7db382ed3c6ac2b89e0434af80bc1e19c
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    Add TOPLEVEL parameter to some libgeda APIs
    
    For consistency with other libgeda functions, and in order to allow
    these functions to call others which require the toplevel parameter.

:100644 100644 6704812... 5ba17b2... M	gschem/src/g_hook.c
:100644 100644 e5bfa4a... 1ecd9f8... M	gschem/src/i_callbacks.c
:100644 100644 5a11ab2... 594796e... M	gschem/src/o_arc.c
:100644 100644 828341d... f8c4ccf... M	gschem/src/o_attrib.c
:100644 100644 a24bbf3... 8c5207b... M	gschem/src/o_box.c
:100644 100644 559048c... 70d90ff... M	gschem/src/o_bus.c
:100644 100644 33aece6... 5f91cef... M	gschem/src/o_circle.c
:100644 100644 84d04a0... 0c0796c... M	gschem/src/o_delete.c
:100644 100644 c01c99d... 913bb85... M	gschem/src/o_line.c
:100644 100644 8d69bc6... cacfe02... M	gschem/src/o_misc.c
:100644 100644 48da07c... cd738ff... M	gschem/src/o_net.c
:100644 100644 8edcf2d... 07e137e... M	gschem/src/o_picture.c
:100644 100644 9162551... 28866e0... M	gschem/src/o_pin.c
:100644 100644 622af0e... de27598... M	gschem/src/o_place.c
:100644 100644 e8338d6... d9153f0... M	gschem/src/o_select.c
:100644 100644 a0a4c68... 4dd9fc2... M	gschem/src/o_slot.c
:100644 100644 83aa17b... 6465794... M	gschem/src/o_undo.c
:100644 100644 950bc86... 9c07a49... M	gschem/src/x_autonumber.c
:100644 100644 6f19c6c... fdb79a4... M	gschem/src/x_dialog.c
:100644 100644 b10899d... 5e764eb... M	gschem/src/x_multiattrib.c
:100644 100644 ad02636... a9c87f1... M	gschem/src/x_preview.c
:100644 100644 9d9abf9... 0f54b25... M	libgeda/include/libgeda/prototype.h
:100644 100644 0cf7640... a4ec639... M	libgeda/src/f_basic.c
:100644 100644 b4b068f... b4b458a... M	libgeda/src/o_attrib.c
:100644 100644 242dbc9... 5ae3127... M	libgeda/src/o_list.c
:100644 100644 3345cda... 1891304... M	libgeda/src/o_net_basic.c
:100644 100644 e1573ae... 4e5b594... M	libgeda/src/o_pin_basic.c
:100644 100644 95818ad... df4e144... M	libgeda/src/o_selection.c
:100644 100644 a53e816... 05f1d02... M	libgeda/src/s_basic.c
:100644 100644 feef956... 7f62681... M	libgeda/src/s_page.c

commit 047a3ecad3fe1bcd98c6eb209134772cd894fe6c
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    Remove o_attrib_search_numslots(), instead call the attribute API directly

:100644 100644 6e5a485... 5f69e9c... M	gattrib/src/s_attrib.c
:100644 100644 425f7c2... a0a4c68... M	gschem/src/o_slot.c
:100644 100644 e9a9726... 950bc86... M	gschem/src/x_autonumber.c
:100644 100644 ff31336... 9d9abf9... M	libgeda/include/libgeda/prototype.h
:100644 100644 236540d... b4b068f... M	libgeda/src/o_attrib.c

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

commit 4aa6cd61c253046806a5818bd6fd8be87296d634
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    Pass the OBJECT having its attribs removed to o_attrib_detach_all()
    
    This function only worked correctly when passed an OBJECT.attribs
    GList, so it makes more sense to just pass the OBJECT whos attributes
    should be detached. The function can then set the OBEJCT.attribs to
    NULL, ensuring the OBJECT stays in a consistent state.

diff --git a/gschem/src/i_callbacks.c b/gschem/src/i_callbacks.c
index 1ecd9f8..2c3a7ec 100644
--- a/gschem/src/i_callbacks.c
+++ b/gschem/src/i_callbacks.c
@@ -3140,8 +3140,7 @@ DEFINE_I_CALLBACK(attributes_detach)
     o_current = (OBJECT *) s_current->data;
     if (o_current) {
       if (o_current->attribs) {
-        o_attrib_detach_all (w_current->toplevel, o_current->attribs);
-        o_current->attribs = NULL;
+        o_attrib_detach_all (w_current->toplevel, o_current);
         w_current->toplevel->page_current->CHANGED=1;
       }
     }
diff --git a/libgeda/include/libgeda/prototype.h b/libgeda/include/libgeda/prototype.h
index 0f54b25..b4013ee 100644
--- a/libgeda/include/libgeda/prototype.h
+++ b/libgeda/include/libgeda/prototype.h
@@ -97,7 +97,7 @@ void o_attrib_add(TOPLEVEL *toplevel, OBJECT *object, OBJECT *item);
 gboolean o_attrib_is_attached (TOPLEVEL *toplevel, OBJECT *attrib, OBJECT *object);
 void o_attrib_attach(TOPLEVEL *toplevel, OBJECT *attrib, OBJECT *object, int set_color);
 void o_attrib_attach_list(TOPLEVEL *toplevel, GList *attr_list, OBJECT *object, int set_color);
-void o_attrib_detach_all(TOPLEVEL *toplevel, GList *list);
+void o_attrib_detach_all(TOPLEVEL *toplevel, OBJECT *object);
 void o_attrib_print(GList *attributes);
 void o_attrib_remove(TOPLEVEL *toplevel, GList **list, OBJECT *remove);
 gboolean o_attrib_string_get_name_value (const gchar *string, gchar **name_ptr, gchar **value_ptr);
diff --git a/libgeda/src/o_attrib.c b/libgeda/src/o_attrib.c
index b4b458a..d88a472 100644
--- a/libgeda/src/o_attrib.c
+++ b/libgeda/src/o_attrib.c
@@ -185,30 +185,26 @@ void o_attrib_attach_list (TOPLEVEL *toplevel,
 
 /*! \brief Detach all attribute items in a list.
  *  \par Function Description
- *  Detach all attribute items in a list.
- *
- *  \note The passed GList is freed by this function
- *        The attributes being detached are _not_ removed
- *        from any other GList, so it only makes sense to
- *        call this function with some (OBJECT *)->attribs.
+ *  Detach all attributes from an object.
  *
  *  \param [in]     toplevel  The TOPLEVEL object.
- *  \param [in,out] list       The list to free.
- *
+ *  \param [in,out] object    The object whos attributes to detach.
  */
-void o_attrib_detach_all(TOPLEVEL *toplevel, GList *list)
+void o_attrib_detach_all(TOPLEVEL *toplevel, OBJECT *object)
 {
   OBJECT *a_current;
   GList *a_iter;
 
-  for (a_iter = list; a_iter != NULL;
+  for (a_iter = object->attribs; a_iter != NULL;
        a_iter = g_list_next (a_iter)) {
     a_current = a_iter->data;
 
     a_current->attached_to = NULL;
     o_attrib_set_color (toplevel, a_current, DETACHED_ATTRIBUTE_COLOR);
   }
-  g_list_free (list);
+
+  g_list_free (object->attribs);
+  object->attribs = NULL;
 }
 
 /*! \brief Print all attributes to a Postscript document.
diff --git a/libgeda/src/s_basic.c b/libgeda/src/s_basic.c
index 05f1d02..a77008c 100644
--- a/libgeda/src/s_basic.c
+++ b/libgeda/src/s_basic.c
@@ -312,8 +312,7 @@ s_delete_object(TOPLEVEL *toplevel, OBJECT *o_current)
       o_current->complex = NULL;
     }
 
-    o_attrib_detach_all (toplevel, o_current->attribs);
-    o_current->attribs = NULL;
+    o_attrib_detach_all (toplevel, o_current);
 
     g_free(o_current);	/* assuming it is not null */
 

commit a9d64bf7db382ed3c6ac2b89e0434af80bc1e19c
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    Add TOPLEVEL parameter to some libgeda APIs
    
    For consistency with other libgeda functions, and in order to allow
    these functions to call others which require the toplevel parameter.

diff --git a/gschem/src/g_hook.c b/gschem/src/g_hook.c
index 6704812..5ba17b2 100644
--- a/gschem/src/g_hook.c
+++ b/gschem/src/g_hook.c
@@ -703,8 +703,9 @@ SCM g_add_component(SCM page_smob, SCM scm_comp_name, SCM scm_x, SCM scm_y,
 
   new_obj = o_complex_new (toplevel, 'C', DEFAULT_COLOR, x, y, angle, mirror,
                            clib, comp_name, selectable);
-  s_page_append_list (page, o_complex_promote_attribs (toplevel, new_obj));
-  s_page_append (page, new_obj);
+  s_page_append_list (toplevel, page,
+                      o_complex_promote_attribs (toplevel, new_obj));
+  s_page_append (toplevel, page, new_obj);
   
   /* 
    * For now, do not redraw the newly added complex, since this might cause
diff --git a/gschem/src/i_callbacks.c b/gschem/src/i_callbacks.c
index e5bfa4a..1ecd9f8 100644
--- a/gschem/src/i_callbacks.c
+++ b/gschem/src/i_callbacks.c
@@ -1075,6 +1075,7 @@ DEFINE_I_CALLBACK(edit_unembed)
 DEFINE_I_CALLBACK(edit_update)
 {
   GSCHEM_TOPLEVEL *w_current = (GSCHEM_TOPLEVEL*) data;
+  TOPLEVEL *toplevel = w_current->toplevel;
   OBJECT *o_current;
   GList* selection_copy;
   GList* s_current;
@@ -1092,7 +1093,8 @@ DEFINE_I_CALLBACK(edit_update)
     /* left selected. */
 
     /* g_list_copy does a shallow copy which is exactly what we need here */
-    selection_copy = g_list_copy( geda_list_get_glist( w_current->toplevel->page_current->selection_list ));
+    selection_copy = g_list_copy (
+              geda_list_get_glist (toplevel->page_current->selection_list));
     s_current = selection_copy;
     while (s_current != NULL) {
       o_current = (OBJECT *) s_current->data;
@@ -1103,7 +1105,8 @@ DEFINE_I_CALLBACK(edit_update)
       else
       {
         /* object was not a OBJ_COMPLEX, so unselect it. */
-        o_selection_remove( w_current->toplevel->page_current->selection_list, o_current);
+        o_selection_remove (toplevel,
+                            toplevel->page_current->selection_list, o_current);
       }
       s_current = g_list_next(s_current);
     }
diff --git a/gschem/src/o_arc.c b/gschem/src/o_arc.c
index 5a11ab2..594796e 100644
--- a/gschem/src/o_arc.c
+++ b/gschem/src/o_arc.c
@@ -221,7 +221,7 @@ void o_arc_end4(GSCHEM_TOPLEVEL *w_current, int radius,
   new_obj = o_arc_new (toplevel, OBJ_ARC, GRAPHIC_COLOR,
                        w_current->first_wx, w_current->first_wy,
                        radius, start_angle, end_angle);
-  s_page_append (toplevel->page_current, new_obj);
+  s_page_append (toplevel, toplevel->page_current, new_obj);
 
   /* draw the new object */
   o_invalidate (w_current, new_obj);
diff --git a/gschem/src/o_attrib.c b/gschem/src/o_attrib.c
index 828341d..f8c4ccf 100644
--- a/gschem/src/o_attrib.c
+++ b/gschem/src/o_attrib.c
@@ -63,7 +63,7 @@ void o_attrib_add_selected(GSCHEM_TOPLEVEL *w_current, SELECTION *selection,
 
     /* make sure object isn't selected already */
     if (a_current->saved_color == -1) {
-      o_selection_add(selection, a_current);
+      o_selection_add (w_current->toplevel, selection, a_current);
       o_invalidate (w_current, a_current);
     }
   }
@@ -92,7 +92,7 @@ void o_attrib_remove_selected_invisible (GSCHEM_TOPLEVEL *w_current,
     if (!w_current->toplevel->show_hidden_text &&
         a_current->visibility == INVISIBLE &&
         a_current->selected) {
-      o_selection_remove (selection, a_current);
+      o_selection_remove (w_current->toplevel, selection, a_current);
       o_invalidate (w_current, a_current);
     }
   }
@@ -261,7 +261,7 @@ OBJECT *o_attrib_add_attrib(GSCHEM_TOPLEVEL *w_current,
              LOWER_LEFT, 0, /* zero is angle */
              text_string,  w_current->text_size,  /* current text size */
              visibility, show_name_value);
-  s_page_append (toplevel->page_current, new_obj);
+  s_page_append (toplevel, toplevel->page_current, new_obj);
 
   /* now attach the attribute to the object (if o_current is not NULL) */
   /* remember that o_current contains the object to get the attribute */
@@ -269,7 +269,7 @@ OBJECT *o_attrib_add_attrib(GSCHEM_TOPLEVEL *w_current,
     o_attrib_attach (toplevel, new_obj, o_current, FALSE);
   }
 
-  o_selection_add (toplevel->page_current->selection_list, new_obj);
+  o_selection_add (toplevel, toplevel->page_current->selection_list, new_obj);
 
   o_invalidate (w_current, new_obj);
 
diff --git a/gschem/src/o_box.c b/gschem/src/o_box.c
index a24bbf3..8c5207b 100644
--- a/gschem/src/o_box.c
+++ b/gschem/src/o_box.c
@@ -476,7 +476,7 @@ void o_box_end(GSCHEM_TOPLEVEL *w_current, int w_x, int w_y)
   new_obj = o_box_new (toplevel, OBJ_BOX, GRAPHIC_COLOR,
                        box_left, box_top,
                        box_left + box_width, box_top - box_height);
-  s_page_append (toplevel->page_current, new_obj);
+  s_page_append (toplevel, toplevel->page_current, new_obj);
 
   /* draw it */
   o_invalidate (w_current, new_obj);
diff --git a/gschem/src/o_bus.c b/gschem/src/o_bus.c
index 559048c..70d90ff 100644
--- a/gschem/src/o_bus.c
+++ b/gschem/src/o_bus.c
@@ -203,7 +203,7 @@ int o_bus_end(GSCHEM_TOPLEVEL *w_current, int w_x, int w_y)
   new_obj = o_bus_new(toplevel, OBJ_BUS, color,
                       w_current->first_wx, w_current->first_wy,
                       w_current->second_wx, w_current->second_wy, 0);
-  s_page_append (toplevel->page_current, new_obj);
+  s_page_append (toplevel, toplevel->page_current, new_obj);
 
   o_invalidate (w_current, new_obj);
 
diff --git a/gschem/src/o_circle.c b/gschem/src/o_circle.c
index 33aece6..5f91cef 100644
--- a/gschem/src/o_circle.c
+++ b/gschem/src/o_circle.c
@@ -455,7 +455,7 @@ void o_circle_end(GSCHEM_TOPLEVEL *w_current, int w_x, int w_y)
   new_obj = o_circle_new (toplevel, OBJ_CIRCLE, GRAPHIC_COLOR,
                           w_current->first_wx, w_current->first_wy,
                           w_current->distance);
-  s_page_append (toplevel->page_current, new_obj);
+  s_page_append (toplevel, toplevel->page_current, new_obj);
 
   /* draw it */
   o_invalidate (w_current, new_obj);
diff --git a/gschem/src/o_delete.c b/gschem/src/o_delete.c
index 84d04a0..0c0796c 100644
--- a/gschem/src/o_delete.c
+++ b/gschem/src/o_delete.c
@@ -67,7 +67,7 @@ void o_delete (GSCHEM_TOPLEVEL *w_current, OBJECT *object)
   }
   o_invalidate (w_current, object);
 
-  s_page_remove (toplevel->page_current, object);
+  s_page_remove (toplevel, toplevel->page_current, object);
   s_delete_object (toplevel, object);
 
   toplevel->page_current->CHANGED = 1;
diff --git a/gschem/src/o_line.c b/gschem/src/o_line.c
index c01c99d..913bb85 100644
--- a/gschem/src/o_line.c
+++ b/gschem/src/o_line.c
@@ -186,7 +186,7 @@ void o_line_end(GSCHEM_TOPLEVEL *w_current, int w_x, int w_y)
   new_obj = o_line_new (toplevel, OBJ_LINE, GRAPHIC_COLOR,
                         w_current->first_wx, w_current->first_wy,
                         w_current->second_wx, w_current->second_wy);
-  s_page_append (toplevel->page_current, new_obj);
+  s_page_append (toplevel, toplevel->page_current, new_obj);
 
   /* draw it */
   o_invalidate (w_current, new_obj);
diff --git a/gschem/src/o_misc.c b/gschem/src/o_misc.c
index 8d69bc6..cacfe02 100644
--- a/gschem/src/o_misc.c
+++ b/gschem/src/o_misc.c
@@ -707,7 +707,8 @@ void o_update_component(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current)
   /* delete its connections */
   s_conn_remove_object (toplevel, o_current);
   /* and unselect it */
-  o_selection_remove( toplevel->page_current->selection_list, o_current);
+  o_selection_remove (toplevel,
+                      toplevel->page_current->selection_list, o_current);
 
   new_complex = o_complex_new (toplevel, OBJ_COMPLEX, DEFAULT_COLOR,
                                o_current->complex->x,
@@ -766,7 +767,7 @@ void o_update_component(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current)
 
       /* make a copy of the attribute object */
       o_attrib = o_object_copy (toplevel, a_current, NORMAL_FLAG);
-      s_page_append (toplevel->page_current, o_attrib);
+      s_page_append (toplevel, toplevel->page_current, o_attrib);
       /* add the attribute to old */
       o_attrib_add (toplevel, o_current, o_attrib);
       /* redraw the attribute object */
@@ -791,7 +792,7 @@ void o_update_component(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current)
 
   /* reconnect, re-select and redraw */
   s_conn_update_object (toplevel, o_current);
-  o_selection_add( toplevel->page_current->selection_list, o_current );
+  o_selection_add (toplevel, toplevel->page_current->selection_list, o_current);
   o_invalidate (w_current, o_current);
 
   /* Re-flag as embedded if necessary */
diff --git a/gschem/src/o_net.c b/gschem/src/o_net.c
index 48da07c..cd738ff 100644
--- a/gschem/src/o_net.c
+++ b/gschem/src/o_net.c
@@ -618,7 +618,7 @@ int o_net_end(GSCHEM_TOPLEVEL *w_current, int w_x, int w_y)
       new_net = o_net_new(toplevel, OBJ_NET, color,
                           w_current->first_wx, w_current->first_wy,
                           w_current->second_wx, w_current->second_wy);
-      s_page_append (toplevel->page_current, new_net);
+      s_page_append (toplevel, toplevel->page_current, new_net);
 
       /* conn stuff */
       /* LEAK CHECK 1 */
@@ -669,7 +669,7 @@ int o_net_end(GSCHEM_TOPLEVEL *w_current, int w_x, int w_y)
       new_net = o_net_new(toplevel, OBJ_NET, color,
                           w_current->second_wx, w_current->second_wy,
                           w_current->third_wx, w_current->third_wy);
-      s_page_append (toplevel->page_current, new_net);
+      s_page_append (toplevel, toplevel->page_current, new_net);
 
       /* conn stuff */
       /* LEAK CHECK 2 */
@@ -1178,7 +1178,7 @@ int o_net_add_busrippers(GSCHEM_TOPLEVEL *w_current, OBJECT *net_obj,
         new_obj = o_net_new(toplevel, OBJ_NET, color,
                   rippers[i].x[0], rippers[i].y[0],
                   rippers[i].x[1], rippers[i].y[1]);
-        s_page_append (toplevel->page_current, new_obj);
+        s_page_append (toplevel, toplevel->page_current, new_obj);
       } else {
 
         if (rippersym != NULL) {
@@ -1187,9 +1187,9 @@ int o_net_add_busrippers(GSCHEM_TOPLEVEL *w_current, OBJECT *net_obj,
                                    complex_angle, 0,
                                    rippersym,
                                    toplevel->bus_ripper_symname, 1);
-          s_page_append_list (toplevel->page_current,
+          s_page_append_list (toplevel, toplevel->page_current,
                               o_complex_promote_attribs (toplevel, new_obj));
-          s_page_append (toplevel->page_current, new_obj);
+          s_page_append (toplevel, toplevel->page_current, new_obj);
 
           o_invalidate (w_current, new_obj);
         } else {
diff --git a/gschem/src/o_picture.c b/gschem/src/o_picture.c
index 8edcf2d..07e137e 100644
--- a/gschem/src/o_picture.c
+++ b/gschem/src/o_picture.c
@@ -110,7 +110,7 @@ void o_picture_end(GSCHEM_TOPLEVEL *w_current, int w_x, int w_y)
                           picture_left + picture_width,
                           picture_top - picture_height,
                           0, FALSE, FALSE);
-  s_page_append (toplevel->page_current, new_obj);
+  s_page_append (toplevel, toplevel->page_current, new_obj);
 
   /* draw it */
   o_invalidate (w_current, new_obj);
diff --git a/gschem/src/o_pin.c b/gschem/src/o_pin.c
index 9162551..28866e0 100644
--- a/gschem/src/o_pin.c
+++ b/gschem/src/o_pin.c
@@ -157,7 +157,7 @@ void o_pin_end(GSCHEM_TOPLEVEL *w_current, int x, int y)
                       w_current->first_wx, w_current->first_wy,
                       w_current->second_wx, w_current->second_wy,
                       PIN_TYPE_NET, 0);
-  s_page_append (toplevel->page_current, new_obj);
+  s_page_append (toplevel, toplevel->page_current, new_obj);
 
   o_current = o_current_pin = new_obj;
 
diff --git a/gschem/src/o_place.c b/gschem/src/o_place.c
index 622af0e..de27598 100644
--- a/gschem/src/o_place.c
+++ b/gschem/src/o_place.c
@@ -99,9 +99,10 @@ void o_place_end (GSCHEM_TOPLEVEL *w_current,
   for (iter = temp_dest_list; iter != NULL; iter = g_list_next (iter)) {
     o_current = iter->data;
 
-    s_page_append (p_current, o_current);
+    s_page_append (toplevel, p_current, o_current);
 
-    o_selection_add (toplevel->page_current->selection_list, o_current);
+    o_selection_add (toplevel,
+                     toplevel->page_current->selection_list, o_current);
 
     /* Update object connectivity */
     s_conn_update_object (toplevel, o_current);
diff --git a/gschem/src/o_select.c b/gschem/src/o_select.c
index e8338d6..d9153f0 100644
--- a/gschem/src/o_select.c
+++ b/gschem/src/o_select.c
@@ -172,7 +172,8 @@ void o_select_object(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current,
 
       /* object not select, add it to the selection list */
       o_select_run_hooks( w_current, o_current, 1 );
-      o_selection_add( toplevel->page_current->selection_list, o_current);
+      o_selection_add (toplevel,
+                       toplevel->page_current->selection_list, o_current);
 
       break;
 
@@ -187,7 +188,8 @@ void o_select_object(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current,
           /* result: remove object from selection */
           if (type != MULTIPLE) {
             o_select_run_hooks( w_current, o_current, 0 );
-            o_selection_remove( toplevel->page_current->selection_list, o_current );
+            o_selection_remove (toplevel, toplevel->page_current->
+                                            selection_list, o_current);
             removing_obj = 1;
           }
 
@@ -205,7 +207,8 @@ void o_select_object(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current,
             o_select_unselect_list( w_current, toplevel->page_current->selection_list );
 
             o_select_run_hooks( w_current, o_current, 1 );
-            o_selection_add( toplevel->page_current->selection_list, o_current);
+            o_selection_add (toplevel,
+                             toplevel->page_current->selection_list, o_current);
           }	
 
           /* condition: doing single object add */
@@ -217,12 +220,14 @@ void o_select_object(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current,
             o_select_unselect_list( w_current, toplevel->page_current->selection_list );
 
             o_select_run_hooks (w_current, o_current, 1);
-            o_selection_add( toplevel->page_current->selection_list, o_current);
+            o_selection_add (toplevel, toplevel->page_current->
+                                         selection_list, o_current);
           }
 
           if (CONTROLKEY) {
             o_select_run_hooks(w_current, o_current, 0);
-            o_selection_remove( toplevel->page_current->selection_list, o_current);
+            o_selection_remove (toplevel, toplevel->page_current->
+                                            selection_list, o_current);
             removing_obj = 1;
           }
 
@@ -513,7 +518,7 @@ void o_select_unselect_list(GSCHEM_TOPLEVEL *w_current, SELECTION *selection)
   const GList *list = geda_list_get_glist( selection );
 
   while ( list != NULL ) {
-    o_selection_unselect( (OBJECT *)list->data );
+    o_selection_unselect (w_current->toplevel, (OBJECT *)list->data);
     o_invalidate (w_current, (OBJECT *)list->data);
    list = g_list_next( list );
   }
diff --git a/gschem/src/o_slot.c b/gschem/src/o_slot.c
index a0a4c68..4dd9fc2 100644
--- a/gschem/src/o_slot.c
+++ b/gschem/src/o_slot.c
@@ -149,7 +149,7 @@ void o_slot_end(GSCHEM_TOPLEVEL *w_current, const char *string, int len)
                             object->complex->x, object->complex->y,
                             LOWER_LEFT, 0, /* zero is angle */
                             string, 10, INVISIBLE, SHOW_NAME_VALUE);
-      s_page_append (toplevel->page_current, new_obj);
+      s_page_append (toplevel, toplevel->page_current, new_obj);
 
       /* manually attach attribute */
       o_attrib_attach (toplevel, new_obj, object, FALSE);
diff --git a/gschem/src/o_undo.c b/gschem/src/o_undo.c
index 83aa17b..6465794 100644
--- a/gschem/src/o_undo.c
+++ b/gschem/src/o_undo.c
@@ -373,7 +373,7 @@ void o_undo_callback(GSCHEM_TOPLEVEL *w_current, int type)
 
     s_page_delete_objects (toplevel, toplevel->page_current);
 
-    s_page_append_list (toplevel->page_current,
+    s_page_append_list (toplevel, toplevel->page_current,
                         o_glist_copy_all (toplevel, u_current->object_list,
                                           NULL, NORMAL_FLAG));
 
diff --git a/gschem/src/x_autonumber.c b/gschem/src/x_autonumber.c
index 950bc86..9c07a49 100644
--- a/gschem/src/x_autonumber.c
+++ b/gschem/src/x_autonumber.c
@@ -589,10 +589,12 @@ void autonumber_remove_number(AUTONUMBER_TEXT * autotext, OBJECT *o_current)
     if (o_parent != NULL) {
       slot_str = o_attrib_search_slot(o_parent, &o_slot);
       if (slot_str != NULL && o_slot != NULL) {
-	g_free(slot_str);
-	/* delete the slot attribute */
-	o_selection_remove (autotext->w_current->toplevel->page_current->selection_list, o_slot);
-	o_delete (autotext->w_current, o_slot);
+        g_free(slot_str);
+        /* delete the slot attribute */
+        o_selection_remove (autotext->w_current->toplevel,
+                            autotext->w_current->toplevel->
+                              page_current->selection_list, o_slot);
+        o_delete (autotext->w_current, o_slot);
       }
     }
   }
diff --git a/gschem/src/x_dialog.c b/gschem/src/x_dialog.c
index 6f19c6c..fdb79a4 100644
--- a/gschem/src/x_dialog.c
+++ b/gschem/src/x_dialog.c
@@ -4362,7 +4362,7 @@ void x_dialog_edit_pin_type (GSCHEM_TOPLEVEL *w_current, const GList *obj_list)
           changed_anything = TRUE;
           o_invalidate (w_current, object);
           s_conn_remove_object (w_current->toplevel, object);
-          o_pin_set_type (object, new_type);
+          o_pin_set_type (w_current->toplevel, object, new_type);
           s_conn_update_object (w_current->toplevel, object);
           o_invalidate (w_current, object);
         }
diff --git a/gschem/src/x_multiattrib.c b/gschem/src/x_multiattrib.c
index b10899d..5e764eb 100644
--- a/gschem/src/x_multiattrib.c
+++ b/gschem/src/x_multiattrib.c
@@ -675,7 +675,7 @@ static void multiattrib_action_promote_attribute (GSCHEM_TOPLEVEL *w_current,
   } else {
       /* make a copy of the attribute object */
       o_new = o_object_copy (toplevel, o_attrib, NORMAL_FLAG);
-      s_page_append (toplevel->page_current, o_new);
+      s_page_append (toplevel, toplevel->page_current, o_new);
       /* add the attribute its parent */
       o_attrib_attach (toplevel, o_new, object, TRUE);
       /* redraw the attribute object */
@@ -695,7 +695,9 @@ static void multiattrib_action_delete_attribute(GSCHEM_TOPLEVEL *w_current,
 						OBJECT *o_attrib) 
 {
   /* actually deletes the attribute */
-  o_selection_remove ( w_current->toplevel->page_current->selection_list, o_attrib);
+  o_selection_remove (w_current->toplevel,
+                      w_current->toplevel->page_current->selection_list,
+                      o_attrib);
   o_delete (w_current, o_attrib);
   w_current->toplevel->page_current->CHANGED=1;
   o_undo_savestate (w_current, UNDO_ALL);
diff --git a/gschem/src/x_preview.c b/gschem/src/x_preview.c
index ad02636..a9c87f1 100644
--- a/gschem/src/x_preview.c
+++ b/gschem/src/x_preview.c
@@ -217,7 +217,7 @@ preview_update (Preview *preview)
     if (preview->buffer != NULL) {
 
       /* Load the data buffer */
-      s_page_append_list (preview_toplevel->page_current,
+      s_page_append_list (preview_toplevel, preview_toplevel->page_current,
                           o_read_buffer (preview_toplevel,
                                          NULL, preview->buffer, -1,
                                          _("Preview Buffer")));
diff --git a/libgeda/include/libgeda/prototype.h b/libgeda/include/libgeda/prototype.h
index 9d9abf9..0f54b25 100644
--- a/libgeda/include/libgeda/prototype.h
+++ b/libgeda/include/libgeda/prototype.h
@@ -99,7 +99,7 @@ void o_attrib_attach(TOPLEVEL *toplevel, OBJECT *attrib, OBJECT *object, int set
 void o_attrib_attach_list(TOPLEVEL *toplevel, GList *attr_list, OBJECT *object, int set_color);
 void o_attrib_detach_all(TOPLEVEL *toplevel, GList *list);
 void o_attrib_print(GList *attributes);
-void o_attrib_remove(GList **list, OBJECT *remove);
+void o_attrib_remove(TOPLEVEL *toplevel, GList **list, OBJECT *remove);
 gboolean o_attrib_string_get_name_value (const gchar *string, gchar **name_ptr, gchar **value_ptr);
 gboolean o_attrib_get_name_value (OBJECT *attrib, gchar **name_ptr, gchar **value_ptr);
 GList *o_attrib_find_floating_attribs (const GList *list);
@@ -248,14 +248,14 @@ void o_pin_rotate_world(TOPLEVEL *toplevel, int world_centerx, int world_centery
 void o_pin_mirror_world(TOPLEVEL *toplevel, int world_centerx, int world_centery, OBJECT *object);
 void o_pin_modify(TOPLEVEL *toplevel, OBJECT *object, int x, int y, int whichone);
 void o_pin_update_whichend(TOPLEVEL *toplevel, GList *object_list, int num_pins);
-void o_pin_set_type(OBJECT *o_current, int pin_type);
+void o_pin_set_type(TOPLEVEL *toplevel, OBJECT *o_current, int pin_type);
 /* o_selection.c */
 SELECTION *o_selection_new( void );
-void o_selection_add(SELECTION *selection, OBJECT *o_selected);
+void o_selection_add(TOPLEVEL *toplevel, SELECTION *selection, OBJECT *o_selected);
 void o_selection_print_all(const SELECTION *selection);
-void o_selection_remove(SELECTION *selection, OBJECT *o_selected);
-void o_selection_select(OBJECT *object, int color); /* DEPRECATED */
-void o_selection_unselect(OBJECT *object);          /* DEPRECATED */
+void o_selection_remove(TOPLEVEL *toplevel, SELECTION *selection, OBJECT *o_selected);
+void o_selection_select(TOPLEVEL *toplevel, OBJECT *object, int color); /* DEPRECATED */
+void o_selection_unselect(TOPLEVEL *toplevel, OBJECT *object);          /* DEPRECATED */
 
 /* o_text_basic.c */
 void o_text_init(void);
@@ -387,9 +387,9 @@ gboolean s_page_check_changed (GedaPageList *list);
 void s_page_clear_changed (GedaPageList *list);
 void s_page_autosave_init(TOPLEVEL *toplevel);
 gint s_page_autosave (TOPLEVEL *toplevel);
-void s_page_append (PAGE *page, OBJECT *object);
-void s_page_append_list (PAGE *page, GList *obj_list);
-void s_page_remove (PAGE *page, OBJECT *object);
+void s_page_append (TOPLEVEL *toplevel, PAGE *page, OBJECT *object);
+void s_page_append_list (TOPLEVEL *toplevel, PAGE *page, GList *obj_list);
+void s_page_remove (TOPLEVEL *toplevel, PAGE *page, OBJECT *object);
 void s_page_delete_objects (TOPLEVEL *toplevel, PAGE *page);
 const GList *s_page_objects (PAGE *page);
 GList *s_page_objects_in_region (TOPLEVEL *toplevel, PAGE *page, int min_x, int min_y, int max_x, int max_y);
diff --git a/libgeda/src/f_basic.c b/libgeda/src/f_basic.c
index 0cf7640..a4ec639 100644
--- a/libgeda/src/f_basic.c
+++ b/libgeda/src/f_basic.c
@@ -281,11 +281,11 @@ int f_open_flags(TOPLEVEL *toplevel, const gchar *filename,
    * the RC file, it's time to read in the file. */
   if (load_backup_file == 1) {
     /* Load the backup file */
-    s_page_append_list (toplevel->page_current,
+    s_page_append_list (toplevel, toplevel->page_current,
                         o_read (toplevel, NULL, backup_filename, &tmp_err));
   } else {
     /* Load the original file */
-    s_page_append_list (toplevel->page_current,
+    s_page_append_list (toplevel, toplevel->page_current,
                         o_read (toplevel, NULL, full_filename, &tmp_err));
   }
 
diff --git a/libgeda/src/o_attrib.c b/libgeda/src/o_attrib.c
index b4b068f..b4b458a 100644
--- a/libgeda/src/o_attrib.c
+++ b/libgeda/src/o_attrib.c
@@ -245,7 +245,7 @@ void o_attrib_print(GList *attributes)
  *  \param [in] remove  The OBJECT to remove from list.
  *
  */
-void o_attrib_remove(GList **list, OBJECT *remove)
+void o_attrib_remove(TOPLEVEL *toplevel, GList **list, OBJECT *remove)
 {
   g_return_if_fail (remove != NULL);
 
diff --git a/libgeda/src/o_list.c b/libgeda/src/o_list.c
index 242dbc9..5ae3127 100644
--- a/libgeda/src/o_list.c
+++ b/libgeda/src/o_list.c
@@ -173,7 +173,7 @@ GList *o_glist_copy_all (TOPLEVEL *toplevel,
     /* unselect the object before the copy */
     selected_save = src_object->selected;
     if (selected_save)
-      o_selection_unselect(src_object);
+      o_selection_unselect (toplevel, src_object);
 
     if (src_object->type != OBJ_TEXT) {
       dst_object = o_object_copy (toplevel, src_object, flag);
@@ -183,7 +183,7 @@ GList *o_glist_copy_all (TOPLEVEL *toplevel,
 
     /* reselect it */
     if (selected_save)
-      o_selection_select(src_object, SELECT_COLOR);
+      o_selection_select (toplevel, src_object, SELECT_COLOR);
 
     src = g_list_next(src);
   }
@@ -197,7 +197,7 @@ GList *o_glist_copy_all (TOPLEVEL *toplevel,
     /* unselect the object before the copy */
     selected_save = src_object->selected;
     if (selected_save)
-      o_selection_unselect(src_object);
+      o_selection_unselect (toplevel, src_object);
 
     if (src_object->type == OBJ_TEXT) {
       dst_object = o_object_copy (toplevel, src_object, flag);
@@ -216,7 +216,7 @@ GList *o_glist_copy_all (TOPLEVEL *toplevel,
 
     /* reselect it */
     if (selected_save)
-      o_selection_select(src_object, SELECT_COLOR);
+      o_selection_select (toplevel, src_object, SELECT_COLOR);
 
     src = g_list_next(src);
   }
diff --git a/libgeda/src/o_net_basic.c b/libgeda/src/o_net_basic.c
index 3345cda..1891304 100644
--- a/libgeda/src/o_net_basic.c
+++ b/libgeda/src/o_net_basic.c
@@ -585,17 +585,17 @@ int o_net_consolidate_segments(TOPLEVEL *toplevel, OBJECT *object)
 
           changed++;
           if (other_object->selected == TRUE ) {
-            o_selection_remove( toplevel->page_current->selection_list, other_object );
+            o_selection_remove (toplevel, toplevel->page_current->selection_list, other_object);
             reselect_new=TRUE;
           }
 
           if (reselect_new == TRUE) {
-            o_selection_remove( toplevel->page_current->selection_list, object );
-            o_selection_add( toplevel->page_current->selection_list, object );
+            o_selection_remove (toplevel, toplevel->page_current->selection_list, object);
+            o_selection_add (toplevel, toplevel->page_current->selection_list, object);
           }
 
           s_conn_remove_object (toplevel, other_object);
-          s_page_remove (toplevel->page_current, other_object);
+          s_page_remove (toplevel, toplevel->page_current, other_object);
           s_delete_object (toplevel, other_object);
           o_net_recalc(toplevel, object);
           s_tile_update_object(toplevel, object);
diff --git a/libgeda/src/o_pin_basic.c b/libgeda/src/o_pin_basic.c
index e1573ae..4e5b594 100644
--- a/libgeda/src/o_pin_basic.c
+++ b/libgeda/src/o_pin_basic.c
@@ -101,7 +101,7 @@ OBJECT *o_pin_new(TOPLEVEL *toplevel,
   new_node->line->x[1] = x2;
   new_node->line->y[1] = y2;
 
-  o_pin_set_type (new_node, pin_type);
+  o_pin_set_type (toplevel, new_node, pin_type);
 
   o_pin_recalc (toplevel, new_node);
 
@@ -583,7 +583,7 @@ void o_pin_update_whichend(TOPLEVEL *toplevel,
  *  \param [in] o_current  The pin OBJECT being modified
  *  \param [in] type       The new type of this pin
  */
-void o_pin_set_type (OBJECT *o_current, int pin_type)
+void o_pin_set_type (TOPLEVEL *toplevel, OBJECT *o_current, int pin_type)
 {
   switch (pin_type) {
     default:
diff --git a/libgeda/src/o_selection.c b/libgeda/src/o_selection.c
index 95818ad..df4e144 100644
--- a/libgeda/src/o_selection.c
+++ b/libgeda/src/o_selection.c
@@ -46,9 +46,9 @@ SELECTION *o_selection_new( void )
  *  \param [in] selection Pointer to the selection list
  *  \param [in] o_selected Object to select.
  */
-void o_selection_add(SELECTION *selection, OBJECT *o_selected)
+void o_selection_add (TOPLEVEL *toplevel, SELECTION *selection, OBJECT *o_selected)
 {
-  o_selection_select( o_selected, SELECT_COLOR );
+  o_selection_select (toplevel, o_selected, SELECT_COLOR);
   geda_list_add( (GedaList *)selection, o_selected );
 }
 
@@ -60,7 +60,7 @@ void o_selection_add(SELECTION *selection, OBJECT *o_selected)
  *  \param [in] selection Pointer to the selection list
  *  \param [in] o_selected Object to unselect and remove from the list.
  */
-void o_selection_remove(SELECTION *selection, OBJECT *o_selected )
+void o_selection_remove (TOPLEVEL *toplevel, SELECTION *selection, OBJECT *o_selected)
 {
   if (o_selected == NULL) {
     fprintf(stderr, "Got NULL for o_selected in o_selection_remove\n");
@@ -68,7 +68,7 @@ void o_selection_remove(SELECTION *selection, OBJECT *o_selected )
   }
 
   if (g_list_find( geda_list_get_glist( selection ), o_selected ) != NULL) {
-    o_selection_unselect( o_selected );
+    o_selection_unselect (toplevel, o_selected);
     geda_list_remove( (GedaList *)selection, o_selected );
   }
 }
@@ -102,7 +102,7 @@ void o_selection_print_all(const SELECTION *selection)
  *  \param [in] object Object to select.
  *  \param [in] color color of the selected object.
  */
-void o_selection_select(OBJECT *object, int color)
+void o_selection_select(TOPLEVEL *toplevel, OBJECT *object, int color)
 {
   if (object->selected == TRUE) {
     printf("object already selected == TRUE\n");
@@ -130,7 +130,7 @@ void o_selection_select(OBJECT *object, int color)
  *  This function should not be called by anybody outside of this file.
  *  \param [in] object Object to unselect.
  */
-void o_selection_unselect(OBJECT *object)
+void o_selection_unselect (TOPLEVEL *toplevel, OBJECT *object)
 {
   object->selected = FALSE;
   object->color = object->saved_color;
diff --git a/libgeda/src/s_basic.c b/libgeda/src/s_basic.c
index a53e816..05f1d02 100644
--- a/libgeda/src/s_basic.c
+++ b/libgeda/src/s_basic.c
@@ -227,7 +227,7 @@ s_delete_object(TOPLEVEL *toplevel, OBJECT *o_current)
 
     if (o_current->attached_to != NULL) {
       /* do the actual remove */
-      o_attrib_remove(&o_current->attached_to->attribs, o_current);
+      o_attrib_remove(toplevel, &o_current->attached_to->attribs, o_current);
     }
 
     if (toplevel->page_current->object_lastplace == o_current) {
diff --git a/libgeda/src/s_page.c b/libgeda/src/s_page.c
index feef956..7f62681 100644
--- a/libgeda/src/s_page.c
+++ b/libgeda/src/s_page.c
@@ -516,7 +516,7 @@ gint s_page_autosave (TOPLEVEL *toplevel)
  *  \param [in] page    The PAGE the object is being added to.
  *  \param [in] object  The OBJECT being added to the page.
  */
-void s_page_append (PAGE *page, OBJECT *object)
+void s_page_append (TOPLEVEL *toplevel, PAGE *page, OBJECT *object)
 {
   page->_object_list = g_list_append (page->_object_list, object);
 }
@@ -530,7 +530,7 @@ void s_page_append (PAGE *page, OBJECT *object)
  *  \param [in] page      The PAGE the objects are being added to.
  *  \param [in] obj_list  The OBJECT list being added to the page.
  */
-void s_page_append_list (PAGE *page, GList *obj_list)
+void s_page_append_list (TOPLEVEL *toplevel, PAGE *page, GList *obj_list)
 {
   page->_object_list = g_list_concat (page->_object_list, obj_list);
 }
@@ -544,7 +544,7 @@ void s_page_append_list (PAGE *page, GList *obj_list)
  *  \param [in] page    The PAGE the object is being removed from.
  *  \param [in] object  The OBJECT being removed from the page.
  */
-void s_page_remove (PAGE *page, OBJECT *object)
+void s_page_remove (TOPLEVEL *toplevel, PAGE *page, OBJECT *object)
 {
   page->_object_list = g_list_remove (page->_object_list, object);
 }

commit 047a3ecad3fe1bcd98c6eb209134772cd894fe6c
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    Remove o_attrib_search_numslots(), instead call the attribute API directly

diff --git a/gattrib/src/s_attrib.c b/gattrib/src/s_attrib.c
index 6e5a485..5f69e9c 100644
--- a/gattrib/src/s_attrib.c
+++ b/gattrib/src/s_attrib.c
@@ -104,7 +104,8 @@ char *s_attrib_get_refdes(OBJECT *object)
   
   /*------- Now append .slot to refdes if part is slotted -------- */
   /* Find out if this is a multislotted component */
-  numslots_value = o_attrib_search_numslots (object);
+  numslots_value =
+    o_attrib_search_object_attribs_by_name (object, "numslots", 0);
   if (numslots_value != NULL) {  /* this is a slotted component; 
 				    append slot number to refdes. */
     slot_value = o_attrib_search_slot(object, &slot_text_object);
diff --git a/gschem/src/o_slot.c b/gschem/src/o_slot.c
index 425f7c2..a0a4c68 100644
--- a/gschem/src/o_slot.c
+++ b/gschem/src/o_slot.c
@@ -92,7 +92,8 @@ void o_slot_end(GSCHEM_TOPLEVEL *w_current, const char *string, int len)
   }
 
   if (object != NULL) {
-    numslots_value = o_attrib_search_numslots (object);
+    numslots_value =
+      o_attrib_search_object_attribs_by_name (object, "numslots", 0);
 
     if (!numslots_value) {
       s_log_message(_("numslots attribute missing\n"));
diff --git a/gschem/src/x_autonumber.c b/gschem/src/x_autonumber.c
index e9a9726..950bc86 100644
--- a/gschem/src/x_autonumber.c
+++ b/gschem/src/x_autonumber.c
@@ -403,7 +403,9 @@ void autonumber_get_used(GSCHEM_TOPLEVEL *w_current, AUTONUMBER_TEXT *autotext)
       o_parent = o_current->attached_to;
       if (autotext->slotting && o_parent != NULL) {
 	/* check for slotted symbol */
-	if ((numslot_str = o_attrib_search_numslots (o_parent)) != NULL) {
+	numslot_str =
+	  o_attrib_search_object_attribs_by_name (o_parent, "numslots", 0);
+	if (numslot_str != NULL) {
 	  sscanf(numslot_str," %d",&numslots);
 	  g_free(numslot_str);
 
@@ -534,7 +536,9 @@ void autonumber_get_new_numbers(AUTONUMBER_TEXT *autotext, OBJECT *o_current,
 
   /* 3. is o_current a slotted object ? */
   if ((autotext->slotting) && o_parent != NULL) {
-    if ((numslot_str = o_attrib_search_numslots (o_parent)) != NULL) {
+    numslot_str =
+      o_attrib_search_object_attribs_by_name (o_parent, "numslots", 0);
+    if (numslot_str != NULL) {
       sscanf(numslot_str," %d",&numslots);
       g_free(numslot_str);
       if (numslots > 0) { 
diff --git a/libgeda/include/libgeda/prototype.h b/libgeda/include/libgeda/prototype.h
index ff31336..9d9abf9 100644
--- a/libgeda/include/libgeda/prototype.h
+++ b/libgeda/include/libgeda/prototype.h
@@ -108,7 +108,6 @@ char *o_attrib_search_attached_attribs_by_name (OBJECT *object, char *name, int
 char *o_attrib_search_inherited_attribs_by_name (OBJECT *object, char *name, int counter);
 char *o_attrib_search_object_attribs_by_name (OBJECT *object, char *name, int counter);
 char *o_attrib_search_slot(OBJECT *object, OBJECT **return_found);
-char *o_attrib_search_numslots(OBJECT *object);
 void o_attrib_slot_update(TOPLEVEL *toplevel, OBJECT *object);
 GList *o_attrib_return_attribs(OBJECT *object);
 int o_attrib_is_inherited(OBJECT *attrib);
diff --git a/libgeda/src/o_attrib.c b/libgeda/src/o_attrib.c
index 236540d..b4b068f 100644
--- a/libgeda/src/o_attrib.c
+++ b/libgeda/src/o_attrib.c
@@ -677,26 +677,6 @@ char *o_attrib_search_slot(OBJECT *object, OBJECT **return_found)
   return value;
 }
 
-/*! \brief Search for numslots attribute.
- *  \par Function Description
- *  Search for numslots attribute.
- *
- *  \param [in] object        OBJECT to search.
- *  \param [in] return_found  numslots attribute if found, NULL otherwise.
- *  \return Character string with attribute value, NULL otherwise.
- *
- *  \note
- *  Caller must g_free returned character string.
- */
-char *o_attrib_search_numslots(OBJECT *object)
-{
-  /* search for numslots attribute buried inside the complex */
-  if (object->type != OBJ_COMPLEX)
-    return NULL;
-
-  return o_attrib_search_object_attribs_by_name (object, "numslots", 0);
-}
-
 
 /*! \brief Search for slotdef attribute.
  *  \par Function Description




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