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

gEDA-cvs: gaf.git: branch: master updated (1.5.2-20090328-13-g3b41329)



The branch, master has been updated
       via  3b41329b9750009a9ca7a832f69597c1946c4579 (commit)
       via  7a7b553b395a78a9d53b64cc50d1077342999a75 (commit)
      from  963ac330d97e843f6ec4580b64d9b36c51807783 (commit)

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


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

 gattrib/src/s_attrib.c              |    2 +-
 gschem/src/o_slot.c                 |    2 +-
 gschem/src/x_autonumber.c           |    8 ++++----
 libgeda/include/libgeda/prototype.h |    2 +-
 libgeda/src/o_attrib.c              |   30 +++++-------------------------
 5 files changed, 12 insertions(+), 32 deletions(-)


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

commit 3b41329b9750009a9ca7a832f69597c1946c4579
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    libgeda: Tidy up o_attrib_search_default_slot()

:100644 100644 8a253a1... 4e4ea11... M	libgeda/src/o_attrib.c

commit 7a7b553b395a78a9d53b64cc50d1077342999a75
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    Remove unused "return_found" argument to o_attrib_search_numslots()

:100644 100644 d95f37c... d6afc91... M	gattrib/src/s_attrib.c
:100644 100644 d827b5a... 0162c78... M	gschem/src/o_slot.c
:100644 100644 f23f070... 0bf1a54... M	gschem/src/x_autonumber.c
:100644 100644 8dfdcbf... c132e94... M	libgeda/include/libgeda/prototype.h
:100644 100644 8d9afba... 8a253a1... M	libgeda/src/o_attrib.c

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

commit 3b41329b9750009a9ca7a832f69597c1946c4579
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    libgeda: Tidy up o_attrib_search_default_slot()

diff --git a/libgeda/src/o_attrib.c b/libgeda/src/o_attrib.c
index 8a253a1..4e4ea11 100644
--- a/libgeda/src/o_attrib.c
+++ b/libgeda/src/o_attrib.c
@@ -1138,17 +1138,8 @@ char *o_attrib_search_numslots(OBJECT *object)
  */
 char *o_attrib_search_default_slot(OBJECT *object)
 {
-  char *return_value;
-
   /* search for default value attribute buried inside the complex */
-  return_value = o_attrib_search_name(object->complex->prim_objs, 
-                                      "slot", 0);
-
-  if (return_value) {
-    return(return_value);
-  }
-
-  return(NULL);
+  return o_attrib_search_name (object->complex->prim_objs, "slot", 0);
 }
 
 /*! \brief Search pinseq attribute.

commit 7a7b553b395a78a9d53b64cc50d1077342999a75
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    Remove unused "return_found" argument to o_attrib_search_numslots()

diff --git a/gattrib/src/s_attrib.c b/gattrib/src/s_attrib.c
index d95f37c..d6afc91 100644
--- a/gattrib/src/s_attrib.c
+++ b/gattrib/src/s_attrib.c
@@ -104,7 +104,7 @@ char *s_attrib_get_refdes(OBJECT *object)
   
   /*------- Now append .slot to refdes if part is slotted -------- */
   /* Find out if this is a multislotted component */
