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

gEDA-cvs: gaf.git: branch: master updated (1.5.0-20080706-193-gb7f4771)



The branch, master has been updated
       via  b7f477143e79138c4d5d33e1dec1421b8419791c (commit)
       via  2550db8e1d981ccab55b7f2ae6e9932198a53b59 (commit)
       via  70e6c7c4e5c765a30137c0f93b4ec08fd5802030 (commit)
      from  b74ce15668b87380fb348a94aab6452eba6f5551 (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        |   23 +++-----
 gschem/src/g_hook.c           |   17 ++----
 gschem/src/o_arc.c            |    9 ++--
 gschem/src/o_attrib.c         |   15 ++---
 gschem/src/o_box.c            |    9 ++--
 gschem/src/o_bus.c            |   16 +++---
 gschem/src/o_circle.c         |   10 ++--
 gschem/src/o_complex.c        |    5 +-
 gschem/src/o_line.c           |   11 ++--
 gschem/src/o_misc.c           |    8 +--
 gschem/src/o_net.c            |   44 +++++++---------
 gschem/src/o_picture.c        |   19 +++----
 gschem/src/o_pin.c            |   12 ++--
 gschem/src/o_slot.c           |   16 ++----
 gschem/src/o_text.c           |    2 +-
 libgeda/include/prototype.h   |   56 +++++++++-----------
 libgeda/src/o_arc_basic.c     |   52 +++++++-----------
 libgeda/src/o_box_basic.c     |   53 ++++++------------
 libgeda/src/o_bus_basic.c     |   30 ++++++-----
 libgeda/src/o_circle_basic.c  |   53 +++++++------------
 libgeda/src/o_complex_basic.c |  116 ++++++++++++++++++----------------------
 libgeda/src/o_line_basic.c    |   49 ++++++-----------
 libgeda/src/o_list.c          |   43 +++++++++------
 libgeda/src/o_net_basic.c     |   31 +++++------
 libgeda/src/o_path_basic.c    |   24 +++-----
 libgeda/src/o_picture.c       |   46 ++++++----------
 libgeda/src/o_pin_basic.c     |   30 ++++++-----
 libgeda/src/o_text_basic.c    |   75 +++++++++++++--------------
 28 files changed, 381 insertions(+), 493 deletions(-)


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

commit b7f477143e79138c4d5d33e1dec1421b8419791c
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Sun Sep 28 01:03:12 2008 +0100

    Make o_..._copy () return the new OBJECT without linking it into any list.
    
    Allows cleaner use of objects where we might want to insert the copied
    object into a GList rather than a self-linked list of OBJECTs.

:100644 100644 3d30db0... fb52941... M	libgeda/include/prototype.h
:100644 100644 215f84a... 7f8d5c4... M	libgeda/src/o_arc_basic.c
:100644 100644 466dfac... 8e9b624... M	libgeda/src/o_box_basic.c
:100644 100644 7192374... 1152564... M	libgeda/src/o_bus_basic.c
:100644 100644 cfd6d1d... 503060a... M	libgeda/src/o_circle_basic.c
:100644 100644 165d8f6... 45061cb... M	libgeda/src/o_complex_basic.c
:100644 100644 dc7938f... 3fd3ef8... M	libgeda/src/o_line_basic.c
:100644 100644 4729018... caeaa2f... M	libgeda/src/o_list.c
:100644 100644 37a1a90... 880fcb4... M	libgeda/src/o_net_basic.c
:100644 100644 bc9f076... 6f4292d... M	libgeda/src/o_path_basic.c
:100644 100644 2e3d6ee... 16f92e4... M	libgeda/src/o_picture.c
:100644 100644 6243733... 7b27991... M	libgeda/src/o_pin_basic.c
:100644 100644 261ee95... 7cf332a... M	libgeda/src/o_text_basic.c

commit 2550db8e1d981ccab55b7f2ae6e9932198a53b59
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Sun Sep 28 01:03:06 2008 +0100

    Make o_..._add() into o_..._new() which don't link the new OBJECT.
    
    Allows cleaner use of objects where we might want to insert the object
    into a GList rather than a self-linked list of OBJECTs.

:100644 100644 710c3eb... 9eda354... M	gattrib/src/s_object.c
:100644 100644 4f367d6... a614563... M	gschem/src/g_hook.c
:100644 100644 07dc214... 984c83e... M	gschem/src/o_arc.c
:100644 100644 1fc814e... de71176... M	gschem/src/o_attrib.c
:100644 100644 c455d24... ab4fb95... M	gschem/src/o_box.c
:100644 100644 1551377... e126a9f... M	gschem/src/o_bus.c
:100644 100644 87d5e29... 562b261... M	gschem/src/o_circle.c
:100644 100644 0406cfe... f2e86dc... M	gschem/src/o_complex.c
:100644 100644 683b56e... 3aff73b... M	gschem/src/o_line.c
:100644 100644 ae0d7c9... 4d54d51... M	gschem/src/o_misc.c
:100644 100644 3ea9943... 3c27c57... M	gschem/src/o_net.c
:100644 100644 e5ae05e... 66f4240... M	gschem/src/o_picture.c
:100644 100644 d9969ac... 4273ad6... M	gschem/src/o_pin.c
:100644 100644 3546e11... 90ae560... M	gschem/src/o_slot.c
:100644 100644 ee1bf49... 465438a... M	gschem/src/o_text.c
:100644 100644 ecb19d0... 3d30db0... M	libgeda/include/prototype.h
:100644 100644 9eafe18... 215f84a... M	libgeda/src/o_arc_basic.c
:100644 100644 ae9ab95... 466dfac... M	libgeda/src/o_box_basic.c
:100644 100644 b322d20... 7192374... M	libgeda/src/o_bus_basic.c
:100644 100644 e10c3b4... cfd6d1d... M	libgeda/src/o_circle_basic.c
:100644 100644 284c5f1... 165d8f6... M	libgeda/src/o_complex_basic.c
:100644 100644 0b05015... dc7938f... M	libgeda/src/o_line_basic.c
:100644 100644 a59b7de... 37a1a90... M	libgeda/src/o_net_basic.c
:100644 100644 bba88b1... bc9f076... M	libgeda/src/o_path_basic.c
:100644 100644 6f889cf... 2e3d6ee... M	libgeda/src/o_picture.c
:100644 100644 78846ab... 6243733... M	libgeda/src/o_pin_basic.c
:100644 100644 9d76eb7... 261ee95... M	libgeda/src/o_text_basic.c

commit 70e6c7c4e5c765a30137c0f93b4ec08fd5802030
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Sun Sep 28 01:02:59 2008 +0100

    Add critical warning for unknown object types in o_list_copy_to ()
    
    This makes the switch on object->type consistent with many of the other
    functions which use this construct.

:100644 100644 4eece4c... 4729018... M	libgeda/src/o_list.c

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

commit b7f477143e79138c4d5d33e1dec1421b8419791c
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Sun Sep 28 01:03:12 2008 +0100

    Make o_..._copy () return the new OBJECT without linking it into any list.
    
    Allows cleaner use of objects where we might want to insert the copied
    object into a GList rather than a self-linked list of OBJECTs.

diff --git a/libgeda/include/prototype.h b/libgeda/include/prototype.h
index 3d30db0..fb52941 100644
--- a/libgeda/include/prototype.h
+++ b/libgeda/include/prototype.h
@@ -90,7 +90,7 @@ double round_5_2_1(double unrounded);
 
 /* o_arc_basic.c */
 OBJECT *o_arc_new(TOPLEVEL *toplevel, char type, int color, int x, int y, int radius, int start_angle, int end_angle);
-OBJECT *o_arc_copy(TOPLEVEL *toplevel, OBJECT *list_tail, OBJECT *o_current);
+OBJECT *o_arc_copy(TOPLEVEL *toplevel, OBJECT *o_current);
 void o_arc_modify(TOPLEVEL *toplevel, OBJECT *object, int x, int y, int whichone);
 void o_arc_translate_world(TOPLEVEL *toplevel, int dx, int dy, OBJECT *object);
 void o_arc_rotate_world(TOPLEVEL *toplevel, int world_centerx, int world_centery, int angle, OBJECT *object);
@@ -142,7 +142,7 @@ gdouble o_shortest_distance(OBJECT *object, gint x, gint y);
 
 /* o_box_basic.c */
 OBJECT *o_box_new(TOPLEVEL *toplevel, char type, int color, int x1, int y1, int x2, int y2);
-OBJECT *o_box_copy(TOPLEVEL *toplevel, OBJECT *list_tail, OBJECT *o_current);
+OBJECT *o_box_copy(TOPLEVEL *toplevel, OBJECT *o_current);
 void o_box_modify(TOPLEVEL *toplevel, OBJECT *object, int x, int y, int whichone);
 void o_box_translate_world(TOPLEVEL *toplevel, int dx, int dy, OBJECT *object);
 void o_box_rotate_world(TOPLEVEL *toplevel, int world_centerx, int world_centery, int angle, OBJECT *object);
@@ -151,7 +151,7 @@ void o_box_mirror_world(TOPLEVEL *toplevel, int world_centerx, int world_centery
 /* o_bus_basic.c */
 OBJECT *o_bus_new(TOPLEVEL *toplevel, char type, int color, int x1, int y1, int x2, int y2, int bus_ripper_direction);
 void o_bus_translate_world(TOPLEVEL *toplevel, int dx, int dy, OBJECT *object);
-OBJECT *o_bus_copy(TOPLEVEL *toplevel, OBJECT *list_tail, OBJECT *o_current);
+OBJECT *o_bus_copy(TOPLEVEL *toplevel, OBJECT *o_current);
 void o_bus_rotate_world(TOPLEVEL *toplevel, int world_centerx, int world_centery, int angle, OBJECT *object);
 void o_bus_mirror_world(TOPLEVEL *toplevel, int world_centerx, int world_centery, OBJECT *object);
 int o_bus_orientation(OBJECT *object);
@@ -163,7 +163,7 @@ void o_bus_modify(TOPLEVEL *toplevel, OBJECT *object, int x, int y, int whichone
 /* o_circle_basic.c */
 int dist(int x1, int y1, int x2, int y2);
 OBJECT *o_circle_new(TOPLEVEL *toplevel, char type, int color, int x, int y, int radius);
-OBJECT *o_circle_copy(TOPLEVEL *toplevel, OBJECT *list_tail, OBJECT *o_current);
+OBJECT *o_circle_copy(TOPLEVEL *toplevel, OBJECT *o_current);
 void o_circle_modify(TOPLEVEL *toplevel, OBJECT *object, int x, int y, int whichone);
 void o_circle_translate_world(TOPLEVEL *toplevel, int dx, int dy, OBJECT *object);
 void o_circle_rotate_world(TOPLEVEL *toplevel, int world_centerx, int world_centery, int angle, OBJECT *object);
@@ -187,8 +187,8 @@ OBJECT *o_complex_new(TOPLEVEL *toplevel, char type, int color, int x, int y, in
 OBJECT *o_complex_new_embedded(TOPLEVEL *toplevel, char type, int color, int x, int y, int angle, int mirror, const gchar *basename, int selectable);
 void o_complex_set_filename(TOPLEVEL *toplevel, const char *basename);
 void o_complex_translate_world(TOPLEVEL *toplevel, int dx, int dy, OBJECT *object);
-OBJECT *o_complex_copy(TOPLEVEL *toplevel, OBJECT *list_tail, OBJECT *o_current);
-OBJECT *o_complex_copy_embedded(TOPLEVEL *toplevel, OBJECT *list_tail, OBJECT *o_current);
+OBJECT *o_complex_copy(TOPLEVEL *toplevel, OBJECT *o_current);
+OBJECT *o_complex_copy_embedded(TOPLEVEL *toplevel, OBJECT *o_current);
 void o_complex_set_color(OBJECT *prim_objs, int color);
 void o_complex_set_color_single(OBJECT *o_current, int color);
 void o_complex_set_color_save(OBJECT *complex, int color);
@@ -208,7 +208,7 @@ void o_unembed(TOPLEVEL *toplevel, OBJECT *o_current);
 
 /* o_line_basic.c */
 OBJECT *o_line_new(TOPLEVEL *toplevel, char type, int color, int x1, int y1, int x2, int y2);
-OBJECT *o_line_copy(TOPLEVEL *toplevel, OBJECT *list_tail, OBJECT *o_current);
+OBJECT *o_line_copy(TOPLEVEL *toplevel, OBJECT *o_current);
 void o_line_modify(TOPLEVEL *toplevel, OBJECT *object, int x, int y, int whichone);
 void o_line_translate_world(TOPLEVEL *toplevel, int dx, int dy, OBJECT *object);
 void o_line_rotate_world(TOPLEVEL *toplevel, int world_centerx, int world_centery, int angle, OBJECT *object);
@@ -233,7 +233,7 @@ void o_glist_mirror_world(TOPLEVEL *toplevel, int x, int y, GList *list);
 /* o_net_basic.c */
 OBJECT *o_net_new(TOPLEVEL *toplevel, char type, int color, int x1, int y1, int x2, int y2);
 void o_net_translate_world(TOPLEVEL *toplevel, int dx, int dy, OBJECT *object);
-OBJECT *o_net_copy(TOPLEVEL *toplevel, OBJECT *list_tail, OBJECT *o_current);
+OBJECT *o_net_copy(TOPLEVEL *toplevel, OBJECT *o_current);
 void o_net_rotate_world(TOPLEVEL *toplevel, int world_centerx, int world_centery, int angle, OBJECT *object);
 void o_net_mirror_world(TOPLEVEL *toplevel, int world_centerx, int world_centery, OBJECT *object);
 int o_net_orientation(OBJECT *object);
@@ -245,7 +245,7 @@ void o_net_modify(TOPLEVEL *toplevel, OBJECT *object, int x, int y, int whichone
 
 /* o_path_basic.c */
 OBJECT *o_path_new(TOPLEVEL *toplevel, char type, int color, const char *path_string);
-OBJECT *o_path_copy(TOPLEVEL *toplevel, OBJECT *list_tail, OBJECT *o_current);
+OBJECT *o_path_copy(TOPLEVEL *toplevel, OBJECT *o_current);
 void o_path_modify(TOPLEVEL *toplevel, OBJECT *object, int x, int y, int whichone);
 void o_path_translate_world(TOPLEVEL *toplevel, int x, int y, OBJECT *object);
 void o_path_rotate_world(TOPLEVEL *toplevel, int world_centerx, int world_centery, int angle, OBJECT *object);
@@ -261,7 +261,7 @@ void o_picture_modify(TOPLEVEL *toplevel, OBJECT *object, int x, int y, int whic
 void o_picture_rotate_world(TOPLEVEL *toplevel, int world_centerx, int world_centery, int angle,OBJECT *object);
 void o_picture_mirror_world(TOPLEVEL *toplevel, int world_centerx, int world_centery, OBJECT *object);
 void o_picture_translate_world(TOPLEVEL *toplevel, int dx, int dy, OBJECT *object);
-OBJECT *o_picture_copy(TOPLEVEL *toplevel, OBJECT *list_tail, OBJECT *o_current);
+OBJECT *o_picture_copy(TOPLEVEL *toplevel, OBJECT *o_current);
 guint8 *o_picture_rgb_data(GdkPixbuf *image);
 guint8 *o_picture_mask_data(GdkPixbuf *image);
 void o_picture_embed(TOPLEVEL *toplevel, OBJECT *object);
@@ -271,7 +271,7 @@ GdkPixbuf *o_picture_pixbuf_from_buffer (gchar *file_content, gsize file_length,
 /* o_pin_basic.c */
 OBJECT *o_pin_new(TOPLEVEL *toplevel, char type, int color, int x1, int y1, int x2, int y2, int pin_type, int whichend);
 void o_pin_translate_world(TOPLEVEL *toplevel, int dx, int dy, OBJECT *object);
-OBJECT *o_pin_copy(TOPLEVEL *toplevel, OBJECT *list_tail, OBJECT *o_current);
+OBJECT *o_pin_copy(TOPLEVEL *toplevel, OBJECT *o_current);
 void o_pin_rotate_world(TOPLEVEL *toplevel, int world_centerx, int world_centery, int angle, OBJECT *object);
 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);
@@ -298,7 +298,7 @@ OBJECT *o_text_new(TOPLEVEL *toplevel, char type, int color, int x, int y, int a
 void o_text_set_info_font(char buf[]);
 void o_text_recreate(TOPLEVEL *toplevel, OBJECT *o_current);
 void o_text_translate_world(TOPLEVEL *toplevel, int dx, int dy, OBJECT *o_current);
-OBJECT *o_text_copy(TOPLEVEL *toplevel, OBJECT *list_tail, OBJECT *o_current);
+OBJECT *o_text_copy(TOPLEVEL *toplevel, OBJECT *o_current);
 void o_text_freeallfonts(TOPLEVEL *toplevel);
 void o_text_rotate_world(TOPLEVEL *toplevel, int world_centerx, int world_centery, int angle, OBJECT *object);
 void o_text_mirror_world(TOPLEVEL *toplevel, int world_centerx, int world_centery, OBJECT *object);
diff --git a/libgeda/src/o_arc_basic.c b/libgeda/src/o_arc_basic.c
index 215f84a..7f8d5c4 100644
--- a/libgeda/src/o_arc_basic.c
+++ b/libgeda/src/o_arc_basic.c
@@ -121,16 +121,11 @@ OBJECT *o_arc_new(TOPLEVEL *toplevel,
  *  The arc, the line options are initialized whereas the fill options are
  *  initialized to passive values - as an arc can not be filled.
  *
- *  The new object is added to the end of the object list given by <B>list_tail</B>.
- *  A pointer on it is returned for update purpose in the calling function.
- *
  *  \param [in] toplevel  The TOPLEVEL object
- *  \param [in] list_tail
  *  \param [in] o_current
- *  \return
+ *  \return The new OBJECT
  */
-OBJECT *o_arc_copy(TOPLEVEL *toplevel, OBJECT *list_tail,
-		   OBJECT *o_current)
+OBJECT *o_arc_copy(TOPLEVEL *toplevel, OBJECT *o_current)
 {
   OBJECT *new_obj;
   int color;
@@ -146,7 +141,6 @@ OBJECT *o_arc_copy(TOPLEVEL *toplevel, OBJECT *list_tail,
                        o_current->arc->width / 2,
                        o_current->arc->start_angle,
                        o_current->arc->end_angle);
-  list_tail = s_basic_link_object (new_obj, list_tail);
   o_set_line_options(toplevel, new_obj,
                      o_current->line_end, o_current->line_type,
                      o_current->line_width,
diff --git a/libgeda/src/o_box_basic.c b/libgeda/src/o_box_basic.c
index 466dfac..8e9b624 100644
--- a/libgeda/src/o_box_basic.c
+++ b/libgeda/src/o_box_basic.c
@@ -115,15 +115,13 @@ OBJECT *o_box_new(TOPLEVEL *toplevel,
 /*! \brief Copy a box to a list.
  *  \par Function Description
  *  The function #o_box_copy() creates a verbatim copy of the object
- *  pointed by <B>o_current</B> describing a box. The new object is added at
- *  the end of the list, following the <B>list_tail</B> pointed object.
+ *  pointed by <B>o_current</B> describing a box.
  *
  *  \param [in]      toplevel  The TOPLEVEL object.
- *  \param [in,out]  list_tail  OBJECT list to copy to.
  *  \param [in]      o_current  BOX OBJECT to copy.
- *  \return A new pointer on the end of the OBJECT <B>list_tail</B>.
+ *  \return The new OBJECT
  */
-OBJECT *o_box_copy(TOPLEVEL *toplevel, OBJECT *list_tail, OBJECT *o_current)
+OBJECT *o_box_copy(TOPLEVEL *toplevel, OBJECT *o_current)
 {
   OBJECT *new_obj;
   int color;
@@ -137,7 +135,6 @@ OBJECT *o_box_copy(TOPLEVEL *toplevel, OBJECT *list_tail, OBJECT *o_current)
   /* A new box object is created with #o_box_new().
    * Values for its fields are default and need to be modified. */
   new_obj = o_box_new (toplevel, OBJ_BOX, color, 0, 0, 0, 0);
-  list_tail = s_basic_link_object (new_obj, list_tail);
 
   /*
    * The dimensions of the new box are set with the ones of the original box.
@@ -166,7 +163,6 @@ OBJECT *o_box_copy(TOPLEVEL *toplevel, OBJECT *list_tail, OBJECT *o_current)
 
   /* new_obj->attribute = 0;*/
 
-  /* return the new tail of the object list */
   return new_obj;
 } 
 
diff --git a/libgeda/src/o_bus_basic.c b/libgeda/src/o_bus_basic.c
index 7192374..1152564 100644
--- a/libgeda/src/o_bus_basic.c
+++ b/libgeda/src/o_bus_basic.c
@@ -218,7 +218,7 @@ void o_bus_translate_world(TOPLEVEL *toplevel, int dx, int dy, OBJECT *object)
  * \par Function Description
  *
  */
-OBJECT *o_bus_copy(TOPLEVEL *toplevel, OBJECT *list_tail, OBJECT *o_current)
+OBJECT *o_bus_copy(TOPLEVEL *toplevel, OBJECT *o_current)
 {
   OBJECT *new_obj;
   int color;
@@ -237,7 +237,6 @@ OBJECT *o_bus_copy(TOPLEVEL *toplevel, OBJECT *list_tail, OBJECT *o_current)
                        o_current->line->x[0], o_current->line->y[0],
                        o_current->line->x[1], o_current->line->y[1],
                        o_current->bus_ripper_direction);
-  list_tail = s_basic_link_object (new_obj, list_tail);
 
   new_obj->line->x[0] = o_current->line->x[0];
   new_obj->line->y[0] = o_current->line->y[0];
diff --git a/libgeda/src/o_circle_basic.c b/libgeda/src/o_circle_basic.c
index cfd6d1d..503060a 100644
--- a/libgeda/src/o_circle_basic.c
+++ b/libgeda/src/o_circle_basic.c
@@ -99,17 +99,13 @@ OBJECT *o_circle_new(TOPLEVEL *toplevel,
 /*! \brief Create a copy of a circle.
  *  \par Function Description
  *  The function #o_circle_copy() creates a verbatim copy of the object
- *  pointed by <B>o_current</B> describing a circle. The new object is added at
- *  the end of the list, following the <B>list_tail</B> pointed object.
- *
+ *  pointed by <B>o_current</B> describing a circle.
  *
  *  \param [in]  toplevel  The TOPLEVEL object.
- *  \param [out] list_tail  OBJECT list to copy to.
  *  \param [in]  o_current  Circle OBJECT to copy.
- *  \return A new pointer to the end of the object list.
+ *  \return The new OBJECT
  */
-OBJECT *o_circle_copy(TOPLEVEL *toplevel, OBJECT *list_tail,
-		      OBJECT *o_current)
+OBJECT *o_circle_copy(TOPLEVEL *toplevel, OBJECT *o_current)
 {
   OBJECT *new_obj;
   int color;
@@ -123,7 +119,6 @@ OBJECT *o_circle_copy(TOPLEVEL *toplevel, OBJECT *list_tail,
   /* A new circle object is created with #o_circle_new().
    * Values for its fields are default and need to be modified. */
   new_obj = o_circle_new (toplevel, OBJ_CIRCLE, color, 0, 0, 0);
-  list_tail = s_basic_link_object (new_obj, list_tail);
 
   /*
    * The parameters of the new circle are set with the ones of the original
diff --git a/libgeda/src/o_complex_basic.c b/libgeda/src/o_complex_basic.c
index 165d8f6..45061cb 100644
--- a/libgeda/src/o_complex_basic.c
+++ b/libgeda/src/o_complex_basic.c
@@ -805,8 +805,7 @@ void o_complex_translate_world(TOPLEVEL *toplevel, int dx, int dy,
  *  \par Function Description
  *
  */
-OBJECT *o_complex_copy(TOPLEVEL *toplevel, OBJECT *list_tail,
-		       OBJECT *o_current)
+OBJECT *o_complex_copy(TOPLEVEL *toplevel, OBJECT *o_current)
 {
   OBJECT *new_obj=NULL;
   int color;
@@ -835,7 +834,6 @@ OBJECT *o_complex_copy(TOPLEVEL *toplevel, OBJECT *list_tail,
                            o_current->complex->mirror,
                            clib, o_current->complex_basename,
                            selectable);
-  list_tail = s_basic_link_object (new_obj, list_tail);
 
   /* Delete or hide attributes eligible for promotion inside the complex */
    o_complex_remove_promotable_attribs (toplevel, new_obj);
@@ -855,8 +853,7 @@ OBJECT *o_complex_copy(TOPLEVEL *toplevel, OBJECT *list_tail,
  *  \par Function Description
  *
  */
-OBJECT *o_complex_copy_embedded(TOPLEVEL *toplevel, OBJECT *list_tail,
-				OBJECT *o_current)
+OBJECT *o_complex_copy_embedded(TOPLEVEL *toplevel, OBJECT *o_current)
 {
   OBJECT *new_obj=NULL;
   OBJECT *temp_list;
@@ -884,7 +881,6 @@ OBJECT *o_complex_copy_embedded(TOPLEVEL *toplevel, OBJECT *list_tail,
                                     o_current->complex->mirror,
                                     o_current->complex_basename,
                                     selectable);
-  list_tail = s_basic_link_object (new_obj, list_tail);
 
   /* deal with stuff that has changed */
 	
diff --git a/libgeda/src/o_line_basic.c b/libgeda/src/o_line_basic.c
index dc7938f..3fd3ef8 100644
--- a/libgeda/src/o_line_basic.c
+++ b/libgeda/src/o_line_basic.c
@@ -95,16 +95,13 @@ OBJECT *o_line_new(TOPLEVEL *toplevel,
 /*! \brief Create a copy of a line.
  *  \par Function Description
  *  This function creates a verbatim copy of the
- *  object pointed by <B>o_current</B> describing a line. The new object
- *  is added at the end of the list following the <B>list_tail</B>
- *  parameter.
+ *  object pointed by <B>o_current</B> describing a line.
  *
  *  \param [in]  toplevel  The TOPLEVEL object.
- *  \param [out] list_tail  OBJECT list to copy to.
  *  \param [in]  o_current  Line OBJECT to copy.
- *  \return A new pointer to the end of the object list.
+ *  \return The new OBJECT
  */
-OBJECT *o_line_copy(TOPLEVEL *toplevel, OBJECT *list_tail, OBJECT *o_current)
+OBJECT *o_line_copy(TOPLEVEL *toplevel, OBJECT *o_current)
 {
   OBJECT *new_obj;
   int color;
@@ -118,7 +115,6 @@ OBJECT *o_line_copy(TOPLEVEL *toplevel, OBJECT *list_tail, OBJECT *o_current)
   /* A new line object is created with #o_line_new().
    * Values for its fields are default and need to be modified. */
   new_obj = o_line_new (toplevel, OBJ_LINE, color, 0, 0, 0, 0);
-  list_tail = s_basic_link_object (new_obj, list_tail);
 
   /*
    * The coordinates of the ends of the new line are set with the ones
diff --git a/libgeda/src/o_list.c b/libgeda/src/o_list.c
index 4729018..caeaa2f 100644
--- a/libgeda/src/o_list.c
+++ b/libgeda/src/o_list.c
@@ -51,67 +51,66 @@ extern int global_sid;
 OBJECT *o_list_copy_to(TOPLEVEL *toplevel, OBJECT *list_head,
 		       OBJECT *selected, int flag, OBJECT **return_end)
 {
-  OBJECT *end=NULL;
+  OBJECT *new_obj;
+  OBJECT *end;
 
   /* are we adding a selection or the real object list */
   toplevel->ADDING_SEL = flag;
 
-  end = (OBJECT *) return_tail(list_head);
-
   switch(selected->type) {
 
     case(OBJ_LINE):
       /* do we do anything with the return value) ? */
-      end = (OBJECT *) o_line_copy(toplevel, end, selected);
+      new_obj = o_line_copy (toplevel, selected);
       break;
 
     case(OBJ_NET):
-      end = (OBJECT *) o_net_copy(toplevel, end, selected);
+      new_obj = o_net_copy (toplevel, selected);
       break;
 
     case(OBJ_BUS):
-      end = (OBJECT *) o_bus_copy(toplevel, end, selected);
+      new_obj = o_bus_copy (toplevel, selected);
       break;
 
     case(OBJ_BOX):
-      end = (OBJECT *) o_box_copy(toplevel, end, selected);
+      new_obj = o_box_copy (toplevel, selected);
       break;
 
     case(OBJ_PICTURE):
-      end = (OBJECT *) o_picture_copy(toplevel, end, selected);
+      new_obj = o_picture_copy (toplevel, selected);
       break;
 
     case(OBJ_CIRCLE):
-      end = (OBJECT *) o_circle_copy(toplevel, end, selected);
+      new_obj = o_circle_copy (toplevel, selected);
       break;
 
     case(OBJ_COMPLEX):
     case(OBJ_PLACEHOLDER):
       if (o_complex_is_embedded (selected)) {
-        end = (OBJECT *) o_complex_copy_embedded(toplevel, end, selected);
+        new_obj = o_complex_copy_embedded (toplevel, selected);
       } else {
-        end = (OBJECT *) o_complex_copy(toplevel, end, selected);
+        new_obj = o_complex_copy (toplevel, selected);
       }
       break;
 
     case(OBJ_TEXT):
-      end = (OBJECT *) o_text_copy(toplevel, end, selected);
+      new_obj = o_text_copy (toplevel, selected);
       if (selected->attribute && 
           selected->visibility == INVISIBLE) {
-        end->visibility = INVISIBLE;
+        new_obj->visibility = INVISIBLE;
       }
       break;
 
     case(OBJ_PATH):
-      end = (OBJECT *) o_path_copy(toplevel, end, selected);
+      new_obj = o_path_copy (toplevel, selected);
       break;
 
     case(OBJ_PIN):
-      end = (OBJECT *) o_pin_copy(toplevel, end, selected);
+      new_obj = o_pin_copy (toplevel, selected);
       break;
 
     case(OBJ_ARC):
-      end = (OBJECT *) o_arc_copy(toplevel, end, selected);
+      new_obj = o_arc_copy (toplevel, selected);
       break;
 
     default:
@@ -122,14 +121,17 @@ OBJECT *o_list_copy_to(TOPLEVEL *toplevel, OBJECT *list_head,
 
   /* Store a reference in the copied object to where it was copied.
    * Used to retain associations when copying attributes */
-  selected->copied_to = end;
+  selected->copied_to = new_obj;
+
+  end = return_tail (list_head);
+  end = s_basic_link_object (new_obj, end);
 
   if (list_head == NULL)
     list_head = end;
 
   /* make sure sid is the same! */
   if (selected) {
-    end->sid = selected->sid;
+    new_obj->sid = selected->sid;
   }
 
   /* I don't think this is a good idea at all */
diff --git a/libgeda/src/o_net_basic.c b/libgeda/src/o_net_basic.c
index 37a1a90..880fcb4 100644
--- a/libgeda/src/o_net_basic.c
+++ b/libgeda/src/o_net_basic.c
@@ -224,8 +224,7 @@ void o_net_translate_world(TOPLEVEL *toplevel, int dx, int dy,
  *
  *
  */
-OBJECT *o_net_copy(TOPLEVEL *toplevel, OBJECT *list_tail,
-		   OBJECT *o_current)
+OBJECT *o_net_copy(TOPLEVEL *toplevel,  OBJECT *o_current)
 {
   OBJECT *new_obj;
   int color;
@@ -243,7 +242,6 @@ OBJECT *o_net_copy(TOPLEVEL *toplevel, OBJECT *list_tail,
   new_obj = o_net_new (toplevel, OBJ_NET, color,
                        o_current->line->x[0], o_current->line->y[0],
                        o_current->line->x[1], o_current->line->y[1]);
-  list_tail = s_basic_link_object (new_obj, list_tail);
 
   new_obj->line->x[0] = o_current->line->x[0];
   new_obj->line->y[0] = o_current->line->y[0];
diff --git a/libgeda/src/o_path_basic.c b/libgeda/src/o_path_basic.c
index bc9f076..6f4292d 100644
--- a/libgeda/src/o_path_basic.c
+++ b/libgeda/src/o_path_basic.c
@@ -96,11 +96,10 @@ OBJECT *o_path_new (TOPLEVEL *toplevel,
  *  parameter.
  *
  *  \param [in]  toplevel  The TOPLEVEL object.
- *  \param [out] list_tail  OBJECT list to copy to.
  *  \param [in]  o_current  Line OBJECT to copy.
  *  \return A new pointer to the end of the object list.
  */
-OBJECT *o_path_copy (TOPLEVEL *toplevel, OBJECT *list_tail, OBJECT *o_current)
+OBJECT *o_path_copy (TOPLEVEL *toplevel, OBJECT *o_current)
 {
   OBJECT *new_obj;
   char *path_string;
@@ -114,7 +113,6 @@ OBJECT *o_path_copy (TOPLEVEL *toplevel, OBJECT *list_tail, OBJECT *o_current)
 
   path_string = s_path_string_from_path (o_current->path);
   new_obj = o_path_new (toplevel, OBJ_PATH, color, path_string);
-  list_tail = s_basic_link_object (new_obj, list_tail);
   g_free (path_string);
 
   /* copy the path type and filling options */
diff --git a/libgeda/src/o_picture.c b/libgeda/src/o_picture.c
index 2e3d6ee..16f92e4 100644
--- a/libgeda/src/o_picture.c
+++ b/libgeda/src/o_picture.c
@@ -661,16 +661,13 @@ void o_picture_translate_world(TOPLEVEL *toplevel,
 /*! \brief Create a copy of a picture.
  *  \par Function Description
  *  This function creates a verbatim copy of the object pointed by
- *  <B>o_current</B> describing a picture. The new object is added at the
- *  end of the list, following the <B>list_tail</B> pointed object.
+ *  <B>o_current</B> describing a picture.
  *
  *  \param [in]  toplevel   The TOPLEVEL object.
- *  \param [out] list_tail  OBJECT list to copy to.
  *  \param [in]  objcet     Picture OBJECT to copy.
- *  \return A new pointer to the end of the object list.
+ *  \return The new OBJECT
  */
-OBJECT *o_picture_copy(TOPLEVEL *toplevel, OBJECT *list_tail,
-		       OBJECT *object)
+OBJECT *o_picture_copy(TOPLEVEL *toplevel, OBJECT *object)
 {
   OBJECT *new_node;
   PICTURE *picture;
@@ -721,11 +718,7 @@ OBJECT *o_picture_copy(TOPLEVEL *toplevel, OBJECT *list_tail,
   /* compute the bounding picture */
   o_picture_recalc(toplevel, new_node);
 
-  /* add the object to the list */
-  list_tail = (OBJECT *) s_basic_link_object(new_node, list_tail);
-
-  /* return the new tail of the object list */
-  return(list_tail);
+  return new_node;
 }
 
 
diff --git a/libgeda/src/o_pin_basic.c b/libgeda/src/o_pin_basic.c
index 6243733..7b27991 100644
--- a/libgeda/src/o_pin_basic.c
+++ b/libgeda/src/o_pin_basic.c
@@ -224,7 +224,7 @@ void o_pin_translate_world(TOPLEVEL *toplevel, int dx, int dy, OBJECT *object)
  *  \par Function Description
  *
  */
-OBJECT *o_pin_copy(TOPLEVEL *toplevel, OBJECT *list_tail, OBJECT *o_current)
+OBJECT *o_pin_copy(TOPLEVEL *toplevel, OBJECT *o_current)
 {
   OBJECT *new_obj;
   int color;
@@ -239,7 +239,6 @@ OBJECT *o_pin_copy(TOPLEVEL *toplevel, OBJECT *list_tail, OBJECT *o_current)
                        o_current->line->x[0], o_current->line->y[0],
                        o_current->line->x[1], o_current->line->y[1],
                        o_current->pin_type, o_current->whichend);
-  list_tail = s_basic_link_object (new_obj, list_tail);
 
   new_obj->line->x[0] = o_current->line->x[0];
   new_obj->line->y[0] = o_current->line->y[0];
diff --git a/libgeda/src/o_text_basic.c b/libgeda/src/o_text_basic.c
index 261ee95..7cf332a 100644
--- a/libgeda/src/o_text_basic.c
+++ b/libgeda/src/o_text_basic.c
@@ -1333,7 +1333,7 @@ void o_text_translate_world(TOPLEVEL *toplevel,
  *  \par Function Description
  *
  */
-OBJECT *o_text_copy(TOPLEVEL *toplevel, OBJECT *list_tail, OBJECT *o_current)
+OBJECT *o_text_copy(TOPLEVEL *toplevel, OBJECT *o_current)
 {
   OBJECT *new_obj;
   int color;
@@ -1352,7 +1352,6 @@ OBJECT *o_text_copy(TOPLEVEL *toplevel, OBJECT *list_tail, OBJECT *o_current)
                         o_current->text->size,
                         o_current->visibility,
                         o_current->show_name_value);
-  list_tail = s_basic_link_object (new_obj, list_tail);
 
   return new_obj;
 }

commit 2550db8e1d981ccab55b7f2ae6e9932198a53b59
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Sun Sep 28 01:03:06 2008 +0100

    Make o_..._add() into o_..._new() which don't link the new OBJECT.
    
    Allows cleaner use of objects where we might want to insert the object
    into a GList rather than a self-linked list of OBJECTs.

diff --git a/gattrib/src/s_object.c b/gattrib/src/s_object.c
index 710c3eb..9eda354 100644
--- a/gattrib/src/s_object.c
+++ b/gattrib/src/s_object.c
@@ -62,7 +62,7 @@
  * way:
  * 1. It creates an object -- "attrib_graphic" -- and fills it in.
  * 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 
+ *    calls o_text_new to add pos info and name=value string
  *    to attrib_graphic.
  * 3. It calls o_attrib_add to wrap attrib_graphic with (attribute OBJECT )
  *
@@ -106,7 +106,7 @@ void s_object_add_net_attrib_to_object(OBJECT *o_current, char *new_attrib_name,
  * way:
  * 1. It creates an object -- "attrib_graphic" -- and fills it in.
  * 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 
+ *    calls o_text_new to add pos info and name=value string
  *    to attrib_graphic.
  * 3. It calls o_attrib_add to wrap attrib_graphic with (attribute OBJECT )
  * Question:  Do I really need separate fcns for comps, nets, and 
@@ -260,6 +260,7 @@ OBJECT *s_object_attrib_add_attrib_in_object(TOPLEVEL * pr_current, char *text_s
   int color;
   int left, right, top, bottom;
   OBJECT *o_current;
+  OBJECT *new_obj;
 
   color = pr_current->detachedattr_color;
 
@@ -308,18 +309,12 @@ OBJECT *s_object_attrib_add_attrib_in_object(TOPLEVEL * pr_current, char *text_s
   printf("     show_name_value = %d \n", show_name_value);
 #endif
 
-  pr_current->page_current->object_tail = o_text_add(pr_current, 
-						    pr_current->page_current->object_tail, 
-						    OBJ_TEXT, 
-						    color, 
-						    world_x, 
-						    world_y, 
-						    LOWER_LEFT, 
-						    0,	/* zero is angle */
-						    text_string, 
-						    DEFAULT_TEXT_SIZE,
-						    visibility,
-						    show_name_value);
+  new_obj = o_text_new (pr_current, OBJ_TEXT, color, world_x, world_y,
+                        LOWER_LEFT, 0, /* zero is angle */
+                        text_string, DEFAULT_TEXT_SIZE,
+                        visibility, show_name_value);
+  pr_current->page_current->object_tail =
+    s_basic_link_object(new_obj, pr_current->page_current->object_tail);
 
   /* now pr_current->page_current->object_tail contains new text item */
 
diff --git a/gschem/src/g_hook.c b/gschem/src/g_hook.c
index 4f367d6..a614563 100644
--- a/gschem/src/g_hook.c
+++ b/gschem/src/g_hook.c
@@ -664,7 +664,7 @@ SCM g_add_component(SCM page_smob, SCM scm_comp_name, SCM scm_x, SCM scm_y,
   gboolean selectable, mirror;
   gchar *comp_name;
   int x, y, angle;
-  OBJECT *new_object;
+  OBJECT *new_obj;
   const CLibSymbol *clib;
 
   /* Return if scm_comp_name is NULL (an empty list) or scheme's FALSE */
@@ -707,17 +707,10 @@ SCM g_add_component(SCM page_smob, SCM scm_comp_name, SCM scm_x, SCM scm_y,
 
   clib = s_clib_get_symbol_by_name (comp_name);
 
-  new_object 
-    = page->object_tail 
-    = o_complex_add(toplevel,
-                    page->object_tail, NULL, 
-                    'C', 
-                    WHITE, 
-                    x, y, 
-                    angle, mirror,
-                    clib, comp_name, 
-                    selectable);
-  o_complex_promote_attribs (toplevel, new_object);
+  new_obj = o_complex_new (toplevel, 'C', WHITE, x, y, angle, mirror,
+                           clib, comp_name, selectable);
+  page->object_tail = s_basic_link_object(new_obj, page->object_tail);
+  o_complex_promote_attribs (toplevel, new_obj);
   
   /* 
    * For now, do not redraw the newly added complex, since this might cause
diff --git a/gschem/src/o_arc.c b/gschem/src/o_arc.c
index 07dc214..984c83e 100644
--- a/gschem/src/o_arc.c
+++ b/gschem/src/o_arc.c
@@ -943,13 +943,14 @@ void o_arc_end1(GSCHEM_TOPLEVEL *w_current, int w_x, int w_y)
 void o_arc_end4(GSCHEM_TOPLEVEL *w_current, int start_angle, int end_angle)
 {
   TOPLEVEL *toplevel = w_current->toplevel;
+  OBJECT *new_obj;
 
   /* create, initialize and link the new arc object */
+  new_obj = o_arc_new(toplevel, OBJ_ARC, w_current->graphic_color,
+                      w_current->first_wx, w_current->first_wy,
+                      w_current->distance, start_angle, end_angle);
   toplevel->page_current->object_tail =
-    o_arc_add(toplevel, toplevel->page_current->object_tail,
-	      OBJ_ARC, w_current->graphic_color,
-	      w_current->first_wx, w_current->first_wy,
-	      w_current->distance, start_angle, end_angle);
+    s_basic_link_object(new_obj, toplevel->page_current->object_tail);
 
   /* draw the new object */
   o_redraw_single(w_current, toplevel->page_current->object_tail);
diff --git a/gschem/src/o_attrib.c b/gschem/src/o_attrib.c
index 1fc814e..de71176 100644
--- a/gschem/src/o_attrib.c
+++ b/gschem/src/o_attrib.c
@@ -165,6 +165,7 @@ OBJECT *o_attrib_add_attrib(GSCHEM_TOPLEVEL *w_current,
 			    int show_name_value, OBJECT *object)
 {
   TOPLEVEL *toplevel = w_current->toplevel;
+  OBJECT *new_obj;
   int world_x = - 1, world_y = -1;
   int color; 
   int left, right, top, bottom;
@@ -236,16 +237,12 @@ OBJECT *o_attrib_add_attrib(GSCHEM_TOPLEVEL *w_current,
   }
 
   /* first create text item */
-  toplevel->page_current->object_tail =
-  o_text_add(toplevel, toplevel->page_current->object_tail,
-             OBJ_TEXT, color,
-             world_x,
-             world_y,
-             LOWER_LEFT,
-             0, /* zero is angle */
-             text_string,
-             w_current->text_size,  /* current text size */ 
+  new_obj = o_text_new(toplevel, OBJ_TEXT, color, world_x, world_y,
+             LOWER_LEFT, 0, /* zero is angle */
+             text_string,  w_current->text_size,  /* current text size */
              visibility, show_name_value);
+  toplevel->page_current->object_tail =
+    s_basic_link_object(new_obj, toplevel->page_current->object_tail);
 
   /* now toplevel->page_current->object_tail contains new text item */
 
diff --git a/gschem/src/o_box.c b/gschem/src/o_box.c
index c455d24..ab4fb95 100644
--- a/gschem/src/o_box.c
+++ b/gschem/src/o_box.c
@@ -902,6 +902,7 @@ void o_box_start(GSCHEM_TOPLEVEL *w_current, int w_x, int w_y)
 void o_box_end(GSCHEM_TOPLEVEL *w_current, int w_x, int w_y)
 {
   TOPLEVEL *toplevel = w_current->toplevel;
+  OBJECT *new_obj;
   int box_width, box_height;
   int box_left, box_top;
 
@@ -931,11 +932,11 @@ void o_box_end(GSCHEM_TOPLEVEL *w_current, int w_x, int w_y)
   }
 
   /* create the object */
+  new_obj = o_box_new(toplevel, OBJ_BOX, w_current->graphic_color,
+                      box_left, box_top,
+                      box_left + box_width, box_top - box_height);
   toplevel->page_current->object_tail =
-  o_box_add(toplevel,
-            toplevel->page_current->object_tail,
-            OBJ_BOX, w_current->graphic_color, 
-	    box_left, box_top, box_left + box_width, box_top - box_height);
+    s_basic_link_object(new_obj, toplevel->page_current->object_tail);
 
   /* draw it */
   o_redraw_single(w_current, toplevel->page_current->object_tail);
diff --git a/gschem/src/o_bus.c b/gschem/src/o_bus.c
index 1551377..e126a9f 100644
--- a/gschem/src/o_bus.c
+++ b/gschem/src/o_bus.c
@@ -237,9 +237,9 @@ void o_bus_start(GSCHEM_TOPLEVEL *w_current, int w_x, int w_y)
 int o_bus_end(GSCHEM_TOPLEVEL *w_current, int w_x, int w_y)
 {
   TOPLEVEL *toplevel = w_current->toplevel;
+  OBJECT *new_obj;
   int color;
   GList *other_objects = NULL;
-  OBJECT *bus_new;
 
   g_assert( w_current->inside_action != 0 );
 
@@ -260,15 +260,13 @@ int o_bus_end(GSCHEM_TOPLEVEL *w_current, int w_x, int w_y)
     return FALSE;
   }
 
-  /* create a new bus object and draw it */
-  bus_new = toplevel->page_current->object_tail =
-    o_bus_add(toplevel,
-	      toplevel->page_current->object_tail,
-	      OBJ_BUS, color,
-	      w_current->first_wx, w_current->first_wy, 
-	      w_current->second_wx, w_current->second_wy, 0);
+  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);
+  toplevel->page_current->object_tail =
+    s_basic_link_object(new_obj, toplevel->page_current->object_tail);
 
-  o_bus_draw(w_current, bus_new);
+  o_bus_draw(w_current, new_obj);
 
   /* connect the new bus to the other busses */
   other_objects = s_conn_return_others(other_objects,
diff --git a/gschem/src/o_circle.c b/gschem/src/o_circle.c
index 87d5e29..562b261 100644
--- a/gschem/src/o_circle.c
+++ b/gschem/src/o_circle.c
@@ -604,6 +604,7 @@ void o_circle_start(GSCHEM_TOPLEVEL *w_current, int w_x, int w_y)
 void o_circle_end(GSCHEM_TOPLEVEL *w_current, int w_x, int w_y)
 {
   TOPLEVEL *toplevel = w_current->toplevel;
+  OBJECT *new_obj;
 
   g_assert( w_current->inside_action != 0 );
 
@@ -618,12 +619,11 @@ void o_circle_end(GSCHEM_TOPLEVEL *w_current, int w_x, int w_y)
   }
 
   /* create the object */
+  new_obj = o_circle_new(toplevel, OBJ_CIRCLE, w_current->graphic_color,
+                         w_current->first_wx, w_current->first_wy,
+                         w_current->distance);
   toplevel->page_current->object_tail =
-    o_circle_add(toplevel,
-		 toplevel->page_current->object_tail,
-		 OBJ_CIRCLE, w_current->graphic_color,
-		 w_current->first_wx, w_current->first_wy, 
-		 w_current->distance);
+    s_basic_link_object(new_obj, toplevel->page_current->object_tail);
 
   /* draw it */
   o_redraw_single(w_current, toplevel->page_current->object_tail);
diff --git a/gschem/src/o_complex.c b/gschem/src/o_complex.c
index 0406cfe..f2e86dc 100644
--- a/gschem/src/o_complex.c
+++ b/gschem/src/o_complex.c
@@ -89,7 +89,7 @@ void o_complex_prepare_place(GSCHEM_TOPLEVEL *w_current, const char *sym_name)
 
   if (w_current->include_complex) {
 
-    o_start = temp_list = add_head();
+    o_start = temp_list = new_head ();
 
     toplevel->ADDING_SEL=1;
     buffer = s_clib_symbol_get_data_by_name (sym_name);
@@ -122,8 +122,7 @@ void o_complex_prepare_place(GSCHEM_TOPLEVEL *w_current, const char *sym_name)
 
     toplevel->ADDING_SEL = 1; /* reuse this flag, rename later hack */
     sym = s_clib_get_symbol_by_name (sym_name);
-    new_object = o_complex_add (toplevel, NULL, NULL,
-                                OBJ_COMPLEX, WHITE, 0, 0, 0, 0,
+    new_object = o_complex_new (toplevel, OBJ_COMPLEX, WHITE, 0, 0, 0, 0,
                                 sym, sym_name, 1);
     promoted = o_complex_get_promotable (toplevel, new_object, TRUE);
 
diff --git a/gschem/src/o_line.c b/gschem/src/o_line.c
index 683b56e..3aff73b 100644
--- a/gschem/src/o_line.c
+++ b/gschem/src/o_line.c
@@ -782,6 +782,7 @@ void o_line_start(GSCHEM_TOPLEVEL *w_current, int w_x, int w_y)
 void o_line_end(GSCHEM_TOPLEVEL *w_current, int w_x, int w_y)
 {
   TOPLEVEL *toplevel = w_current->toplevel;
+  OBJECT *new_obj;
 
   g_assert( w_current->inside_action != 0 );
 
@@ -796,12 +797,12 @@ void o_line_end(GSCHEM_TOPLEVEL *w_current, int w_x, int w_y)
   }
 
   /* create the line object and draw it */
+  new_obj = o_line_new(toplevel, OBJ_LINE,
+                       w_current->graphic_color,
+                       w_current->first_wx, w_current->first_wy,
+                       w_current->second_wx, w_current->second_wy);
   toplevel->page_current->object_tail =
-    o_line_add(toplevel,
-	       toplevel->page_current->object_tail,
-	       OBJ_LINE, w_current->graphic_color, 
-	       w_current->first_wx, w_current->first_wy,
-	       w_current->second_wx, w_current->second_wy);
+    s_basic_link_object(new_obj, toplevel->page_current->object_tail);
 
   o_redraw_single(w_current, toplevel->page_current->object_tail);
   
diff --git a/gschem/src/o_misc.c b/gschem/src/o_misc.c
index ae0d7c9..4d54d51 100644
--- a/gschem/src/o_misc.c
+++ b/gschem/src/o_misc.c
@@ -768,17 +768,15 @@ void o_update_component(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current)
   o_selection_remove( toplevel->page_current->selection_list, o_current);
 
   /* build a temporary list and add a complex to this list */
-  tmp_list = s_basic_new_object(OBJ_HEAD, "update component");
-  new_complex = o_complex_add (toplevel,
-                               tmp_list, NULL,
-                               OBJ_COMPLEX,
-                               WHITE,
+  tmp_list = s_basic_new_object (OBJ_HEAD, "update component");
+  new_complex = o_complex_new (toplevel, OBJ_COMPLEX, WHITE,
                                o_current->complex->x,
                                o_current->complex->y,
                                o_current->complex->angle,
                                o_current->complex->mirror,
                                clib, o_current->complex_basename,
                                1);
+  tmp_list = s_basic_link_object(new_complex, tmp_list);
   o_complex_promote_attribs (toplevel, new_complex);
 
   /* updating the old complex with data from the new one */
diff --git a/gschem/src/o_net.c b/gschem/src/o_net.c
index 3ea9943..3c27c57 100644
--- a/gschem/src/o_net.c
+++ b/gschem/src/o_net.c
@@ -723,13 +723,12 @@ int o_net_end(GSCHEM_TOPLEVEL *w_current, int w_x, int w_y)
 
   if (!primary_zero_length ) {
   /* create primary net */
+      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);
       toplevel->page_current->object_tail =
-	  new_net = o_net_add(toplevel,
-			      toplevel->page_current->object_tail,
-			      OBJ_NET, color, 
-			      w_current->first_wx, w_current->first_wy,
-			      w_current->second_wx, w_current->second_wy);
-  
+        s_basic_link_object(new_net, toplevel->page_current->object_tail);
+
       /* conn stuff */
       /* LEAK CHECK 1 */
       other_objects = s_conn_return_others(other_objects,
@@ -792,13 +791,12 @@ int o_net_end(GSCHEM_TOPLEVEL *w_current, int w_x, int w_y)
   if (!secondary_zero_length && !found_primary_connection) {
       
       /* Add secondary net */
+      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);
       toplevel->page_current->object_tail =
-	  new_net = o_net_add(toplevel,
-			      toplevel->page_current->object_tail,
-			      OBJ_NET, color, 
-			      w_current->second_wx, w_current->second_wy,
-			      w_current->third_wx, w_current->third_wy);
-  
+        s_basic_link_object(new_net, toplevel->page_current->object_tail);
+
       /* conn stuff */
       /* LEAK CHECK 2 */
       other_objects = s_conn_return_others(other_objects,
@@ -1379,23 +1377,21 @@ int o_net_add_busrippers(GSCHEM_TOPLEVEL *w_current, OBJECT *net_obj,
     
     for (i = 0; i < ripper_count; i++) {
       if (w_current->bus_ripper_type == NET_BUS_RIPPER) {
+        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]);
         toplevel->page_current->object_tail =
-          o_net_add(toplevel, toplevel->page_current->object_tail,
-                    OBJ_NET, color,
-                    rippers[i].x[0], rippers[i].y[0],
-                    rippers[i].x[1], rippers[i].y[1]);
+          s_basic_link_object(new_obj, toplevel->page_current->object_tail);
       } else {
 
         if (rippersym != NULL) {
+          new_obj = o_complex_new (toplevel, OBJ_COMPLEX, WHITE,
+                                   rippers[i].x[0], rippers[i].y[0],
+                                   complex_angle, 0,
+                                   rippersym,
+                                   toplevel->bus_ripper_symname, 1);
           toplevel->page_current->object_tail =
-            new_obj = o_complex_add (toplevel,
-                                     toplevel->page_current->object_tail,
-                                     NULL,
-                                     OBJ_COMPLEX, WHITE,
-                                     rippers[i].x[0], rippers[i].y[0],
-                                     complex_angle, 0,
-                                     rippersym,
-                                     toplevel->bus_ripper_symname, 1);
+            s_basic_link_object(new_obj, toplevel->page_current->object_tail);
           o_complex_promote_attribs (toplevel, new_obj);
 
           o_complex_draw (w_current, new_obj);
diff --git a/gschem/src/o_picture.c b/gschem/src/o_picture.c
index e5ae05e..66f4240 100644
--- a/gschem/src/o_picture.c
+++ b/gschem/src/o_picture.c
@@ -81,6 +81,7 @@ void o_picture_start(GSCHEM_TOPLEVEL *w_current, int w_x, int w_y)
 void o_picture_end(GSCHEM_TOPLEVEL *w_current, int w_x, int w_y)
 {
   TOPLEVEL *toplevel = w_current->toplevel;
+  OBJECT *new_obj;
   int picture_width, picture_height;
   int picture_left, picture_top;
 
@@ -102,17 +103,15 @@ void o_picture_end(GSCHEM_TOPLEVEL *w_current, int w_x, int w_y)
   }
 
   /* create the object */
+  new_obj = o_picture_new(toplevel, w_current->current_pixbuf,
+                          NULL, 0, w_current->pixbuf_filename,
+                          w_current->pixbuf_wh_ratio, OBJ_PICTURE,
+                          picture_left, picture_top,
+                          picture_left + picture_width,
+                          picture_top - picture_height,
+                          0, FALSE, FALSE);
   toplevel->page_current->object_tail =
-    o_picture_add(toplevel,
-		  toplevel->page_current->object_tail,
-		  w_current->current_pixbuf,
-		  NULL, 0,
-		  w_current->pixbuf_filename,
-		  w_current->pixbuf_wh_ratio,
-		  OBJ_PICTURE, 
-		  picture_left, picture_top,
-		  picture_left + picture_width, picture_top - picture_height,
-		  0, FALSE, FALSE);
+    s_basic_link_object(new_obj, toplevel->page_current->object_tail);
 
   /* draw it */
   o_redraw_single(w_current, toplevel->page_current->object_tail);
diff --git a/gschem/src/o_pin.c b/gschem/src/o_pin.c
index d9969ac..4273ad6 100644
--- a/gschem/src/o_pin.c
+++ b/gschem/src/o_pin.c
@@ -169,6 +169,7 @@ void o_pin_start(GSCHEM_TOPLEVEL *w_current, int w_x, int w_y)
 void o_pin_end(GSCHEM_TOPLEVEL *w_current, int x, int y)
 {
   TOPLEVEL *toplevel = w_current->toplevel;
+  OBJECT *new_obj;
   int color;
   GList *other_objects = NULL;
   OBJECT *o_current, *o_current_pin;
@@ -191,13 +192,12 @@ void o_pin_end(GSCHEM_TOPLEVEL *w_current, int x, int y)
     return;
   }
 
+  new_obj = o_pin_new(toplevel, OBJ_PIN, color,
+                      w_current->first_wx, w_current->first_wy,
+                      w_current->second_wx, w_current->second_wy,
+                      PIN_TYPE_NET, 0);
   toplevel->page_current->object_tail =
-    o_pin_add(toplevel,
-	      toplevel->page_current->object_tail,
-	      OBJ_PIN, color,
-	      w_current->first_wx, w_current->first_wy,
-	      w_current->second_wx, w_current->second_wy,
-	      PIN_TYPE_NET, 0);
+    s_basic_link_object(new_obj, toplevel->page_current->object_tail);
 
   o_current = o_current_pin = toplevel->page_current->object_tail;
 
diff --git a/gschem/src/o_slot.c b/gschem/src/o_slot.c
index 3546e11..90ae560 100644
--- a/gschem/src/o_slot.c
+++ b/gschem/src/o_slot.c
@@ -105,6 +105,7 @@ void o_slot_start(GSCHEM_TOPLEVEL *w_current, OBJECT *list)
 void o_slot_end(GSCHEM_TOPLEVEL *w_current, const char *string, int len)
 {
   TOPLEVEL *toplevel = w_current->toplevel;
+  OBJECT *new_obj;
   OBJECT *object;
   OBJECT *temp;
   char *slot_value;
@@ -185,17 +186,12 @@ void o_slot_end(GSCHEM_TOPLEVEL *w_current, const char *string, int len)
     } else {
       /* here you need to do the add the slot
          attribute since it doesn't exist */
+      new_obj = o_text_new(toplevel, OBJ_TEXT, w_current->text_color,
+                           object->complex->x, object->complex->y,
+                           LOWER_LEFT, 0, /* zero is angle */
+                           string, 10, INVISIBLE, SHOW_NAME_VALUE);
       toplevel->page_current->object_tail =
-        (OBJECT *) o_text_add(
-                              toplevel,
-                              toplevel->page_current->object_tail,
-                              OBJ_TEXT, w_current->text_color,
-                              object->complex->x, object->complex->y,
-                              LOWER_LEFT,
-                              0, /* zero is angle */
-                              string,
-                              10,
-                              INVISIBLE, SHOW_NAME_VALUE);
+        s_basic_link_object(new_obj, toplevel->page_current->object_tail);
 
       /* manually attach attribute */
 
diff --git a/gschem/src/o_text.c b/gschem/src/o_text.c
index ee1bf49..465438a 100644
--- a/gschem/src/o_text.c
+++ b/gschem/src/o_text.c
@@ -287,7 +287,7 @@ void o_text_prepare_place(GSCHEM_TOPLEVEL *w_current, char *text)
   /* here you need to add OBJ_TEXT when it's done */
   toplevel->page_current->place_list =
     g_list_append(toplevel->page_current->place_list,
-                  o_text_add(toplevel, NULL,
+                  o_text_new(toplevel,
                              OBJ_TEXT, w_current->text_color,
                              0, 0, LOWER_LEFT, 0, /* zero is angle */
                              text,
diff --git a/libgeda/include/prototype.h b/libgeda/include/prototype.h
index ecb19d0..3d30db0 100644
--- a/libgeda/include/prototype.h
+++ b/libgeda/include/prototype.h
@@ -89,7 +89,7 @@ void PAPERSIZEtoWORLD(int width, int height, int border, int *right, int *bottom
 double round_5_2_1(double unrounded);
 
 /* o_arc_basic.c */
-OBJECT *o_arc_add(TOPLEVEL *toplevel, OBJECT *object_list, char type, int color, int x, int y, int radius, int start_angle, int end_angle);
+OBJECT *o_arc_new(TOPLEVEL *toplevel, char type, int color, int x, int y, int radius, int start_angle, int end_angle);
 OBJECT *o_arc_copy(TOPLEVEL *toplevel, OBJECT *list_tail, OBJECT *o_current);
 void o_arc_modify(TOPLEVEL *toplevel, OBJECT *object, int x, int y, int whichone);
 void o_arc_translate_world(TOPLEVEL *toplevel, int dx, int dy, OBJECT *object);
@@ -141,7 +141,7 @@ void o_mirror_world(TOPLEVEL *toplevel, int world_centerx, int world_centery, OB
 gdouble o_shortest_distance(OBJECT *object, gint x, gint y);
 
 /* o_box_basic.c */
-OBJECT *o_box_add(TOPLEVEL *toplevel, OBJECT *object_list, char type, int color, int x1, int y1, int x2, int y2);
+OBJECT *o_box_new(TOPLEVEL *toplevel, char type, int color, int x1, int y1, int x2, int y2);
 OBJECT *o_box_copy(TOPLEVEL *toplevel, OBJECT *list_tail, OBJECT *o_current);
 void o_box_modify(TOPLEVEL *toplevel, OBJECT *object, int x, int y, int whichone);
 void o_box_translate_world(TOPLEVEL *toplevel, int dx, int dy, OBJECT *object);
@@ -149,7 +149,7 @@ void o_box_rotate_world(TOPLEVEL *toplevel, int world_centerx, int world_centery
 void o_box_mirror_world(TOPLEVEL *toplevel, int world_centerx, int world_centery, OBJECT *object);
 
 /* o_bus_basic.c */
-OBJECT *o_bus_add(TOPLEVEL *toplevel, OBJECT *object_list, char type, int color, int x1, int y1, int x2, int y2, int bus_ripper_direction);
+OBJECT *o_bus_new(TOPLEVEL *toplevel, char type, int color, int x1, int y1, int x2, int y2, int bus_ripper_direction);
 void o_bus_translate_world(TOPLEVEL *toplevel, int dx, int dy, OBJECT *object);
 OBJECT *o_bus_copy(TOPLEVEL *toplevel, OBJECT *list_tail, OBJECT *o_current);
 void o_bus_rotate_world(TOPLEVEL *toplevel, int world_centerx, int world_centery, int angle, OBJECT *object);
@@ -162,7 +162,7 @@ void o_bus_modify(TOPLEVEL *toplevel, OBJECT *object, int x, int y, int whichone
 
 /* o_circle_basic.c */
 int dist(int x1, int y1, int x2, int y2);
-OBJECT *o_circle_add(TOPLEVEL *toplevel, OBJECT *object_list, char type, int color, int x, int y, int radius);
+OBJECT *o_circle_new(TOPLEVEL *toplevel, char type, int color, int x, int y, int radius);
 OBJECT *o_circle_copy(TOPLEVEL *toplevel, OBJECT *list_tail, OBJECT *o_current);
 void o_circle_modify(TOPLEVEL *toplevel, OBJECT *object, int x, int y, int whichone);
 void o_circle_translate_world(TOPLEVEL *toplevel, int dx, int dy, OBJECT *object);
@@ -178,17 +178,13 @@ int world_get_object_list_bounds(TOPLEVEL *toplevel, OBJECT *complex,
 int world_get_object_glist_bounds(TOPLEVEL *toplevel, GList *o_list,
 			     int *left, int *top, 
 			     int *right, int *bottom);
-OBJECT *add_head(void);
+OBJECT *new_head(void);
 int o_complex_is_embedded(OBJECT *o_current);
 GList *o_complex_get_promotable (TOPLEVEL *toplevel, OBJECT *object, int detach);
 void o_complex_promote_attribs (TOPLEVEL *toplevel, OBJECT *object);
 void o_complex_remove_promotable_attribs (TOPLEVEL *toplevel, OBJECT *object);
-OBJECT *o_complex_add(TOPLEVEL *toplevel, OBJECT *object_list,
-		      GList **object_glist, char type, int color, 
-		      int x, int y, int angle, int mirror, 
-		      const CLibSymbol *clib_sym, const gchar *basename,
-		      int selectable);
-OBJECT *o_complex_add_embedded(TOPLEVEL *toplevel, OBJECT *object_list, char type, int color, int x, int y, int angle, int mirror, const gchar *basename, int selectable);
+OBJECT *o_complex_new(TOPLEVEL *toplevel, char type, int color, int x, int y, int angle, int mirror, const CLibSymbol *clib_sym, const gchar *basename, int selectable);
+OBJECT *o_complex_new_embedded(TOPLEVEL *toplevel, char type, int color, int x, int y, int angle, int mirror, const gchar *basename, int selectable);
 void o_complex_set_filename(TOPLEVEL *toplevel, const char *basename);
 void o_complex_translate_world(TOPLEVEL *toplevel, int dx, int dy, OBJECT *object);
 OBJECT *o_complex_copy(TOPLEVEL *toplevel, OBJECT *list_tail, OBJECT *o_current);
@@ -211,7 +207,7 @@ void o_embed(TOPLEVEL *toplevel, OBJECT *o_current);
 void o_unembed(TOPLEVEL *toplevel, OBJECT *o_current);
 
 /* o_line_basic.c */
-OBJECT *o_line_add(TOPLEVEL *toplevel, OBJECT *object_list, char type, int color, int x1, int y1, int x2, int y2);
+OBJECT *o_line_new(TOPLEVEL *toplevel, char type, int color, int x1, int y1, int x2, int y2);
 OBJECT *o_line_copy(TOPLEVEL *toplevel, OBJECT *list_tail, OBJECT *o_current);
 void o_line_modify(TOPLEVEL *toplevel, OBJECT *object, int x, int y, int whichone);
 void o_line_translate_world(TOPLEVEL *toplevel, int dx, int dy, OBJECT *object);
@@ -235,7 +231,7 @@ void o_list_mirror_world(TOPLEVEL *toplevel, int x, int y, OBJECT *list);
 void o_glist_mirror_world(TOPLEVEL *toplevel, int x, int y, GList *list);
 
 /* o_net_basic.c */
-OBJECT *o_net_add(TOPLEVEL *toplevel, OBJECT *object_list, char type, int color, int x1, int y1, int x2, int y2);
+OBJECT *o_net_new(TOPLEVEL *toplevel, char type, int color, int x1, int y1, int x2, int y2);
 void o_net_translate_world(TOPLEVEL *toplevel, int dx, int dy, OBJECT *object);
 OBJECT *o_net_copy(TOPLEVEL *toplevel, OBJECT *list_tail, OBJECT *o_current);
 void o_net_rotate_world(TOPLEVEL *toplevel, int world_centerx, int world_centery, int angle, OBJECT *object);
@@ -248,7 +244,7 @@ void o_net_consolidate(TOPLEVEL *toplevel);
 void o_net_modify(TOPLEVEL *toplevel, OBJECT *object, int x, int y, int whichone);
 
 /* o_path_basic.c */
-OBJECT *o_path_add(TOPLEVEL *toplevel, OBJECT *object_list, char type, int color, const char *path_string);
+OBJECT *o_path_new(TOPLEVEL *toplevel, char type, int color, const char *path_string);
 OBJECT *o_path_copy(TOPLEVEL *toplevel, OBJECT *list_tail, OBJECT *o_current);
 void o_path_modify(TOPLEVEL *toplevel, OBJECT *object, int x, int y, int whichone);
 void o_path_translate_world(TOPLEVEL *toplevel, int x, int y, OBJECT *object);
@@ -256,7 +252,7 @@ void o_path_rotate_world(TOPLEVEL *toplevel, int world_centerx, int world_center
 void o_path_mirror_world(TOPLEVEL *toplevel, int world_centerx, int world_centery, OBJECT *object);
 
 /* o_picture.c */
-OBJECT *o_picture_add(TOPLEVEL *toplevel, OBJECT *list_tail, GdkPixbuf *pixbuf,
+OBJECT *o_picture_new(TOPLEVEL *toplevel, GdkPixbuf *pixbuf,
                       gchar *file_content, gsize file_length, char *filename,
                       double ratio, char type,
                       int x1, int y1, int x2, int y2, int angle, char mirrored,
@@ -273,7 +269,7 @@ void o_picture_unembed(TOPLEVEL *toplevel, OBJECT *object);
 GdkPixbuf *o_picture_pixbuf_from_buffer (gchar *file_content, gsize file_length, GError **err);
 
 /* o_pin_basic.c */
-OBJECT *o_pin_add(TOPLEVEL *toplevel, OBJECT *object_list, char type, int color, int x1, int y1, int x2, int y2, int pin_type, int whichend);
+OBJECT *o_pin_new(TOPLEVEL *toplevel, char type, int color, int x1, int y1, int x2, int y2, int pin_type, int whichend);
 void o_pin_translate_world(TOPLEVEL *toplevel, int dx, int dy, OBJECT *object);
 OBJECT *o_pin_copy(TOPLEVEL *toplevel, OBJECT *list_tail, OBJECT *o_current);
 void o_pin_rotate_world(TOPLEVEL *toplevel, int world_centerx, int world_centery, int angle, OBJECT *object);
@@ -290,7 +286,7 @@ void o_selection_select(OBJECT *object, int color); /* DEPRECATED */
 void o_selection_unselect(OBJECT *object);          /* DEPRECATED */
 
 /* o_text_basic.c */
-OBJECT *o_text_add_head(void);
+OBJECT *o_text_new_head(void);
 void o_text_init(void);
 void o_text_print_set(void);
 OBJECT *o_text_load_font(TOPLEVEL *toplevel, gunichar needed_char);
@@ -298,7 +294,7 @@ int o_text_num_lines(const char *string);
 int o_text_height(const char *string, int size);
 int o_text_width(TOPLEVEL *toplevel, char *string, int size);
 OBJECT *o_text_create_string(TOPLEVEL *toplevel, OBJECT *object_list, char *string, int size, int color, int x, int y, int alignment, int angle);
-OBJECT *o_text_add(TOPLEVEL *toplevel, OBJECT *object_list, char type, int color, int x, int y, int alignment, int angle, const char *string, int size, int visibility, int show_name_value);
+OBJECT *o_text_new(TOPLEVEL *toplevel, char type, int color, int x, int y, int alignment, int angle, const char *string, int size, int visibility, int show_name_value);
 void o_text_set_info_font(char buf[]);
 void o_text_recreate(TOPLEVEL *toplevel, OBJECT *o_current);
 void o_text_translate_world(TOPLEVEL *toplevel, int dx, int dy, OBJECT *o_current);
diff --git a/libgeda/src/o_arc_basic.c b/libgeda/src/o_arc_basic.c
index 9eafe18..215f84a 100644
--- a/libgeda/src/o_arc_basic.c
+++ b/libgeda/src/o_arc_basic.c
@@ -33,10 +33,8 @@ void (*arc_draw_func)() = NULL;
 
 /*! \brief
  *  \par Function Description
- *  The function creates a new object of type arc and links it
- *  with the object pointed by parameter object_list. As the
- *  new object is then the last object of the list, its pointer
- *  is returned to update the end of list pointer in the calling function.
+ *  The function creates a new OBJECT of type arc.
+ *
  *  The arc is defined by its center in parameters x and y.
  *  The radius parameter specifies the radius of the arc. The start
  *  angle is given by start_angle and the end angle by end_angle.
@@ -52,7 +50,6 @@ void (*arc_draw_func)() = NULL;
  *  Now fixed for world coordinates.
  *
  *  \param [in] toplevel    The TOPLEVEL object.
- *  \param [in] object_list  
  *  \param [in] type
  *  \param [in] color
  *  \param [in] x
@@ -62,7 +59,7 @@ void (*arc_draw_func)() = NULL;
  *  \param [in] end_angle
  *  \return
  */
-OBJECT *o_arc_add(TOPLEVEL *toplevel, OBJECT *object_list,
+OBJECT *o_arc_new(TOPLEVEL *toplevel,
 		  char type, int color,
 		  int x, int y, int radius, int start_angle, int end_angle)
 {
@@ -112,14 +109,7 @@ OBJECT *o_arc_add(TOPLEVEL *toplevel, OBJECT *object_list,
   new_node->draw_func = arc_draw_func;  
   new_node->sel_func = select_func;
 
-  /* \note
-   * The new object is linked to the object given in parameter object_list
-   * and then returned as a pointer to the calling function.
-   */
-
-  object_list = (OBJECT *) s_basic_link_object(new_node, object_list);
-	
-  return(object_list);
+  return new_node;
 }
 
 /*! \brief 
@@ -151,11 +141,12 @@ OBJECT *o_arc_copy(TOPLEVEL *toplevel, OBJECT *list_tail,
     color = o_current->saved_color;
   }
 
-  new_obj = o_arc_add(toplevel, list_tail, OBJ_ARC, color,
-                      o_current->arc->x, o_current->arc->y, 
-                      o_current->arc->width / 2,
-                      o_current->arc->start_angle,
-                      o_current->arc->end_angle);
+  new_obj = o_arc_new (toplevel, OBJ_ARC, color,
+                       o_current->arc->x, o_current->arc->y,
+                       o_current->arc->width / 2,
+                       o_current->arc->start_angle,
+                       o_current->arc->end_angle);
+  list_tail = s_basic_link_object (new_obj, list_tail);
   o_set_line_options(toplevel, new_obj,
                      o_current->line_end, o_current->line_type,
                      o_current->line_width,
@@ -163,7 +154,7 @@ OBJECT *o_arc_copy(TOPLEVEL *toplevel, OBJECT *list_tail,
   o_set_fill_options(toplevel, new_obj,
                      FILLING_HOLLOW, -1, -1, -1, -1, -1);
 
-  return(new_obj);
+  return new_obj;
 }
 
 /*! \brief
@@ -243,7 +234,7 @@ void o_arc_modify(TOPLEVEL *toplevel, OBJECT *object,
  *  The object is initialized with the functions #o_set_line_options() and #o_set_fill_options().
  *  The second one is only used to put initialize unused values for an arc as an arc can not be filled.
  * 
- *  The arc is allocated initialized and linked with the function #o_arc_add().
+ *  The arc is allocated initialized with the function #o_arc_new().
  * 
  *  A negative or null radius is not allowed.
  *
@@ -257,6 +248,7 @@ void o_arc_modify(TOPLEVEL *toplevel, OBJECT *object,
 OBJECT *o_arc_read(TOPLEVEL *toplevel, OBJECT *object_list, char buf[],
 		   unsigned int release_ver, unsigned int fileformat_ver)
 {
+  OBJECT *new_obj;
   char type; 
   int x1, y1;
   int radius;
@@ -300,15 +292,17 @@ OBJECT *o_arc_read(TOPLEVEL *toplevel, OBJECT *object_list, char buf[],
   }
 
   /* Allocation and initialization */
-  object_list = o_arc_add(toplevel, object_list, OBJ_ARC, color,
-                          x1, y1, radius, start_angle, end_angle);
-  o_set_line_options(toplevel, object_list,
+  new_obj = o_arc_new(toplevel, OBJ_ARC, color,
+                      x1, y1, radius, start_angle, end_angle);
+  o_set_line_options(toplevel, new_obj,
                      arc_end, arc_type, arc_width, arc_length,
                      arc_space);
-  o_set_fill_options(toplevel, object_list,
+  o_set_fill_options(toplevel, new_obj,
                      FILLING_HOLLOW, -1, -1, -1,
                      -1, -1);
 
+  object_list = s_basic_link_object(new_obj, object_list);
+
   return(object_list);
 }
 
diff --git a/libgeda/src/o_box_basic.c b/libgeda/src/o_box_basic.c
index ae9ab95..466dfac 100644
--- a/libgeda/src/o_box_basic.c
+++ b/libgeda/src/o_box_basic.c
@@ -52,11 +52,10 @@
 /*! Default setting for draw function. */
 void (*box_draw_func)() = NULL;
 
-/*! \brief Create a BOX and add it to a list.
+/*! \brief Create a BOX OBJECT
  *  \par Function Description
  *  This function creates a new object representing a box.
- *  This object is added to the end of the list <B>object_list</B>
- *  pointed object belongs to.
+ *
  *  The box is described by its upper left corner - <B>x1</B>, <B>y1</B> - and
  *  its lower right corner - <B>x2</B>, <B>y2</B>.
  *  The <B>type</B> parameter must be equal to <B>OBJ_BOX</B>. The <B>color</B>
@@ -69,20 +68,16 @@ void (*box_draw_func)() = NULL;
  *  line type with a width of 0, and no filling. It can be changed after
  *  with the #o_set_line_options() and #o_set_fill_options().
  *
- *  The object is added to the end of the list described by the <B>object_list</B>
- *  parameter by the #s_basic_link_object().
- *
- *  \param [in]     toplevel    The TOPLEVEL object.
- *  \param [in,out] object_list  OBJECT list to add box to.
+ *  \param [in]     toplevel     The TOPLEVEL object.
  *  \param [in]     type         Box type.
  *  \param [in]     color        Box border color.
  *  \param [in]     x1           Upper x coordinate.
  *  \param [in]     y1           Upper y coordinate.
  *  \param [in]     x2           Lower x coordinate.
  *  \param [in]     y2           Lower y coordinate.
- *  \return A new pointer on the end of the <B>object_list</B>
+ *  \return The new OBJECT
  */
-OBJECT *o_box_add(TOPLEVEL *toplevel, OBJECT *object_list,
+OBJECT *o_box_new(TOPLEVEL *toplevel,
 		  char type, int color,
 		  int x1, int y1, int x2, int y2)
 {
@@ -114,10 +109,7 @@ OBJECT *o_box_add(TOPLEVEL *toplevel, OBJECT *object_list,
   /* compute the bounding box */
   o_box_recalc(toplevel, new_node);
 
-  /* add the object to the list */
-  object_list = (OBJECT *) s_basic_link_object(new_node, object_list);
-
-  return(object_list);
+  return new_node;
 }
 
 /*! \brief Copy a box to a list.
@@ -142,16 +134,10 @@ OBJECT *o_box_copy(TOPLEVEL *toplevel, OBJECT *list_tail, OBJECT *o_current)
     color = o_current->saved_color;
   }
 
-  /* 
-   * A new box object is added at the end of the object list with
-   * #o_box_add(). Values for its fields are default and need to
-   * be modified.
-   */
-
-  /* create and link a new box object */	
-  new_obj = o_box_add(toplevel, list_tail,
-		      OBJ_BOX, color,
-		      0, 0, 0, 0);
+  /* A new box object is created with #o_box_new().
+   * Values for its fields are default and need to be modified. */
+  new_obj = o_box_new (toplevel, OBJ_BOX, color, 0, 0, 0, 0);
+  list_tail = s_basic_link_object (new_obj, list_tail);
 
   /*
    * The dimensions of the new box are set with the ones of the original box.
@@ -181,7 +167,7 @@ OBJECT *o_box_copy(TOPLEVEL *toplevel, OBJECT *list_tail, OBJECT *o_current)
   /* new_obj->attribute = 0;*/
 
   /* return the new tail of the object list */
-  return(new_obj);
+  return new_obj;
 } 
 
 /*! \brief Modify a BOX OBJECT's coordinates.
@@ -284,6 +270,7 @@ void o_box_modify(TOPLEVEL *toplevel, OBJECT *object,
 OBJECT *o_box_read(TOPLEVEL *toplevel, OBJECT *object_list, char buf[],
 		   unsigned int release_ver, unsigned int fileformat_ver)
 {
+  OBJECT *new_obj;
   char type; 
   int x1, y1;
   int width, height; 
@@ -363,10 +350,8 @@ OBJECT *o_box_read(TOPLEVEL *toplevel, OBJECT *object_list, char buf[],
   d_x2 = x1+width; /* end points of the box */
   d_y2 = y1;
   
-  /* create and add the box to the list */
-  object_list = (OBJECT *) o_box_add(toplevel, object_list,
-				     type, color,
-				     d_x1, d_y1, d_x2, d_y2);
+  /* create a new box */
+  new_obj = o_box_new(toplevel, type, color, d_x1, d_y1, d_x2, d_y2);
   /* set its line options */
   o_set_line_options(toplevel, object_list,
 		     box_end, box_type, box_width, 
@@ -375,6 +360,8 @@ OBJECT *o_box_read(TOPLEVEL *toplevel, OBJECT *object_list, char buf[],
   o_set_fill_options(toplevel, object_list,
 		     box_filling, fill_width,
 		     pitch1, angle1, pitch2, angle2);
+  /* Add the box to the object list */
+  object_list = s_basic_link_object(new_obj, object_list);
   return(object_list);
 }
 
diff --git a/libgeda/src/o_bus_basic.c b/libgeda/src/o_bus_basic.c
index b322d20..7192374 100644
--- a/libgeda/src/o_bus_basic.c
+++ b/libgeda/src/o_bus_basic.c
@@ -48,7 +48,7 @@ void world_get_bus_bounds(TOPLEVEL *toplevel, OBJECT *object, int *left, int *to
  * \par Function Description
  *
  */
-OBJECT *o_bus_add(TOPLEVEL *toplevel, OBJECT *object_list,
+OBJECT *o_bus_new(TOPLEVEL *toplevel,
 		  char type, int color,
 		  int x1, int y1, int x2, int y2,
 		  int bus_ripper_direction)
@@ -74,15 +74,13 @@ OBJECT *o_bus_add(TOPLEVEL *toplevel, OBJECT *object_list,
   new_node->draw_func = bus_draw_func;  
   new_node->sel_func = select_func;  
 
-  object_list = (OBJECT *) s_basic_link_object(new_node, object_list);
-
-  s_tile_add_line_object(toplevel, object_list);
+  s_tile_add_line_object(toplevel, new_node);
 
   if (!toplevel->ADDING_SEL) {
-    s_conn_update_object(toplevel, object_list);
+    s_conn_update_object(toplevel, new_node);
   }
 
-  return(object_list);
+  return new_node;
 }
 
 /* \brief
@@ -117,6 +115,7 @@ void o_bus_recalc(TOPLEVEL *toplevel, OBJECT *o_current)
 OBJECT *o_bus_read(TOPLEVEL *toplevel, OBJECT *object_list, char buf[],
 		   unsigned int release_ver, unsigned int fileformat_ver)
 {
+  OBJECT *new_obj;
   char type; 
   int x1, y1;
   int x2, y2;
@@ -159,8 +158,11 @@ OBJECT *o_bus_read(TOPLEVEL *toplevel, OBJECT *object_list, char buf[],
     ripper_dir = 0;
   }
 
-  object_list = o_bus_add(toplevel, object_list, type, color,
-                          d_x1, d_y1, d_x2, d_y2, ripper_dir);
+  new_obj = o_bus_new(toplevel, type, color,
+                      d_x1, d_y1, d_x2, d_y2, ripper_dir);
+
+  object_list = s_basic_link_object(new_obj, object_list);
+
   return(object_list);
 }
 
@@ -231,17 +233,18 @@ OBJECT *o_bus_copy(TOPLEVEL *toplevel, OBJECT *list_tail, OBJECT *o_current)
   /* still doesn't work... you need to pass in the new values */
   /* or don't update and update later */
   /* I think for now I'll disable the update and manually update */
-  new_obj = o_bus_add(toplevel, list_tail, OBJ_BUS, color,
-                      o_current->line->x[0], o_current->line->y[0],
-                      o_current->line->x[1], o_current->line->y[1],
-                      o_current->bus_ripper_direction);
+  new_obj = o_bus_new (toplevel, OBJ_BUS, color,
+                       o_current->line->x[0], o_current->line->y[0],
+                       o_current->line->x[1], o_current->line->y[1],
+                       o_current->bus_ripper_direction);
+  list_tail = s_basic_link_object (new_obj, list_tail);
 
   new_obj->line->x[0] = o_current->line->x[0];
   new_obj->line->y[0] = o_current->line->y[0];
   new_obj->line->x[1] = o_current->line->x[1];
   new_obj->line->y[1] = o_current->line->y[1];
 
-  return(new_obj);
+  return new_obj;
 }
 
 /* \brief
diff --git a/libgeda/src/o_circle_basic.c b/libgeda/src/o_circle_basic.c
index e10c3b4..cfd6d1d 100644
--- a/libgeda/src/o_circle_basic.c
+++ b/libgeda/src/o_circle_basic.c
@@ -41,8 +41,8 @@ int dist(int x1, int y1, int x2, int y2)
 
 /*! \brief Create and add circle OBJECT to list.
  *  \par Function Description
- *  This function creates a new object representing a circle. This object is
- *  added to the end of the list <B>object_list</B> pointed object belongs to.
+ *  This function creates a new object representing a circle.
+ *
  *  The circle is described by its center (<B>x</B>,<B>y</B>) and its radius
  *  <B>radius</B>.
  *  The <B>type</B> parameter must be equal to <B>OBJ_CIRCLE</B>. The <B>color</B>
@@ -56,11 +56,7 @@ int dist(int x1, int y1, int x2, int y2)
  *  line type with a width of 0, and no filling. It can be changed after
  *  with #o_set_line_options() and #o_set_fill_options().
  *
- *  The object is added to the end of the list described by the
- *  <B>object_list</B> parameter with #s_basic_link_object().
- *
- *  \param [in]     toplevel    The TOPLEVEL object.
- *  \param [in,out] object_list  OBJECT list to add circle to.
+ *  \param [in]     toplevel     The TOPLEVEL object.
  *  \param [in]     type         Must be OBJ_CIRCLE.
  *  \param [in]     color        Circle line color.
  *  \param [in]     x            Center x coordinate.
@@ -68,7 +64,7 @@ int dist(int x1, int y1, int x2, int y2)
  *  \param [in]     radius       Radius of new circle.
  *  \return A pointer to the new end of the object list.
  */
-OBJECT *o_circle_add(TOPLEVEL *toplevel, OBJECT *object_list,
+OBJECT *o_circle_new(TOPLEVEL *toplevel,
 		     char type, int color,
 		     int x, int y, int radius)
 {
@@ -96,11 +92,8 @@ OBJECT *o_circle_add(TOPLEVEL *toplevel, OBJECT *object_list,
   
   /* compute the bounding box coords */
   o_circle_recalc(toplevel, new_node);
-  
-  /* add the object to the list */
-  object_list = (OBJECT *) s_basic_link_object(new_node, object_list);
 
-  return(object_list);
+  return new_node;
 }
 
 /*! \brief Create a copy of a circle.
@@ -127,16 +120,11 @@ OBJECT *o_circle_copy(TOPLEVEL *toplevel, OBJECT *list_tail,
     color = o_current->saved_color;
   }
 
-  /*
-   * A new circle object is added at the end of the object list with
-   * #o_circle_add(). Values for its fields are default and need to be
-   * modified.
-   */
-  /* create and link a new circle object */
-  new_obj = o_circle_add(toplevel, list_tail, OBJ_CIRCLE,
-			 color, 
-			 0, 0, 0);
-  
+  /* A new circle object is created with #o_circle_new().
+   * Values for its fields are default and need to be modified. */
+  new_obj = o_circle_new (toplevel, OBJ_CIRCLE, color, 0, 0, 0);
+  list_tail = s_basic_link_object (new_obj, list_tail);
+
   /*
    * The parameters of the new circle are set with the ones of the original
    * circle. The two circle have the same line type and the same filling
@@ -162,7 +150,7 @@ OBJECT *o_circle_copy(TOPLEVEL *toplevel, OBJECT *list_tail,
 
   /*	new_obj->attribute = 0;*/
 
-  return(new_obj);
+  return new_obj;
 }
 
 /*! \brief Modify the description of a circle OBJECT.
@@ -242,6 +230,7 @@ void o_circle_modify(TOPLEVEL *toplevel, OBJECT *object,
 OBJECT *o_circle_read(TOPLEVEL *toplevel, OBJECT *object_list, char buf[],
 		      unsigned int release_ver, unsigned int fileformat_ver)
 {
+  OBJECT *new_obj;
   char type; 
   int x1, y1;
   int radius;
@@ -307,13 +296,14 @@ OBJECT *o_circle_read(TOPLEVEL *toplevel, OBJECT *object_list, char buf[],
    * Its filling and line type are set according to the values of the field
    * on the line.
    */
-  object_list = (OBJECT *) o_circle_add(toplevel, object_list,
-					type, color, x1, y1, radius);
-  o_set_line_options(toplevel, object_list,
+  new_obj = o_circle_new(toplevel, type, color, x1, y1, radius);
+  o_set_line_options(toplevel, new_obj,
 		     circle_end, circle_type, circle_width, 
 		     circle_length, circle_space);
-  o_set_fill_options(toplevel, object_list,
+  o_set_fill_options(toplevel, new_obj,
 		     circle_fill, fill_width, pitch1, angle1, pitch2, angle2);
+
+  object_list = s_basic_link_object(new_obj, object_list);
   
   return(object_list);
 }
diff --git a/libgeda/src/o_complex_basic.c b/libgeda/src/o_complex_basic.c
index 284c5f1..165d8f6 100644
--- a/libgeda/src/o_complex_basic.c
+++ b/libgeda/src/o_complex_basic.c
@@ -213,7 +213,7 @@ void world_get_complex_bounds(TOPLEVEL *toplevel, OBJECT *complex,
  *  \par Function Description
  *
  */
-OBJECT *add_head()
+OBJECT *new_head ()
 {
   OBJECT *new_node=NULL;
 
@@ -221,7 +221,7 @@ OBJECT *add_head()
 
   /* don't need to do this for head nodes */
   /* ret = (OBJECT *) s_basic_link_object(new_node, NULL);*/
-  return(new_node);
+  return new_node;
 }
 
 /*! \brief
@@ -424,8 +424,8 @@ void o_complex_remove_promotable_attribs (TOPLEVEL *toplevel, OBJECT *object)
  *  \par Function Description
  *
  */
-OBJECT *o_complex_add(TOPLEVEL *toplevel, OBJECT *object_list,
-		      GList **object_glist, char type,
+OBJECT *o_complex_new(TOPLEVEL *toplevel,
+		      char type,
 		      int color, int x, int y, int angle,
 		      int mirror, const CLibSymbol *clib,
 		      const gchar *basename,
@@ -433,20 +433,15 @@ OBJECT *o_complex_add(TOPLEVEL *toplevel, OBJECT *object_list,
 {
   OBJECT *new_node=NULL;
   OBJECT *prim_objs=NULL;
+  OBJECT *new_prim_obj;
   OBJECT *tmp;
   int save_adding_sel = 0;
   int loaded_normally = FALSE;
-  gboolean use_object_list;
 
   gchar *buffer;
 
-  if (object_list) {
-    use_object_list = TRUE;
-  } else {
-    use_object_list = FALSE;
-  }
-
   new_node = s_basic_new_object(type, "complex");
+  new_node->type = type;
 
   if (clib != NULL) {
     new_node->complex_basename = g_strdup (s_clib_symbol_get_name (clib));
@@ -476,7 +471,7 @@ OBJECT *o_complex_add(TOPLEVEL *toplevel, OBJECT *object_list,
   }
 
   /* this was at the beginning and p_complex was = to complex */
-  prim_objs = (OBJECT *) add_head();
+  prim_objs = new_head ();
 
   /* get the symbol data */
   if (clib != NULL) {
@@ -505,23 +500,26 @@ OBJECT *o_complex_add(TOPLEVEL *toplevel, OBJECT *object_list,
     new_node->type = OBJ_PLACEHOLDER;
 
     /* Mark the origin of the missing component */
-    prim_objs = o_line_add(toplevel, prim_objs, OBJ_LINE,
+    new_prim_obj = o_line_new(toplevel, OBJ_LINE,
                            DETACHED_ATTRIBUTE_COLOR,
                            x - 50, y, x + 50, y);
-    prim_objs = o_line_add(toplevel, prim_objs, OBJ_LINE,
+    prim_objs = s_basic_link_object(new_prim_obj, prim_objs);
+    new_prim_obj = o_line_new(toplevel, OBJ_LINE,
                            DETACHED_ATTRIBUTE_COLOR,
                            x, y + 50, x, y - 50); 
+    prim_objs = s_basic_link_object(new_prim_obj, prim_objs);
 
     /* Add some useful text */
     not_found_text = 
       g_strdup_printf (_("Component not found:\n %s"),
 		       new_node->complex_basename);
-    prim_objs = o_text_add(toplevel, prim_objs,
+    new_prim_obj = o_text_new(toplevel,
                            OBJ_TEXT, DETACHED_ATTRIBUTE_COLOR, 
                            x + NOT_FOUND_TEXT_X, 
                            y + NOT_FOUND_TEXT_Y, LOWER_LEFT, 0, 
                            not_found_text, 8,
                            VISIBLE, SHOW_NAME_VALUE);
+    prim_objs = s_basic_link_object(new_prim_obj, prim_objs);
     g_free(not_found_text);
 
     /* figure out where to put the hazard triangle */
@@ -531,36 +529,40 @@ OBJECT *o_complex_add(TOPLEVEL *toplevel, OBJECT *object_list,
     y_offset = bottom - top + 100;  /* 100 is just an additional offset */
 
     /* add hazard triangle */
-    prim_objs = o_line_add(toplevel, prim_objs, OBJ_LINE,
+    new_prim_obj = o_line_new(toplevel, OBJ_LINE,
                            DETACHED_ATTRIBUTE_COLOR,
                            x + NOT_FOUND_TEXT_X + x_offset, 
                            y + NOT_FOUND_TEXT_Y + y_offset, 
                            x + NOT_FOUND_TEXT_X + x_offset + 600, 
                            y + NOT_FOUND_TEXT_Y + y_offset); 
-    o_set_line_options(toplevel, prim_objs, END_ROUND, TYPE_SOLID,
+    o_set_line_options(toplevel, new_prim_obj, END_ROUND, TYPE_SOLID,
                        50, -1, -1);
-    prim_objs = o_line_add(toplevel, prim_objs, OBJ_LINE,
+    prim_objs = s_basic_link_object(new_prim_obj, prim_objs);
+    new_prim_obj = o_line_new(toplevel, OBJ_LINE,
                            DETACHED_ATTRIBUTE_COLOR,
                            x + NOT_FOUND_TEXT_X + x_offset, 
                            y + NOT_FOUND_TEXT_Y + y_offset, 
                            x + NOT_FOUND_TEXT_X + x_offset + 300, 
                            y + NOT_FOUND_TEXT_Y + y_offset + 500); 
-    o_set_line_options(toplevel, prim_objs, END_ROUND, TYPE_SOLID,
+    o_set_line_options(toplevel, new_prim_obj, END_ROUND, TYPE_SOLID,
                        50, -1, -1);
-    prim_objs = o_line_add(toplevel, prim_objs, OBJ_LINE,
+    prim_objs = s_basic_link_object(new_prim_obj, prim_objs);
+    new_prim_obj = o_line_new(toplevel, OBJ_LINE,
                            DETACHED_ATTRIBUTE_COLOR,
                            x + NOT_FOUND_TEXT_X + x_offset + 300, 
                            y + NOT_FOUND_TEXT_Y + y_offset + 500, 
                            x + NOT_FOUND_TEXT_X + x_offset + 600, 
                            y + NOT_FOUND_TEXT_Y + y_offset); 
-    o_set_line_options(toplevel, prim_objs, END_ROUND, TYPE_SOLID,
+    o_set_line_options(toplevel, new_prim_obj, END_ROUND, TYPE_SOLID,
                        50, -1, -1);
-    prim_objs = o_text_add(toplevel, prim_objs,
+    prim_objs = s_basic_link_object(new_prim_obj, prim_objs);
+    new_prim_obj = o_text_new(toplevel,
                            OBJ_TEXT, DETACHED_ATTRIBUTE_COLOR, 
                            x + NOT_FOUND_TEXT_X + x_offset + 270, 
                            y + NOT_FOUND_TEXT_Y + y_offset + 90, 
                            LOWER_LEFT, 0, "!", 18,
                            VISIBLE, SHOW_NAME_VALUE);
+    prim_objs = s_basic_link_object(new_prim_obj, prim_objs);
     prim_objs = save_prim_objs;
 
   } else {
@@ -599,29 +601,16 @@ OBJECT *o_complex_add(TOPLEVEL *toplevel, OBJECT *object_list,
     tmp->complex_parent = new_node;
   }
 
-  if (use_object_list) {
-    object_list = (OBJECT *) s_basic_link_object(new_node, object_list);
-  } else {
-    if (object_glist) {
-      *object_glist = g_list_append (*object_glist, new_node);
-      o_glist_relink_objects (*object_glist);
-    }
-    object_list = new_node;
-  }
-
-  if (use_object_list)
-    o_complex_recalc(toplevel, object_list);
-  else
-    o_complex_recalc(toplevel, new_node);
+  o_complex_recalc(toplevel, new_node);
 
-  return(object_list);
+  return new_node;
 }
 
 /*! \brief
  *  \par Function Description
  *
  */
-OBJECT *o_complex_add_embedded(TOPLEVEL *toplevel, OBJECT *object_list,
+OBJECT *o_complex_new_embedded(TOPLEVEL *toplevel,
 			       char type, int color, int x, int y, int angle, int mirror,
 			       const gchar *basename, int selectable)
 {
@@ -653,11 +642,9 @@ OBJECT *o_complex_add_embedded(TOPLEVEL *toplevel, OBJECT *object_list,
     new_node->sel_func = NULL;
   }
 
-  object_list = (OBJECT *) s_basic_link_object(new_node, object_list);
-
   /* this was at the beginning and p_complex was = to complex */
-  prim_objs = (OBJECT *) add_head();
-  object_list->complex->prim_objs = prim_objs;
+  prim_objs = new_head ();
+  new_node->complex->prim_objs = prim_objs;
 
   /* set the parent field now */
   for (tmp = prim_objs; tmp != NULL; tmp = tmp->next) {
@@ -666,7 +653,7 @@ OBJECT *o_complex_add_embedded(TOPLEVEL *toplevel, OBJECT *object_list,
 
   /* don't have to translate/rotate/mirror here at all since the */
   /* object is in place */
-  return(object_list);
+  return new_node;
 }
 
 /*! \brief
@@ -701,6 +688,7 @@ OBJECT *o_complex_read(TOPLEVEL *toplevel, OBJECT *object_list,
 		       char buf[], unsigned int release_ver,
 		       unsigned int fileformat_ver)
 {
+  OBJECT *new_obj;
   char type; 
   int x1, y1;
   int angle;
@@ -739,24 +727,25 @@ OBJECT *o_complex_read(TOPLEVEL *toplevel, OBJECT *object_list,
   }
   if (strncmp(basename, "EMBEDDED", 8) == 0) {
     
-  object_list = o_complex_add_embedded(toplevel,
-                                       object_list, type, 
-                                       WHITE, x1, y1, angle, mirror,
-                                       basename + 8, 
-                                       selectable);
+    new_obj = o_complex_new_embedded(toplevel, type,
+                                     WHITE, x1, y1, angle, mirror,
+                                     basename + 8,
+                                     selectable);
   } else {
     
     const CLibSymbol *clib = s_clib_get_symbol_by_name (basename);
 
-    object_list = o_complex_add(toplevel, object_list, NULL, type,
+    new_obj = o_complex_new(toplevel, type,
                                 WHITE, 
                                 x1, y1, 
                                 angle, mirror, clib,
                                 basename, selectable);
     /* Delete or hide attributes eligible for promotion inside the complex */
-     o_complex_remove_promotable_attribs (toplevel, object_list);
+     o_complex_remove_promotable_attribs (toplevel, new_obj);
   }
 
+  object_list = s_basic_link_object(new_obj, object_list);
+
   return object_list;
 }
 
@@ -840,12 +829,14 @@ OBJECT *o_complex_copy(TOPLEVEL *toplevel, OBJECT *list_tail,
 
   clib = s_clib_get_symbol_by_name (o_current->complex_basename);
 
-  new_obj = o_complex_add (toplevel, list_tail, NULL, o_current->type, color,
+  new_obj = o_complex_new (toplevel, o_current->type, color,
                            o_current->complex->x, o_current->complex->y,
                            o_current->complex->angle,
                            o_current->complex->mirror,
                            clib, o_current->complex_basename,
                            selectable);
+  list_tail = s_basic_link_object (new_obj, list_tail);
+
   /* Delete or hide attributes eligible for promotion inside the complex */
    o_complex_remove_promotable_attribs (toplevel, new_obj);
 
@@ -857,7 +848,7 @@ OBJECT *o_complex_copy(TOPLEVEL *toplevel, OBJECT *list_tail,
    * connected to the new list, probably make an attribute list and
    * fill it with sid's of the attributes */
 
-  return(new_obj);
+  return new_obj;
 }
 
 /*! \brief
@@ -887,13 +878,14 @@ OBJECT *o_complex_copy_embedded(TOPLEVEL *toplevel, OBJECT *list_tail,
     selectable = FALSE;	
   }
 
-  new_obj = o_complex_add_embedded(toplevel, list_tail, o_current->type,
-                                   color,
-                                   o_current->complex->x, o_current->complex->y, 
-                                   o_current->complex->angle, 
-                                   o_current->complex->mirror,
-                                   o_current->complex_basename, 
-                                   selectable); 
+  new_obj = o_complex_new_embedded (toplevel, o_current->type, color,
+                                    o_current->complex->x, o_current->complex->y,
+                                    o_current->complex->angle,
+                                    o_current->complex->mirror,
+                                    o_current->complex_basename,
+                                    selectable);
+  list_tail = s_basic_link_object (new_obj, list_tail);
+
   /* deal with stuff that has changed */
 	
   temp_list = o_list_copy_all(toplevel,
@@ -914,7 +906,7 @@ OBJECT *o_complex_copy_embedded(TOPLEVEL *toplevel, OBJECT *list_tail,
    * connected to the new list, probably make an attribute list and
    * fill it with sid's of the attributes */
 
-  return(new_obj);
+  return new_obj;
 }
 
 /*! \brief
diff --git a/libgeda/src/o_line_basic.c b/libgeda/src/o_line_basic.c
index 0b05015..dc7938f 100644
--- a/libgeda/src/o_line_basic.c
+++ b/libgeda/src/o_line_basic.c
@@ -34,8 +34,7 @@ void (*line_draw_func)() = NULL;
 /*! \brief Create and add line OBJECT to list.
  *  \par Function Description
  *  This function creates a new object representing a line.
- *  This object is added to the end of the list <B>object_list</B>
- *  pointed object belongs to.
+ *
  *  The line is described by its two ends - <B>x1</B>,<B>y1</B> and
  *  <B>x2</B>,<B>y2</B>.
  *  The <B>type</B> parameter must be equal to #OBJ_LINE.
@@ -51,11 +50,7 @@ void (*line_draw_func)() = NULL;
  *  It can be changed after with the #o_set_line_options() and
  *  #o_set_fill_options().
  *
- *  The object is added to the end of the list described by the 
- *  <B>object_list</B> parameter by the #s_basic_link_object().
- *
- *  \param [in]     toplevel    The TOPLEVEL object.
- *  \param [in,out] object_list  OBJECT list to add line to.
+ *  \param [in]     toplevel     The TOPLEVEL object.
  *  \param [in]     type         Must be OBJ_LINE.
  *  \param [in]     color        Circle line color.
  *  \param [in]     x1           Upper x coordinate.
@@ -64,7 +59,7 @@ void (*line_draw_func)() = NULL;
  *  \param [in]     y2           Lower y coordinate.
  *  \return A pointer to the new end of the object list.
  */
-OBJECT *o_line_add(TOPLEVEL *toplevel, OBJECT *object_list,
+OBJECT *o_line_new(TOPLEVEL *toplevel,
 		   char type, int color, 
 		   int x1, int y1, int x2, int y2)
 {
@@ -93,10 +88,8 @@ OBJECT *o_line_add(TOPLEVEL *toplevel, OBJECT *object_list,
   
   /* compute bounding box */
   o_line_recalc(toplevel, new_node);
-  
-  object_list = (OBJECT *) s_basic_link_object(new_node, object_list);
-    
-  return(object_list);
+
+  return new_node;
 }
 
 /*! \brief Create a copy of a line.
@@ -122,14 +115,10 @@ OBJECT *o_line_copy(TOPLEVEL *toplevel, OBJECT *list_tail, OBJECT *o_current)
     color = o_current->saved_color;
   }
 
-  /*
-   * A new line object is added a the end of the object list with
-   * #o_line_add(). Values for its fields are default and need to
-   * be modified.
-   */
-  new_obj = o_line_add(toplevel, list_tail,
-		       OBJ_LINE, color,
-		       0, 0, 0, 0);
+  /* A new line object is created with #o_line_new().
+   * Values for its fields are default and need to be modified. */
+  new_obj = o_line_new (toplevel, OBJ_LINE, color, 0, 0, 0, 0);
+  list_tail = s_basic_link_object (new_obj, list_tail);
 
   /*
    * The coordinates of the ends of the new line are set with the ones
@@ -161,7 +150,7 @@ OBJECT *o_line_copy(TOPLEVEL *toplevel, OBJECT *list_tail, OBJECT *o_current)
   /* new_obj->attribute = 0;*/
 
   /* return the new tail of the object list */
-  return(new_obj);
+  return new_obj;
 }
 
 /*! \brief Modify the description of a line OBJECT.
@@ -239,6 +228,7 @@ void o_line_modify(TOPLEVEL *toplevel, OBJECT *object,
 OBJECT *o_line_read(TOPLEVEL *toplevel, OBJECT *object_list, char buf[],
 		    unsigned int release_ver, unsigned int fileformat_ver)
 {
+  OBJECT *new_obj;
   char type; 
   int x1, y1;
   int x2, y2;
@@ -302,16 +292,17 @@ OBJECT *o_line_read(TOPLEVEL *toplevel, OBJECT *object_list, char buf[],
    * type is set according to the values of the fields on the line.
    */
   /* create and add the line to the list */
-  object_list = o_line_add(toplevel, object_list,
-			   type, color, d_x1, d_y1, d_x2, d_y2);
+  new_obj = o_line_new(toplevel, type, color, d_x1, d_y1, d_x2, d_y2);
   /* set its line options */
-  o_set_line_options(toplevel, object_list,
+  o_set_line_options(toplevel, new_obj,
 		     line_end, line_type, line_width, line_length, 
 		     line_space);
   /* filling is irrelevant for line, just set to default */
-  o_set_fill_options(toplevel, object_list,
+  o_set_fill_options(toplevel, new_obj,
 		     FILLING_HOLLOW, -1, -1, -1, -1, -1);
 
+  object_list = s_basic_link_object(new_obj, object_list);
+
   return(object_list);
 }
 
diff --git a/libgeda/src/o_net_basic.c b/libgeda/src/o_net_basic.c
index a59b7de..37a1a90 100644
--- a/libgeda/src/o_net_basic.c
+++ b/libgeda/src/o_net_basic.c
@@ -53,7 +53,6 @@ void world_get_net_bounds(TOPLEVEL *toplevel, OBJECT *object, int *left,
  *  \par Function Description
  *
  *  \param [in]     toplevel    The TOPLEVEL object.
- *  \param [in,out] object_list
  *  \param [in]     type
  *  \param [in]     color
  *  \param [in]     x1
@@ -62,7 +61,7 @@ void world_get_net_bounds(TOPLEVEL *toplevel, OBJECT *object, int *left,
  *  \param [in]     y2
  *  \return OBJECT *
  */
-OBJECT *o_net_add(TOPLEVEL *toplevel, OBJECT *object_list, char type,
+OBJECT *o_net_new(TOPLEVEL *toplevel, char type,
 		  int color, int x1, int y1, int x2, int y2)
 {
   OBJECT *new_node;
@@ -84,15 +83,12 @@ OBJECT *o_net_add(TOPLEVEL *toplevel, OBJECT *object_list, char type,
   new_node->draw_func = net_draw_func;
   new_node->sel_func = select_func;
 
-  object_list = (OBJECT *) s_basic_link_object(new_node, object_list);
-
-
   if (!toplevel->ADDING_SEL) {
-    s_tile_add_line_object(toplevel, object_list);
-    s_conn_update_object(toplevel, object_list);
+    s_tile_add_line_object(toplevel, new_node);
+    s_conn_update_object(toplevel, new_node);
   }
 
-  return (object_list);
+  return new_node;
 }
 
 /*! \todo Finish function documentation!!!
@@ -132,6 +128,7 @@ void o_net_recalc(TOPLEVEL *toplevel, OBJECT *o_current)
 OBJECT *o_net_read(TOPLEVEL *toplevel, OBJECT *object_list, char buf[],
 		   unsigned int release_ver, unsigned int fileformat_ver)
 {
+  OBJECT *new_obj;
   char type;
   int x1, y1;
   int x2, y2;
@@ -161,9 +158,10 @@ OBJECT *o_net_read(TOPLEVEL *toplevel, OBJECT *object_list, char buf[],
     color = WHITE;
   }
 
-  object_list =
-  o_net_add(toplevel, object_list, type, color, d_x1, d_y1, d_x2,
-            d_y2);
+  new_obj = o_net_new(toplevel, type, color, d_x1, d_y1, d_x2, d_y2);
+
+  object_list = s_basic_link_object(new_obj, object_list);
+
   return (object_list);
 }
 
@@ -242,16 +240,17 @@ OBJECT *o_net_copy(TOPLEVEL *toplevel, OBJECT *list_tail,
   /* still doesn't work... you need to pass in the new values */
   /* or don't update and update later */
   /* I think for now I'll disable the update and manually update */
-  new_obj = o_net_add(toplevel, list_tail, OBJ_NET, color,
-                      o_current->line->x[0], o_current->line->y[0],
-                      o_current->line->x[1], o_current->line->y[1]);
+  new_obj = o_net_new (toplevel, OBJ_NET, color,
+                       o_current->line->x[0], o_current->line->y[0],
+                       o_current->line->x[1], o_current->line->y[1]);
+  list_tail = s_basic_link_object (new_obj, list_tail);
 
   new_obj->line->x[0] = o_current->line->x[0];
   new_obj->line->y[0] = o_current->line->y[0];
   new_obj->line->x[1] = o_current->line->x[1];
   new_obj->line->y[1] = o_current->line->y[1];
 
-  return (new_obj);
+  return new_obj;
 }
 
 /*! \todo Finish function documentation!!!
diff --git a/libgeda/src/o_path_basic.c b/libgeda/src/o_path_basic.c
index bba88b1..bc9f076 100644
--- a/libgeda/src/o_path_basic.c
+++ b/libgeda/src/o_path_basic.c
@@ -57,12 +57,11 @@ void (*path_draw_func)() = NULL;
  *  <B>object_list</B> parameter by the #s_basic_link_object().
  *
  *  \param [in]     toplevel     The TOPLEVEL object.
- *  \param [in,out] object_list  OBJECT list to add path to.
  *  \param [in]     type         Must be OBJ_PATH.
  *  \param [in]     color        Circle path color.
  *  \return A pointer to the new end of the object list.
  */
-OBJECT *o_path_add (TOPLEVEL *toplevel, OBJECT *object_list,
+OBJECT *o_path_new (TOPLEVEL *toplevel,
                     char type, int color, const char *path_string)
 {
   OBJECT *new_node;
@@ -85,9 +84,7 @@ OBJECT *o_path_add (TOPLEVEL *toplevel, OBJECT *object_list,
   /* compute bounding box */
   o_path_recalc (toplevel, new_node);
 
-  object_list = (OBJECT *) s_basic_link_object (new_node, object_list);
-
-  return object_list;
+  return new_node;
 }
 
 
@@ -115,13 +112,9 @@ OBJECT *o_path_copy (TOPLEVEL *toplevel, OBJECT *list_tail, OBJECT *o_current)
     color = o_current->saved_color;
   }
 
-  /*
-   * A new path object is added a the end of the object list with
-   * #o_path_add ().
-   */
-
   path_string = s_path_string_from_path (o_current->path);
-  new_obj = o_path_add (toplevel, list_tail, OBJ_PATH, color, path_string);
+  new_obj = o_path_new (toplevel, OBJ_PATH, color, path_string);
+  list_tail = s_basic_link_object (new_obj, list_tail);
   g_free (path_string);
 
   /* copy the path type and filling options */
@@ -170,6 +163,7 @@ OBJECT *o_path_read (TOPLEVEL *toplevel, OBJECT *object_list,
                      const char *first_line, TextBuffer *tb,
                      unsigned int release_ver, unsigned int fileformat_ver)
 {
+  OBJECT *new_obj;
   char type;
   int color;
   int line_width, line_space, line_length;
@@ -222,8 +216,8 @@ OBJECT *o_path_read (TOPLEVEL *toplevel, OBJECT *object_list,
   string = g_string_free (pathstr, FALSE);
   string = remove_last_nl (string);
 
-  /* create and add the path to the list */
-  object_list = o_path_add (toplevel, object_list, type, color, string);
+  /* create a new path */
+  new_obj = o_path_new (toplevel, type, color, string);
   g_free (string);
 
   /* set its line options */
@@ -233,6 +227,8 @@ OBJECT *o_path_read (TOPLEVEL *toplevel, OBJECT *object_list,
   o_set_fill_options (toplevel, object_list,
                       fill_type, fill_width, pitch1, angle1, pitch2, angle2);
 
+  /* Add the path to the object list */
+  object_list = s_basic_link_object(new_obj, object_list);
   return object_list;
 }
 
diff --git a/libgeda/src/o_picture.c b/libgeda/src/o_picture.c
index 6f889cf..2e3d6ee 100644
--- a/libgeda/src/o_picture.c
+++ b/libgeda/src/o_picture.c
@@ -62,6 +62,7 @@ OBJECT *o_picture_read(TOPLEVEL *toplevel, OBJECT *object_list,
 		       unsigned int release_ver,
 		       unsigned int fileformat_ver)
 {
+  OBJECT *new_obj;
   int x1, y1;
   int width, height, angle;
   gchar mirrored, embedded;
@@ -208,17 +209,19 @@ OBJECT *o_picture_read(TOPLEVEL *toplevel, OBJECT *object_list,
     g_free (temp_filename);
   }
   
-  /* create and add the picture to the list */
+  /* create the picture */
   /* The picture is described by its upper left and lower right corner */
-  object_list = o_picture_add(toplevel, object_list, pixbuf,
-                              file_content, file_length, filename,
-                              (double)height/ width,
-                              type,
-                              x1, y1+height, x1+width, y1,
-                              angle, mirrored, embedded);
+  new_obj = o_picture_new(toplevel, pixbuf,
+                          file_content, file_length, filename,
+                          (double)height/ width,
+                          type,
+                          x1, y1+height, x1+width, y1,
+                          angle, mirrored, embedded);
 
   /* Don't free file_content, it is now owned by the picture object */
 
+  object_list = s_basic_link_object(new_obj, object_list);
+
   return(object_list);
 }
 
@@ -298,8 +301,7 @@ char *o_picture_save(OBJECT *object)
 /*! \brief Create and add picture OBJECT to list.
  *  \par Function Description
  *  This function creates a new object representing a picture.
- *  This object is added to the end of the list <B>list_tail</B> pointed
- *  object belongs to.
+ *
  *  The picture is described by its upper left corner - <B>x1</B>, <B>y1</B> -
  *  and its lower right corner - <B>x2</B>, <B>y2</B>.
  *  The <B>type</B> parameter must be equal to #OBJ_PICTURE. 
@@ -308,11 +310,7 @@ char *o_picture_save(OBJECT *object)
  *  function. The structure describing the picture is allocated and
  *  initialized with the parameters given to the function.
  *
- *  The object is added to the end of the list described by the
- *  <B>object_list</B> parameter by the #s_basic_link_object().
- *
  *  \param [in]     toplevel      The TOPLEVEL object.
- *  \param [in,out] list_tail     OBJECT list to add line to.
  *  \param [in]     pixbuf        The GdkPixbuf picture to add.
  *                                A copy of this pixbuf is made.
  *  \param [in]     file_content  Raw data of the image file.
@@ -333,7 +331,7 @@ char *o_picture_save(OBJECT *object)
  *  \param [in]     embedded      Whether the embedded flag should be set or not.
  *  \return A pointer to the new end of the object list.
  */
-OBJECT *o_picture_add(TOPLEVEL *toplevel, OBJECT *list_tail, GdkPixbuf *pixbuf,
+OBJECT *o_picture_new(TOPLEVEL *toplevel, GdkPixbuf *pixbuf,
                       gchar *file_content, gsize file_length, char *filename,
                       double ratio, char type,
                       int x1, int y1, int x2, int y2, int angle, char mirrored,
@@ -370,10 +368,7 @@ OBJECT *o_picture_add(TOPLEVEL *toplevel, OBJECT *list_tail, GdkPixbuf *pixbuf,
   /* compute the bounding picture */
   o_picture_recalc(toplevel, new_node);
 
-  /* add the object to the list */
-  list_tail = (OBJECT *) s_basic_link_object(new_node, list_tail);
-
-  return(list_tail);
+  return new_node;
 }
 
 /*! \brief Recalculate picture bounding box.
diff --git a/libgeda/src/o_pin_basic.c b/libgeda/src/o_pin_basic.c
index 78846ab..6243733 100644
--- a/libgeda/src/o_pin_basic.c
+++ b/libgeda/src/o_pin_basic.c
@@ -47,7 +47,7 @@ void world_get_pin_bounds(TOPLEVEL *toplevel, OBJECT *object, int *left, int *to
  *  \par Function Description
  *
  */
-OBJECT *o_pin_add(TOPLEVEL *toplevel, OBJECT *object_list,
+OBJECT *o_pin_new(TOPLEVEL *toplevel,
 		  char type, int color,
 		  int x1, int y1, int x2, int y2, int pin_type, int whichend)
 {
@@ -72,14 +72,12 @@ OBJECT *o_pin_add(TOPLEVEL *toplevel, OBJECT *object_list,
   new_node->pin_type = pin_type;
   new_node->whichend = whichend;
   
-  object_list = (OBJECT *) s_basic_link_object(new_node, object_list);
-
   if (!toplevel->ADDING_SEL) {
-    s_tile_add_line_object(toplevel, object_list);
-    s_conn_update_object(toplevel, object_list);
+    s_tile_add_line_object(toplevel, new_node);
+    s_conn_update_object(toplevel, new_node);
   }
 
-  return(object_list);
+  return new_node;
 }
 
 /*! \todo Finish function documentation!!!
@@ -112,6 +110,7 @@ void o_pin_recalc(TOPLEVEL *toplevel, OBJECT *o_current)
 OBJECT *o_pin_read(TOPLEVEL *toplevel, OBJECT *object_list, char buf[],
 		   unsigned int release_ver, unsigned int fileformat_ver)
 {
+  OBJECT *new_obj;
   char type; 
   int x1, y1;
   int x2, y2;
@@ -158,8 +157,11 @@ OBJECT *o_pin_read(TOPLEVEL *toplevel, OBJECT *object_list, char buf[],
     color = toplevel->override_pin_color;
   }
 
-  object_list = o_pin_add(toplevel, object_list, type, color, d_x1, d_y1,
-                          d_x2, d_y2, pin_type, whichend);
+  new_obj = o_pin_new(toplevel, type, color, d_x1, d_y1,
+                      d_x2, d_y2, pin_type, whichend);
+
+  object_list = s_basic_link_object(new_obj, object_list);
+
   return(object_list);
 }
 
@@ -233,10 +235,11 @@ OBJECT *o_pin_copy(TOPLEVEL *toplevel, OBJECT *list_tail, OBJECT *o_current)
     color = o_current->saved_color;
   }
 
-  new_obj = o_pin_add(toplevel, list_tail, OBJ_PIN, color,
-                      o_current->line->x[0], o_current->line->y[0],
-                      o_current->line->x[1], o_current->line->y[1],
-                      o_current->pin_type, o_current->whichend);
+  new_obj = o_pin_new (toplevel, OBJ_PIN, color,
+                       o_current->line->x[0], o_current->line->y[0],
+                       o_current->line->x[1], o_current->line->y[1],
+                       o_current->pin_type, o_current->whichend);
+  list_tail = s_basic_link_object (new_obj, list_tail);
 
   new_obj->line->x[0] = o_current->line->x[0];
   new_obj->line->y[0] = o_current->line->y[0];
@@ -245,7 +248,7 @@ OBJECT *o_pin_copy(TOPLEVEL *toplevel, OBJECT *list_tail, OBJECT *o_current)
 
   /*	new_obj->attribute = 0;*/
 
-  return(new_obj);
+  return new_obj;
 }
 
 /*! \todo Finish function documentation!!!
diff --git a/libgeda/src/o_text_basic.c b/libgeda/src/o_text_basic.c
index 9d76eb7..261ee95 100644
--- a/libgeda/src/o_text_basic.c
+++ b/libgeda/src/o_text_basic.c
@@ -110,7 +110,7 @@ int world_get_text_bounds(TOPLEVEL *toplevel, OBJECT *o_current, int *left,
  *  \par Function Description
  *
  */
-OBJECT *o_text_add_head(void)
+OBJECT *o_text_new_head (void)
 {
   OBJECT *new_node=NULL;
 
@@ -118,7 +118,7 @@ OBJECT *o_text_add_head(void)
 
   /* don't need to do this for head nodes */
   /* ret = s_basic_link_object(new_node, NULL);*/
-  return(new_node);
+  return new_node;
 }
 
 /*! \todo Finish function documentation!!!
@@ -237,7 +237,7 @@ OBJECT *o_text_load_font(TOPLEVEL *toplevel, gunichar needed_char)
   o_font_set->font_text_size = 100;
 
   o_font_set->name = g_strdup_printf ("%c", needed_char);
-  o_font_set->font_prim_objs = o_text_add_head();
+  o_font_set->font_prim_objs = o_text_new_head ();
   
   /* Add it to the list and hash table. Some functions will need it */
   g_hash_table_insert (font_loaded,
@@ -423,6 +423,7 @@ OBJECT *o_text_create_string(TOPLEVEL *toplevel, OBJECT *object_list,
 {
   OBJECT *temp_tail=NULL;
   OBJECT *temp_list;
+  OBJECT *temp_obj;
   OBJECT *start_of_char;
   int x_offset;
   int y_offset;
@@ -767,9 +768,10 @@ OBJECT *o_text_create_string(TOPLEVEL *toplevel, OBJECT *object_list,
 	  /* Now add the overbar (if it is not a zero length overbar) */
 	  if ( (overbar_startx != overbar_endx) ||
 	       (overbar_starty != overbar_endy) ) {
-	    temp_list = o_line_add(toplevel, temp_list, OBJ_LINE, color,
+	    temp_obj = o_line_new(toplevel, OBJ_LINE, color,
 				   overbar_startx, overbar_starty,
 				   overbar_endx, overbar_endy);
+      temp_list = s_basic_link_object(temp_obj, temp_list);
 	  }
 
 	  if (!((c == '\n') && (overbar_started))) {
@@ -896,12 +898,11 @@ OBJECT *o_text_create_string(TOPLEVEL *toplevel, OBJECT *object_list,
 /*! \todo Finish function documentation!!!
  *  \brief Creates a text OBJECT and the graphical objects representing it
  *  \par Function Description
- *  Create an OBJECT of type OBJ_TEXT and link it to the end of object_list.
+ *  Create an OBJECT of type OBJ_TEXT.
  *  Also add the OBJECTs forming the graphical representation of the visible
  *  string, to the text OBJECT's prim_objs list.
  *
  *  \param [in]  toplevel              The TOPLEVEL object.
- *  \param [in]  object_list            OBJECT list onto which to add text.
  *  \param [in]  type                   OBJ_TEXT (TODO: why bother)
  *  \param [in]  color                  The color of the text.
  *  \param [in]  x                      World x coord of text.
@@ -917,7 +918,7 @@ OBJECT *o_text_create_string(TOPLEVEL *toplevel, OBJECT *object_list,
  *  \note
  *  Caller is responsible for string; this function allocates its own copy.
  */
-OBJECT *o_text_add(TOPLEVEL *toplevel, OBJECT *object_list,
+OBJECT *o_text_new(TOPLEVEL *toplevel,
 		   char type, int color, int x, int y, int alignment,
 		   int angle, const char *string, int size, 
 		   int visibility, int show_name_value)
@@ -954,39 +955,33 @@ OBJECT *o_text_add(TOPLEVEL *toplevel, OBJECT *object_list,
   new_node->visibility = visibility; 
   new_node->show_name_value = show_name_value;
 
-  /* create the object in the main list */
-  /* object_list points to the object */
-  /* I use it below as a sanity check to make sure it was linked */
-  /* properly */ 
-  object_list = (OBJECT *) s_basic_link_object(new_node, object_list);
-
   update_disp_string (new_node);
 
   /* now start working on the complex */
-  temp_list = o_text_add_head();
+  temp_list = o_text_new_head ();
 
   if (visibility == VISIBLE ||
       (visibility == INVISIBLE && toplevel->show_hidden_text)) {
-    object_list->text->prim_objs = 
+    new_node->text->prim_objs =
       o_text_create_string(toplevel, temp_list,
                            text->disp_string, size, color,
                            x, y, alignment, angle); 
-    object_list->text->displayed_width = o_text_width(toplevel,
-                                                      text->disp_string, size/2);
-    object_list->text->displayed_height = o_text_height(text->disp_string, size);
+    new_node->text->displayed_width = o_text_width(toplevel,
+                                                   text->disp_string, size/2);
+    new_node->text->displayed_height = o_text_height(text->disp_string, size);
   } else {
-    object_list->text->prim_objs = NULL;
-    object_list->text->displayed_width = 0;
-    object_list->text->displayed_height = 0;
+    new_node->text->prim_objs = NULL;
+    new_node->text->displayed_width = 0;
+    new_node->text->displayed_height = 0;
     s_delete(toplevel, temp_list);
   }
 
   /* Update bounding box */
-  o_text_recalc( toplevel, object_list );
+  o_text_recalc( toplevel, new_node );
 
   g_free(name);
   g_free(value);
-  return(object_list);
+  return new_node;
 }
 
 /*! \todo Finish function documentation!!!
@@ -1023,6 +1018,7 @@ OBJECT *o_text_read(TOPLEVEL *toplevel, OBJECT *object_list,
 		    unsigned int release_ver,
 		    unsigned int fileformat_ver)
 {
+  OBJECT *new_obj;
   char type; 
   int x, y;
   int color;
@@ -1140,11 +1136,13 @@ OBJECT *o_text_read(TOPLEVEL *toplevel, OBJECT *object_list,
     }
   }
   
-  object_list = o_text_add(toplevel, object_list, type, color, x, y,
-                           alignment, angle, string, 
-                           size, visibility, show_name_value);
+  new_obj = o_text_new(toplevel, type, color, x, y,
+                       alignment, angle, string,
+                       size, visibility, show_name_value);
   g_free(string);
 
+  object_list = s_basic_link_object(new_obj, object_list);
+
   return(object_list);
 }
 
@@ -1279,7 +1277,7 @@ void o_text_recreate(TOPLEVEL *toplevel, OBJECT *o_current)
 
     /* need to create that head node if complex is null */
     if (text->prim_objs == NULL) {
-      text->prim_objs = o_text_add_head ();
+      text->prim_objs = o_text_new_head ();
     }
 
     text->prim_objs = o_text_create_string (toplevel,
@@ -1346,17 +1344,17 @@ OBJECT *o_text_copy(TOPLEVEL *toplevel, OBJECT *list_tail, OBJECT *o_current)
     color = o_current->saved_color;
   }
 
-  new_obj = o_text_add(toplevel, list_tail, OBJ_TEXT,
-                       color, 
-                       o_current->text->x, o_current->text->y, 
-                       o_current->text->alignment, 
-                       o_current->text->angle,
-                       o_current->text->string, 
-                       o_current->text->size, 
-                       o_current->visibility, 
-                       o_current->show_name_value); 
-
-  return(new_obj);
+  new_obj = o_text_new (toplevel, OBJ_TEXT, color,
+                        o_current->text->x, o_current->text->y,
+                        o_current->text->alignment,
+                        o_current->text->angle,
+                        o_current->text->string,
+                        o_current->text->size,
+                        o_current->visibility,
+                        o_current->show_name_value);
+  list_tail = s_basic_link_object (new_obj, list_tail);
+
+  return new_obj;
 }
 
 /*! \todo Finish function documentation!!!

commit 70e6c7c4e5c765a30137c0f93b4ec08fd5802030
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Sun Sep 28 01:02:59 2008 +0100

    Add critical warning for unknown object types in o_list_copy_to ()
    
    This makes the switch on object->type consistent with many of the other
    functions which use this construct.

diff --git a/libgeda/src/o_list.c b/libgeda/src/o_list.c
index 4eece4c..4729018 100644
--- a/libgeda/src/o_list.c
+++ b/libgeda/src/o_list.c
@@ -113,6 +113,11 @@ OBJECT *o_list_copy_to(TOPLEVEL *toplevel, OBJECT *list_head,
     case(OBJ_ARC):
       end = (OBJECT *) o_arc_copy(toplevel, end, selected);
       break;
+
+    default:
+      g_critical ("o_list_copy_to: object %p has bad type '%c'\n",
+                  selected, selected->type);
+      return list_head;
   }
 
   /* Store a reference in the copied object to where it was copied.




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