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

gEDA-cvs: gaf.git: branch: master updated (1.5.0-20080706-348-g9dd241d)



The branch, master has been updated
       via  9dd241d9f87ad78f27772e9490d3afa2a80621bf (commit)
      from  54d2fd7dc6bf09dad1d9657c5cd3635bb31e14b7 (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      |    3 +--
 gschem/src/g_hook.c         |    2 +-
 gschem/src/o_arc.c          |    3 +--
 gschem/src/o_attrib.c       |    3 +--
 gschem/src/o_box.c          |    3 +--
 gschem/src/o_bus.c          |    3 +--
 gschem/src/o_circle.c       |    3 +--
 gschem/src/o_line.c         |    3 +--
 gschem/src/o_net.c          |   12 ++++--------
 gschem/src/o_picture.c      |    3 +--
 gschem/src/o_pin.c          |    3 +--
 gschem/src/o_place.c        |    3 +--
 gschem/src/o_slot.c         |    3 +--
 libgeda/include/prototype.h |    1 +
 libgeda/src/s_page.c        |    5 +++++
 15 files changed, 22 insertions(+), 31 deletions(-)


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

commit 9dd241d9f87ad78f27772e9490d3afa2a80621bf
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Tue Dec 9 01:38:21 2008 +0000

    libgeda: Add convenience function for adding objects to the page
    
    Adds s_page_append() which links the passed object to the end of the
    page's object list.

:100644 100644 9eda354... 37dfe0a... M	gattrib/src/s_object.c
:100644 100644 67fdace... 21dd7ae... M	gschem/src/g_hook.c
:100644 100644 c70221c... cdf2f2b... M	gschem/src/o_arc.c
:100644 100644 de71176... 174adb8... M	gschem/src/o_attrib.c
:100644 100644 f046b8e... 936128a... M	gschem/src/o_box.c
:100644 100644 bd37485... cfe8591... M	gschem/src/o_bus.c
:100644 100644 991dfe6... 4275f7d... M	gschem/src/o_circle.c
:100644 100644 73e80d0... e81fad4... M	gschem/src/o_line.c
:100644 100644 ee06e93... 1c98089... M	gschem/src/o_net.c
:100644 100644 37a91bb... eb4f5c5... M	gschem/src/o_picture.c
:100644 100644 b6a3580... 14b3e23... M	gschem/src/o_pin.c
:100644 100644 dc08567... 21d7ccc... M	gschem/src/o_place.c
:100644 100644 90ae560... 1f284ba... M	gschem/src/o_slot.c
:100644 100644 68fb9c4... 69196f6... M	libgeda/include/prototype.h
:100644 100644 0b50f1b... 38c6b27... M	libgeda/src/s_page.c

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

commit 9dd241d9f87ad78f27772e9490d3afa2a80621bf
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Tue Dec 9 01:38:21 2008 +0000

    libgeda: Add convenience function for adding objects to the page
    
    Adds s_page_append() which links the passed object to the end of the
    page's object list.

diff --git a/gattrib/src/s_object.c b/gattrib/src/s_object.c
index 9eda354..37dfe0a 100644
--- a/gattrib/src/s_object.c
+++ b/gattrib/src/s_object.c
@@ -313,8 +313,7 @@ OBJECT *s_object_attrib_add_attrib_in_object(TOPLEVEL * pr_current, char *text_s
                         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);
+  s_page_append (pr_current->page_current, new_obj);
 
   /* 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 67fdace..21dd7ae 100644
--- a/gschem/src/g_hook.c
+++ b/gschem/src/g_hook.c
@@ -703,7 +703,7 @@ SCM g_add_component(SCM page_smob, SCM scm_comp_name, SCM scm_x, SCM scm_y,
 
   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);
+  s_page_append (page, new_obj);
   o_complex_promote_attribs (toplevel, new_obj);
   
   /* 
diff --git a/gschem/src/o_arc.c b/gschem/src/o_arc.c
index c70221c..cdf2f2b 100644
--- a/gschem/src/o_arc.c
+++ b/gschem/src/o_arc.c
@@ -945,8 +945,7 @@ void o_arc_end4(GSCHEM_TOPLEVEL *w_current, int radius,
   new_obj = o_arc_new(toplevel, OBJ_ARC, w_current->graphic_color,
                       w_current->first_wx, w_current->first_wy,
                       radius, start_angle, end_angle);
-  toplevel->page_current->object_tail =
-    s_basic_link_object(new_obj, toplevel->page_current->object_tail);
+  s_page_append (toplevel->page_current, new_obj);
 
   /* 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 de71176..174adb8 100644
--- a/gschem/src/o_attrib.c
+++ b/gschem/src/o_attrib.c
@@ -241,8 +241,7 @@ OBJECT *o_attrib_add_attrib(GSCHEM_TOPLEVEL *w_current,
              LOWER_LEFT, 0, /* zero is angle */
              text_string,  w_current->text_size,  /* current text size */
              visibility, show_name_value);