-  numslots_value = o_attrib_search_numslots(object, NULL);
+  numslots_value = o_attrib_search_numslots (object);
   if (numslots_value != NULL) {  /* this is a slotted component; 
 				    append slot number to refdes. */
     slot_value = o_attrib_search_slot(object, &slot_text_object);
diff --git a/gschem/src/o_slot.c b/gschem/src/o_slot.c
index d827b5a..0162c78 100644
--- a/gschem/src/o_slot.c
+++ b/gschem/src/o_slot.c
@@ -122,7 +122,7 @@ void o_slot_end(GSCHEM_TOPLEVEL *w_current, const char *string, int len)
 
   /* now find the slot attribute on the outside first */
   if (object != NULL) {
-    numslots_value = o_attrib_search_numslots(object, NULL);
+    numslots_value = o_attrib_search_numslots (object);
 
     if (!numslots_value) {
       s_log_message(_("numslots attribute missing\n"));
diff --git a/gschem/src/x_autonumber.c b/gschem/src/x_autonumber.c
index f23f070..0bf1a54 100644
--- a/gschem/src/x_autonumber.c
+++ b/gschem/src/x_autonumber.c
@@ -388,7 +388,7 @@ gint autonumber_match(AUTONUMBER_TEXT *autotext, OBJECT *o_current, gint *number
 void autonumber_get_used(GSCHEM_TOPLEVEL *w_current, AUTONUMBER_TEXT *autotext)
 {
   gint number, numslots, slotnr, i;
-  OBJECT *o_current, *o_parent, *o_numslots;
+  OBJECT *o_current, *o_parent;
   AUTONUMBER_SLOT *slot;
   GList *slot_item;
   char *numslot_str, *slot_str;
@@ -403,7 +403,7 @@ void autonumber_get_used(GSCHEM_TOPLEVEL *w_current, AUTONUMBER_TEXT *autotext)
       o_parent = o_current->attached_to;
       if (autotext->slotting && o_parent != NULL) {
 	/* check for slotted symbol */
-	if ((numslot_str = o_attrib_search_numslots(o_parent, &o_numslots)) != NULL) {
+	if ((numslot_str = o_attrib_search_numslots (o_parent)) != NULL) {
 	  sscanf(numslot_str," %d",&numslots);
 	  g_free(numslot_str);
 
@@ -483,7 +483,7 @@ void autonumber_get_new_numbers(AUTONUMBER_TEXT *autotext, OBJECT *o_current,
   GList *item;
   gint new_number, numslots, i;
   AUTONUMBER_SLOT *freeslot;
-  OBJECT *o_parent = NULL, *o_numslots;
+  OBJECT *o_parent = NULL;
   GList *freeslot_item;
   gchar *numslot_str;
 
@@ -534,7 +534,7 @@ void autonumber_get_new_numbers(AUTONUMBER_TEXT *autotext, OBJECT *o_current,
 
   /* 3. is o_current a slotted object ? */
   if ((autotext->slotting) && o_parent != NULL) {
-    if ((numslot_str = o_attrib_search_numslots(o_parent, &o_numslots)) != NULL) {
+    if ((numslot_str = o_attrib_search_numslots (o_parent)) != NULL) {
       sscanf(numslot_str," %d",&numslots);
       g_free(numslot_str);
       if (numslots > 0) { 
diff --git a/libgeda/include/libgeda/prototype.h b/libgeda/include/libgeda/prototype.h
index 8dfdcbf..c132e94 100644
--- a/libgeda/include/libgeda/prototype.h
+++ b/libgeda/include/libgeda/prototype.h
@@ -111,7 +111,7 @@ char *o_attrib_search_toplevel(const GList *list, char *name, int counter);
 char *o_attrib_search_name_single(OBJECT *object, char *name, OBJECT **return_found);
 char *o_attrib_search_name_single_count(OBJECT *object, char *name, int counter);
 char *o_attrib_search_slot(OBJECT *object, OBJECT **return_found);
-char *o_attrib_search_numslots(OBJECT *object, OBJECT **return_found);
+char *o_attrib_search_numslots(OBJECT *object);
 char *o_attrib_search_default_slot(OBJECT *object);
 OBJECT *o_attrib_search_pinseq(GList *list, int pin_number);
 char *o_attrib_search_slotdef(OBJECT *object, int slotnumber);
diff --git a/libgeda/src/o_attrib.c b/libgeda/src/o_attrib.c
index 8d9afba..8a253a1 100644
--- a/libgeda/src/o_attrib.c
+++ b/libgeda/src/o_attrib.c
@@ -1117,24 +1117,13 @@ char *o_attrib_search_slot(OBJECT *object, OBJECT **return_found)
  *  \note
  *  Caller must g_free returned character string.
  */
-char *o_attrib_search_numslots(OBJECT *object, OBJECT **return_found)
+char *o_attrib_search_numslots(OBJECT *object)
 {
-  char *return_value = NULL;
-
   /* search for numslots attribute buried inside the complex */
-  if (object->type == OBJ_COMPLEX) {
-    return_value = o_attrib_search_name(object->complex->prim_objs, 
-					"numslots", 0);
-  }
+  if (object->type != OBJ_COMPLEX)
+    return NULL;
 
-  if (return_value) {
-    return(return_value);
-  }
-
-  if (return_found) {
-    *return_found = NULL;
-  }
-  return(NULL);
+  return o_attrib_search_name (object->complex->prim_objs, "numslots", 0);
 }
 
 /*! \brief Search for default slot attribute.




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