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

gEDA-cvs: gaf.git: branch: master updated (1.5.0-20080706-177-gf4dab83)



The branch, master has been updated
       via  f4dab83b1ca0e197f02f520a6ae525aeac5a252d (commit)
       via  ec2e929742bb682be52d02818916b1f57c343e48 (commit)
      from  b14f3bf215963529b89f650ff3bd6f0b0c90450f (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
=========

 gnetlist/src/s_net.c          |    5 +----
 gnetlist/src/s_netattrib.c    |    7 ++-----
 gschem/src/o_misc.c           |    7 +++++++
 libgeda/src/o_complex_basic.c |   23 ++++++++++++++++++-----
 4 files changed, 28 insertions(+), 14 deletions(-)


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

commit f4dab83b1ca0e197f02f520a6ae525aeac5a252d
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Wed Sep 24 01:07:43 2008 +0100

    gnetlist: Use the complex_parent property of an OBJECT, not the HEAD node.
    
    This saves having to traverse back to the HEAD node for each lookup.

:100644 100644 f507fe0... 4baf43e... M	gnetlist/src/s_net.c
:100644 100644 ed21ebc... 290cc7e... M	gnetlist/src/s_netattrib.c

commit ec2e929742bb682be52d02818916b1f57c343e48
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Wed Sep 24 01:07:37 2008 +0100

    libgeda: Set complex_parent on all prim objects, not just their HEAD node
    
    Allows a primitive object inside a COMPLEX to be linked back to the
    COMPLEX without traversing to the HEAD node of the prim_objs list.

:100644 100644 e434968... ae0d7c9... M	gschem/src/o_misc.c
:100644 100644 5a7a7ff... 8d02aee... M	libgeda/src/o_complex_basic.c

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

commit f4dab83b1ca0e197f02f520a6ae525aeac5a252d
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Wed Sep 24 01:07:43 2008 +0100

    gnetlist: Use the complex_parent property of an OBJECT, not the HEAD node.
    
    This saves having to traverse back to the HEAD node for each lookup.

diff --git a/gnetlist/src/s_net.c b/gnetlist/src/s_net.c
index f507fe0..4baf43e 100644
--- a/gnetlist/src/s_net.c
+++ b/gnetlist/src/s_net.c
@@ -140,7 +140,6 @@ void s_net_print(NET * ptr)
 char *s_net_return_connected_string(TOPLEVEL * pr_current, OBJECT * object,
 				    char *hierarchy_tag)
 {
-    OBJECT *head;
     OBJECT *o_current;
     OBJECT *o_pinnum_object;
     char *pinnum = NULL;
@@ -157,14 +156,12 @@ char *s_net_return_connected_string(TOPLEVEL * pr_current, OBJECT * object,
     /* this function only searches the single o_current */
     pinnum = o_attrib_search_name_single(o_current, "pinnumber",
                                          &o_pinnum_object);
-    
-    head = return_head(o_current);
 
 #if DEBUG
     printf("found pinnum: %s\n", pinnum);
 #endif
 
-    scm_uref = g_scm_c_get_uref(pr_current, head->complex_parent);
+    scm_uref = g_scm_c_get_uref(pr_current, o_current->complex_parent);
 
     if (scm_is_string( scm_uref )) {
       temp_uref = scm_to_locale_string( scm_uref );
diff --git a/gnetlist/src/s_netattrib.c b/gnetlist/src/s_netattrib.c
index ed21ebc..290cc7e 100644
--- a/gnetlist/src/s_netattrib.c
+++ b/gnetlist/src/s_netattrib.c
@@ -340,7 +340,6 @@ char *s_netattrib_return_netname(TOPLEVEL * pr_current, OBJECT * o_current,
 				 char *pinnumber, char *hierarchy_tag)
 {
     char *current_pin;
-    OBJECT *parent;
     char *netname;
     char *temp_netname;
 
@@ -359,11 +358,9 @@ char *s_netattrib_return_netname(TOPLEVEL * pr_current, OBJECT * o_current,
     printf("inside return_netname: %s\n", current_pin);
 #endif
 
-    parent = return_head(o_current);
-    parent = parent->complex_parent;
-
     /* use hierarchy tag here to make this net uniq */
-    temp_netname = s_netattrib_net_search(parent, current_pin);
+    temp_netname = s_netattrib_net_search(o_current->complex_parent,
+                                          current_pin);
 
     netname =
 	s_hierarchy_create_netattrib(pr_current, temp_netname,

commit ec2e929742bb682be52d02818916b1f57c343e48
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Wed Sep 24 01:07:37 2008 +0100

    libgeda: Set complex_parent on all prim objects, not just their HEAD node
    
    Allows a primitive object inside a COMPLEX to be linked back to the
    COMPLEX without traversing to the HEAD node of the prim_objs list.

diff --git a/gschem/src/o_misc.c b/gschem/src/o_misc.c
index e434968..ae0d7c9 100644
--- a/gschem/src/o_misc.c
+++ b/gschem/src/o_misc.c
@@ -738,6 +738,7 @@ void o_update_component(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current)
   TOPLEVEL *toplevel = w_current->toplevel;
   OBJECT *tmp_list, *new_complex;
   OBJECT *a_current;
+  OBJECT *tmp;
   GList *a_iter;
   gboolean is_embedded;
   const CLibSymbol *clib;
@@ -787,6 +788,12 @@ void o_update_component(GSCHEM_TOPLEVEL *w_current, OBJECT *o_current)
                            o_current->complex->prim_objs);
   /*   - put the prim_objs of the new component in the old one */
   o_current->complex->prim_objs = new_complex->complex->prim_objs;
+
+  /* set the parent field now */
+  for (tmp = o_current->complex->prim_objs; tmp != NULL; tmp = tmp->next) {
+    tmp->complex_parent = o_current;
+  }
+
   /*   - reset the new complex prim_objs */
   new_complex->complex->prim_objs = NULL;
 
diff --git a/libgeda/src/o_complex_basic.c b/libgeda/src/o_complex_basic.c
index 5a7a7ff..8d02aee 100644
--- a/libgeda/src/o_complex_basic.c
+++ b/libgeda/src/o_complex_basic.c
@@ -332,6 +332,7 @@ GList *o_complex_get_promotable (TOPLEVEL *toplevel, OBJECT *object, int detach)
       if (tmp->prev)
         tmp->prev->next = tmp->next;
       tmp->next = tmp->prev = NULL;
+      tmp->complex_parent = NULL;
     }
 
     promoted = g_list_prepend (promoted, tmp);
@@ -431,6 +432,7 @@ OBJECT *o_complex_add(TOPLEVEL *toplevel, OBJECT *object_list,
 {
   OBJECT *new_node=NULL;
   OBJECT *prim_objs=NULL;
+  OBJECT *tmp;
   int save_adding_sel = 0;
   int loaded_normally = FALSE;
   gboolean use_object_list;
@@ -474,9 +476,6 @@ 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();
-	
-  /* set the parent field now */
-  prim_objs->complex_parent = new_node;
 
   /* get the symbol data */
   if (clib != NULL) {
@@ -594,6 +593,11 @@ OBJECT *o_complex_add(TOPLEVEL *toplevel, OBJECT *object_list,
 
   new_node->complex->prim_objs = prim_objs;
 
+  /* set the parent field now */
+  for (tmp = prim_objs; tmp != NULL; tmp = tmp->next) {
+    tmp->complex_parent = new_node;
+  }
+
   if (use_object_list) {
     object_list = (OBJECT *) s_basic_link_object(new_node, object_list);
   } else {
@@ -622,6 +626,7 @@ OBJECT *o_complex_add_embedded(TOPLEVEL *toplevel, OBJECT *object_list,
 {
   OBJECT *prim_objs=NULL;
   OBJECT *new_node=NULL;
+  OBJECT *tmp;
 
   new_node = s_basic_new_object(type, "complex");
 
@@ -652,9 +657,11 @@ OBJECT *o_complex_add_embedded(TOPLEVEL *toplevel, OBJECT *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;
-	
+
   /* set the parent field now */
-  prim_objs->complex_parent = object_list;
+  for (tmp = prim_objs; tmp != NULL; tmp = tmp->next) {
+    tmp->complex_parent = new_node;
+  }
 
   /* don't have to translate/rotate/mirror here at all since the */
   /* object is in place */
@@ -861,6 +868,7 @@ OBJECT *o_complex_copy_embedded(TOPLEVEL *toplevel, OBJECT *list_tail,
 {
   OBJECT *new_obj=NULL;
   OBJECT *temp_list;
+  OBJECT *tmp;
   int color;
   int selectable;
 
@@ -894,6 +902,11 @@ OBJECT *o_complex_copy_embedded(TOPLEVEL *toplevel, OBJECT *list_tail,
 	
   new_obj->complex->prim_objs = return_head(temp_list);
 
+  /* set the parent field now */
+  for (tmp = new_obj->complex->prim_objs; tmp != NULL; tmp = tmp->next) {
+    tmp->complex_parent = new_obj;
+  }
+
   o_complex_recalc(toplevel, new_obj);
 
   /* here you need to create a list of attributes which need to be 




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