-  toplevel->page_current->object_tail =
-    s_basic_link_object(new_obj, toplevel->page_current->object_tail);
+  s_page_append (toplevel->page_current, new_obj);
 
   /* 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 f046b8e..936128a 100644
--- a/gschem/src/o_box.c
+++ b/gschem/src/o_box.c
@@ -832,8 +832,7 @@ void o_box_end(GSCHEM_TOPLEVEL *w_current, int w_x, int w_y)
   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 =
-    s_basic_link_object(new_obj, toplevel->page_current->object_tail);
+  s_page_append (toplevel->page_current, new_obj);
 
   /* 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 bd37485..cfe8591 100644
--- a/gschem/src/o_bus.c
+++ b/gschem/src/o_bus.c
@@ -261,8 +261,7 @@ int o_bus_end(GSCHEM_TOPLEVEL *w_current, int w_x, int w_y)
   new_obj = o_bus_new(toplevel, OBJ_BUS, color,
                       w_current->first_wx, w_current->first_wy,
                       w_current->second_wx, w_current->second_wy, 0);
-  toplevel->page_current->object_tail =
-    s_basic_link_object(new_obj, toplevel->page_current->object_tail);
+  s_page_append (toplevel->page_current, new_obj);
 
   o_bus_draw(w_current, new_obj);
 
diff --git a/gschem/src/o_circle.c b/gschem/src/o_circle.c
index 991dfe6..4275f7d 100644
--- a/gschem/src/o_circle.c
+++ b/gschem/src/o_circle.c
@@ -587,8 +587,7 @@ void o_circle_end(GSCHEM_TOPLEVEL *w_current, int w_x, int w_y)
   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 =
-    s_basic_link_object(new_obj, toplevel->page_current->object_tail);
+  s_page_append (toplevel->page_current, new_obj);
 
   /* draw it */
   o_redraw_single(w_current, toplevel->page_current->object_tail);
diff --git a/gschem/src/o_line.c b/gschem/src/o_line.c
index 73e80d0..e81fad4 100644
--- a/gschem/src/o_line.c
+++ b/gschem/src/o_line.c
@@ -800,8 +800,7 @@ void o_line_end(GSCHEM_TOPLEVEL *w_current, int w_x, int w_y)
                        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 =
-    s_basic_link_object(new_obj, toplevel->page_current->object_tail);
+  s_page_append (toplevel->page_current, new_obj);
 
   o_redraw_single(w_current, toplevel->page_current->object_tail);
   
diff --git a/gschem/src/o_net.c b/gschem/src/o_net.c
index ee06e93..1c98089 100644
--- a/gschem/src/o_net.c
+++ b/gschem/src/o_net.c
@@ -722,8 +722,7 @@ int o_net_end(GSCHEM_TOPLEVEL *w_current, int w_x, int w_y)
       new_net = o_net_new(toplevel, OBJ_NET, color,
                           w_current->first_wx, w_current->first_wy,
                           w_current->second_wx, w_current->second_wy);
-      toplevel->page_current->object_tail =
-        s_basic_link_object(new_net, toplevel->page_current->object_tail);
+      s_page_append (toplevel->page_current, new_net);
 
       /* conn stuff */
       /* LEAK CHECK 1 */
@@ -790,8 +789,7 @@ int o_net_end(GSCHEM_TOPLEVEL *w_current, int w_x, int w_y)
       new_net = o_net_new(toplevel, OBJ_NET, color,
                           w_current->second_wx, w_current->second_wy,
                           w_current->third_wx, w_current->third_wy);
-      toplevel->page_current->object_tail =
-        s_basic_link_object(new_net, toplevel->page_current->object_tail);
+      s_page_append (toplevel->page_current, new_net);
 
       /* conn stuff */
       /* LEAK CHECK 2 */
@@ -1376,8 +1374,7 @@ int o_net_add_busrippers(GSCHEM_TOPLEVEL *w_current, OBJECT *net_obj,
         new_obj = o_net_new(toplevel, OBJ_NET, color,
                   rippers[i].x[0], rippers[i].y[0],
                   rippers[i].x[1], rippers[i].y[1]);
-        toplevel->page_current->object_tail =
-          s_basic_link_object(new_obj, toplevel->page_current->object_tail);
+        s_page_append (toplevel->page_current, new_obj);
       } else {
 
         if (rippersym != NULL) {
@@ -1386,8 +1383,7 @@ int o_net_add_busrippers(GSCHEM_TOPLEVEL *w_current, OBJECT *net_obj,
                                    complex_angle, 0,
                                    rippersym,
                                    toplevel->bus_ripper_symname, 1);
-          toplevel->page_current->object_tail =
-            s_basic_link_object(new_obj, toplevel->page_current->object_tail);
+          s_page_append (toplevel->page_current, new_obj);
           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 37a91bb..eb4f5c5 100644
--- a/gschem/src/o_picture.c
+++ b/gschem/src/o_picture.c
@@ -110,8 +110,7 @@ void o_picture_end(GSCHEM_TOPLEVEL *w_current, int w_x, int w_y)
                           picture_left + picture_width,
                           picture_top - picture_height,
                           0, FALSE, FALSE);
-  toplevel->page_current->object_tail =
-    s_basic_link_object(new_obj, toplevel->page_current->object_tail);
+  s_page_append (toplevel->page_current, new_obj);
 
   /* 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 b6a3580..14b3e23 100644
--- a/gschem/src/o_pin.c
+++ b/gschem/src/o_pin.c
@@ -194,8 +194,7 @@ void o_pin_end(GSCHEM_TOPLEVEL *w_current, int x, int y)
                       w_current->first_wx, w_current->first_wy,
                       w_current->second_wx, w_current->second_wy,
                       PIN_TYPE_NET, 0);
-  toplevel->page_current->object_tail =
-    s_basic_link_object(new_obj, toplevel->page_current->object_tail);
+  s_page_append (toplevel->page_current, new_obj);
 
   o_current = o_current_pin = toplevel->page_current->object_tail;
 
diff --git a/gschem/src/o_place.c b/gschem/src/o_place.c
index dc08567..21d7ccc 100644
--- a/gschem/src/o_place.c
+++ b/gschem/src/o_place.c
@@ -100,8 +100,7 @@ void o_place_end (GSCHEM_TOPLEVEL *w_current,
     o_current = iter->data;
 
     o_current->next = NULL; /* In case it isn't linked properly */
-    p_current->object_tail =
-      s_basic_link_object (o_current, p_current->object_tail);
+    s_page_append (p_current, o_current);
 
     o_selection_add (toplevel->page_current->selection_list, o_current);
 
diff --git a/gschem/src/o_slot.c b/gschem/src/o_slot.c
index 90ae560..1f284ba 100644
--- a/gschem/src/o_slot.c
+++ b/gschem/src/o_slot.c
@@ -190,8 +190,7 @@ void o_slot_end(GSCHEM_TOPLEVEL *w_current, const char *string, int len)
                            object->complex->x, object->complex->y,
                            LOWER_LEFT, 0, /* zero is angle */
                            string, 10, INVISIBLE, SHOW_NAME_VALUE);
-      toplevel->page_current->object_tail =
-        s_basic_link_object(new_obj, toplevel->page_current->object_tail);
+      s_page_append (toplevel->page_current, new_obj);
 
       /* manually attach attribute */
 
diff --git a/libgeda/include/prototype.h b/libgeda/include/prototype.h
index 68fb9c4..69196f6 100644
--- a/libgeda/include/prototype.h
+++ b/libgeda/include/prototype.h
@@ -430,6 +430,7 @@ gboolean s_page_check_changed (GedaPageList *list);
 void s_page_clear_changed (GedaPageList *list);
 void s_page_autosave_init(TOPLEVEL *toplevel);
 gint s_page_autosave (TOPLEVEL *toplevel);
+void s_page_append (PAGE *page, OBJECT *object);
 
 /* s_papersizes.c */
 int s_papersizes_add_entry(char *new_papersize, int width, int height);
diff --git a/libgeda/src/s_page.c b/libgeda/src/s_page.c
index 0b50f1b..38c6b27 100644
--- a/libgeda/src/s_page.c
+++ b/libgeda/src/s_page.c
@@ -511,3 +511,8 @@ gint s_page_autosave (TOPLEVEL *toplevel)
 
   return toplevel->auto_save_interval;
 }
+
+void s_page_append (PAGE *page, OBJECT *object)
+{
+  page->object_tail = s_basic_link_object(new_obj, page->object_tail);
+}




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