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

gEDA-cvs: gaf.git: branch: master updated (1.7.0-20110116-85-g7bd75fa)



The branch, master has been updated
       via  7bd75fad7cbd3b0e3520cf40ac64cf0986b16c84 (commit)
       via  680dba23bb571f50b4dc9c04eb3e89bf25817478 (commit)
       via  e925ef237bb68b060c761dd2f45bf2370fbfedf8 (commit)
       via  f19235afb1c964570f00ce6b5b80441cc95253b5 (commit)
       via  1735a9e0378290382ec9d0db83c76d039b0c5c7c (commit)
       via  fb917f8b61f58b3cde5f1730b94c28c5992edea1 (commit)
       via  eb2eeee3626c6f127ba2790f708b03d06bb04122 (commit)
      from  4d566fcde7d57daeac1ad5629b5bb1baacc3a030 (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/g_netlist.c |   68 ++++++++++-------------------
 gnetlist/src/s_rename.c  |    4 +-
 gnetlist/src/vams_misc.c |    2 +-
 gschem/src/g_funcs.c     |    4 +-
 gschem/src/g_rc.c        |    8 ++--
 libgeda/src/g_rc.c       |    6 +-
 libgeda/src/g_smob.c     |  106 +++++++++++++++++++++-------------------------
 7 files changed, 84 insertions(+), 114 deletions(-)


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

commit 7bd75fad7cbd3b0e3520cf40ac64cf0986b16c84
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Commit: Peter TB Brett <peter@xxxxxxxxxxxxx>

    gnetlist: Remove dead code.
    
    Remove some dead legacy code from gnetlist that was hidden in an #if 0
    block.

:100644 100644 2974a08... d079448... M	gnetlist/src/g_netlist.c

commit 680dba23bb571f50b4dc9c04eb3e89bf25817478
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Commit: Peter TB Brett <peter@xxxxxxxxxxxxx>

    libgeda: Check argument type for g_attrib_is_inherited().

:100644 100644 01a114f... d3323e0... M	libgeda/src/g_smob.c

commit e925ef237bb68b060c761dd2f45bf2370fbfedf8
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Commit: Peter TB Brett <peter@xxxxxxxxxxxxx>

    libgeda: Use SCM_SMOB_PREDICATE to check smob type.
    
    Simplify smob type checks by using SCM_SMOB_PREDICATE. This also
    removes the assumption that smob type tags are located in the car of
    the smob cell.

:100644 100644 1a91277... 01a114f... M	libgeda/src/g_smob.c

commit f19235afb1c964570f00ce6b5b80441cc95253b5
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Commit: Peter TB Brett <peter@xxxxxxxxxxxxx>

    libgeda: Use SCM_SMOB_DATA instead of SCM_CDR.
    
    SCM_CDR makes assumptions about the Guile SCM smob type's memory
    layout that aren't necessarily true for all versions of Guile.
    SCM_SMOB_DATA is the correct method for accessing the first word
    stored in a smob type.

:100644 100644 8ff8d06... 1a91277... M	libgeda/src/g_smob.c

commit 1735a9e0378290382ec9d0db83c76d039b0c5c7c
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Commit: Peter TB Brett <peter@xxxxxxxxxxxxx>

    libgeda: Remove uses of deprecated scm_must_malloc.

:100644 100644 e61f70f... 8ff8d06... M	libgeda/src/g_smob.c

commit fb917f8b61f58b3cde5f1730b94c28c5992edea1
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Commit: Peter TB Brett <peter@xxxxxxxxxxxxx>

    Remove uses of deprecated scm_makfrom0str.

:100644 100644 70ce4f9... 2974a08... M	gnetlist/src/g_netlist.c
:100644 100644 e847b11... b8adbb2... M	gnetlist/src/s_rename.c
:100644 100644 45e99f2... 6292346... M	gnetlist/src/vams_misc.c
:100644 100644 f5f44c6... 91df379... M	gschem/src/g_funcs.c
:100644 100644 d6d5388... e61f70f... M	libgeda/src/g_smob.c

commit eb2eeee3626c6f127ba2790f708b03d06bb04122
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Commit: Peter TB Brett <peter@xxxxxxxxxxxxx>

    Remove uses of deprecated scm_num2double.

:100644 100644 0bcfbe9... 04e8e8d... M	gschem/src/g_rc.c
:100644 100644 e287da7... f9d57dd... M	libgeda/src/g_rc.c

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

commit 7bd75fad7cbd3b0e3520cf40ac64cf0986b16c84
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Commit: Peter TB Brett <peter@xxxxxxxxxxxxx>

    gnetlist: Remove dead code.
    
    Remove some dead legacy code from gnetlist that was hidden in an #if 0
    block.

diff --git a/gnetlist/src/g_netlist.c b/gnetlist/src/g_netlist.c
index 2974a08..d079448 100644
--- a/gnetlist/src/g_netlist.c
+++ b/gnetlist/src/g_netlist.c
@@ -728,29 +728,6 @@ SCM g_get_toplevel_attribute(SCM scm_wanted_attrib)
   return (scm_return_value);
 }
 
-#if 0	      /* No longer needed, but the netlist_mode variable is still used */
-SCM g_set_netlist_mode(SCM mode)
-{
-    char *string;
-
-    string = SCM_STRING_CHARS (mode);
-
-    if (strcmp(string, "gEDA") == 0) {
-	netlist_mode = gEDA;
-    } else if (strcmp(string, "SPICE") == 0) {
-	netlist_mode = SPICE;
-    } else if (strcmp(string, "TANGO") == 0) {
-	netlist_mode = TANGO;
-    }
-#if DEBUG
-    printf("netlist_mode: %s %d\n", string, netlist_mode);
-#endif
-
-    return (scm_from_int (0));
-}
-#endif
-
-
 /* 
    This function returns certain calling flags to the calling guile prog. 
    The calling flags are returned to Guile as a list of option/value pairs [e.g. 

commit 680dba23bb571f50b4dc9c04eb3e89bf25817478
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Commit: Peter TB Brett <peter@xxxxxxxxxxxxx>

    libgeda: Check argument type for g_attrib_is_inherited().

diff --git a/libgeda/src/g_smob.c b/libgeda/src/g_smob.c
index 01a114f..d3323e0 100644
--- a/libgeda/src/g_smob.c
+++ b/libgeda/src/g_smob.c
@@ -435,6 +435,9 @@ SCM g_get_attrib_angle(SCM attrib_smob)
  */
 SCM g_attrib_is_inherited (SCM attrib_smob)
 {
+  SCM_ASSERT (SCM_SMOB_PREDICATE (attrib_smob_tag, attrib_smob),
+              attrib_smob, SCM_ARG1, "attrib-inherited?");
+
   struct st_attrib_smob *attribute =
     (struct st_attrib_smob *) SCM_SMOB_DATA (attrib_smob);
 

commit e925ef237bb68b060c761dd2f45bf2370fbfedf8
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Commit: Peter TB Brett <peter@xxxxxxxxxxxxx>

    libgeda: Use SCM_SMOB_PREDICATE to check smob type.
    
    Simplify smob type checks by using SCM_SMOB_PREDICATE. This also
    removes the assumption that smob type tags are located in the car of
    the smob cell.

diff --git a/libgeda/src/g_smob.c b/libgeda/src/g_smob.c
index 1a91277..01a114f 100644
--- a/libgeda/src/g_smob.c
+++ b/libgeda/src/g_smob.c
@@ -120,8 +120,7 @@ SCM g_get_attrib_name_value(SCM attrib_smob)
   char *value = NULL;
   SCM returned = SCM_EOL;
 
-  SCM_ASSERT ( SCM_NIMP(attrib_smob) && 
-               ((long) SCM_CAR(attrib_smob) == attrib_smob_tag),
+  SCM_ASSERT ( SCM_SMOB_PREDICATE (attrib_smob_tag, attrib_smob),
                attrib_smob, SCM_ARG1, "get-attribute-name-value");
 
   attribute = (struct st_attrib_smob *) SCM_SMOB_DATA (attrib_smob);
@@ -160,9 +159,8 @@ SCM g_set_attrib_value_internal(SCM attrib_smob, SCM scm_value,
   char *name = NULL;
   char *value = NULL;
 
-  SCM_ASSERT ( SCM_NIMP(attrib_smob) && 
-               ((long) SCM_CAR(attrib_smob) == attrib_smob_tag),
-               attrib_smob, SCM_ARG1, "set-attribute-value!");
+  SCM_ASSERT (SCM_SMOB_PREDICATE (attrib_smob_tag, attrib_smob),
+              attrib_smob, SCM_ARG1, "set-attribute-value!");
   SCM_ASSERT (scm_is_string(scm_value), scm_value, SCM_ARG2, 
 	      "set-attribute-value!");
 
@@ -382,9 +380,8 @@ SCM g_get_attrib_bounds(SCM attrib_smob)
   int left=0, right=0, bottom=0, top=0; 
   SCM returned = SCM_EOL;
 
-  SCM_ASSERT ( SCM_NIMP(attrib_smob) && 
-               ((long) SCM_CAR(attrib_smob) == attrib_smob_tag),
-               attrib_smob, SCM_ARG1, "get-attribute-bounds");
+  SCM_ASSERT (SCM_SMOB_PREDICATE (attrib_smob_tag, attrib_smob),
+              attrib_smob, SCM_ARG1, "get-attribute-bounds");
   
   attribute = (struct st_attrib_smob *) SCM_SMOB_DATA (attrib_smob);
   toplevel = attribute->world;
@@ -416,9 +413,8 @@ SCM g_get_attrib_angle(SCM attrib_smob)
   TOPLEVEL *toplevel;
   struct st_attrib_smob *attribute;
 
-  SCM_ASSERT ( SCM_NIMP(attrib_smob) && 
-               ((long) SCM_CAR(attrib_smob) == attrib_smob_tag),
-               attrib_smob, SCM_ARG1, "get-attribute-angle");
+  SCM_ASSERT (SCM_SMOB_PREDICATE (attrib_smob_tag, attrib_smob),
+              attrib_smob, SCM_ARG1, "get-attribute-angle");
   
   attribute = (struct st_attrib_smob *) SCM_SMOB_DATA (attrib_smob);
   toplevel = attribute->world;
@@ -535,9 +531,8 @@ SCM g_get_object_attributes(SCM object_smob)
   GList *a_iter;
   OBJECT *a_current;
 
-  SCM_ASSERT ( SCM_NIMP(object_smob) && 
-               ((long) SCM_CAR(object_smob) == object_smob_tag),
-               object_smob, SCM_ARG1, "get-object-attributes");
+  SCM_ASSERT (SCM_SMOB_PREDICATE (object_smob_tag, object_smob),
+              object_smob, SCM_ARG1, "get-object-attributes");
 
   object = (struct st_object_smob *)SCM_CDR(object_smob);
 
@@ -579,9 +574,8 @@ SCM g_get_attrib_value_by_attrib_name(SCM object_smob, SCM scm_attrib_name)
   GList *a_iter;
   OBJECT *a_current;
 
-  SCM_ASSERT ( SCM_NIMP(object_smob) && 
-               ((long) SCM_CAR(object_smob) == object_smob_tag),
-               object_smob, SCM_ARG1, "get-attrib-value-by-attrib-name");
+  SCM_ASSERT (SCM_SMOB_PREDICATE (object_smob_tag, object_smob),
+              object_smob, SCM_ARG1, "get-attrib-value-by-attrib-name");
 
   SCM_ASSERT (scm_is_string(scm_attrib_name), scm_attrib_name,
 	      SCM_ARG2, "get-attrib-value-by-attrib-name");
@@ -626,9 +620,8 @@ SCM g_get_object_type(SCM object_smob)
   OBJECT *object;
   SCM returned = SCM_EOL;
 
-  SCM_ASSERT ( SCM_NIMP(object_smob) && 
-               ((long) SCM_CAR(object_smob) == object_smob_tag),
-               object_smob, SCM_ARG1, "get-object-type");
+  SCM_ASSERT (SCM_SMOB_PREDICATE (object_smob_tag, object_smob),
+              object_smob, SCM_ARG1, "get-object-type");
 
   object_struct = (struct st_object_smob *)SCM_CDR(object_smob);
 
@@ -655,9 +648,8 @@ SCM g_get_line_width(SCM object_smob)
   OBJECT *object;
   SCM returned = SCM_EOL;
 
-  SCM_ASSERT ( SCM_NIMP(object_smob) && 
-               ((long) SCM_CAR(object_smob) == object_smob_tag),
-               object_smob, SCM_ARG1, "get-line-width");
+  SCM_ASSERT (SCM_SMOB_PREDICATE (object_smob_tag, object_smob),
+              object_smob, SCM_ARG1, "get-line-width");
 
   object_struct = (struct st_object_smob *)SCM_CDR(object_smob);
 
@@ -706,8 +698,7 @@ gboolean g_get_data_from_object_smob(SCM object_smob, TOPLEVEL **toplevel,
 				     OBJECT **object)
 {
   
-  if ( (!SCM_NIMP(object_smob)) || 
-       ((long) SCM_CAR(object_smob) != object_smob_tag) ) {
+  if (!SCM_SMOB_PREDICATE (object_smob_tag, object_smob)) {
     return(FALSE);
   }
   if (toplevel != NULL) {
@@ -850,8 +841,7 @@ gboolean g_get_data_from_page_smob(SCM page_smob, TOPLEVEL **toplevel,
 				   PAGE **page)
 {
   
-  if ( (!SCM_NIMP(page_smob)) || 
-       ((long) SCM_CAR(page_smob) != page_smob_tag) ) {
+  if (!SCM_SMOB_PREDICATE (page_smob_tag, page_smob)) {
     return(FALSE);
   }
   if (toplevel != NULL) {
@@ -877,9 +867,8 @@ SCM g_get_page_filename(SCM page_smob)
   SCM returned = SCM_EOL;
   PAGE *page;
 
-  SCM_ASSERT ( SCM_NIMP(page_smob) &&
-	       ((long) SCM_CAR(page_smob) == page_smob_tag),
-               page_smob, SCM_ARG1, "get-page-filename");
+  SCM_ASSERT (SCM_SMOB_PREDICATE (page_smob_tag, page_smob),
+              page_smob, SCM_ARG1, "get-page-filename");
 
   page = (PAGE *) 
     (((struct st_page_smob *) SCM_SMOB_DATA (page_smob))->page);
@@ -903,9 +892,8 @@ SCM g_set_page_filename(SCM page_smob, SCM scm_filename)
   PAGE *page;
   char *filename = NULL;
 
-  SCM_ASSERT ( SCM_NIMP(page_smob) &&
-	       ((long) SCM_CAR(page_smob) == page_smob_tag),
-               page_smob, SCM_ARG1, "set-page-filename");
+  SCM_ASSERT (SCM_SMOB_PREDICATE (page_smob_tag, page_smob),
+              page_smob, SCM_ARG1, "set-page-filename");
 
   SCM_ASSERT (scm_is_string(scm_filename), scm_filename,
 	      SCM_ARG2, "set-page-filename");

commit f19235afb1c964570f00ce6b5b80441cc95253b5
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Commit: Peter TB Brett <peter@xxxxxxxxxxxxx>

    libgeda: Use SCM_SMOB_DATA instead of SCM_CDR.
    
    SCM_CDR makes assumptions about the Guile SCM smob type's memory
    layout that aren't necessarily true for all versions of Guile.
    SCM_SMOB_DATA is the correct method for accessing the first word
    stored in a smob type.

diff --git a/libgeda/src/g_smob.c b/libgeda/src/g_smob.c
index 8ff8d06..1a91277 100644
--- a/libgeda/src/g_smob.c
+++ b/libgeda/src/g_smob.c
@@ -45,7 +45,7 @@ static long page_smob_tag;   /*! Page SMOB tag */
 static scm_sizet g_free_attrib_smob(SCM attrib_smob)
 {
   struct st_attrib_smob *attribute = 
-  (struct st_attrib_smob *)SCM_CDR(attrib_smob);
+    (struct st_attrib_smob *) SCM_SMOB_DATA (attrib_smob);
   scm_sizet size = sizeof(struct st_attrib_smob);
 
   free(attribute); /* this should stay as free (allocated from guile) */
@@ -66,7 +66,7 @@ static int g_print_attrib_smob(SCM attrib_smob, SCM port,
 			       scm_print_state *pstate)
 {
   struct st_attrib_smob *attribute = 
-  (struct st_attrib_smob *)SCM_CDR(attrib_smob);
+    (struct st_attrib_smob *) SCM_SMOB_DATA (attrib_smob);
 
   if (attribute &&
       attribute->attribute &&
@@ -124,7 +124,7 @@ SCM g_get_attrib_name_value(SCM attrib_smob)
                ((long) SCM_CAR(attrib_smob) == attrib_smob_tag),
                attrib_smob, SCM_ARG1, "get-attribute-name-value");
 
-  attribute = (struct st_attrib_smob *)SCM_CDR(attrib_smob);
+  attribute = (struct st_attrib_smob *) SCM_SMOB_DATA (attrib_smob);
 
   if (attribute != NULL &&
       attribute->attribute != NULL &&
@@ -166,7 +166,7 @@ SCM g_set_attrib_value_internal(SCM attrib_smob, SCM scm_value,
   SCM_ASSERT (scm_is_string(scm_value), scm_value, SCM_ARG2, 
 	      "set-attribute-value!");
 
-  attribute = (struct st_attrib_smob *)SCM_CDR(attrib_smob);
+  attribute = (struct st_attrib_smob *) SCM_SMOB_DATA (attrib_smob);
   value = scm_to_locale_string (scm_value);
 
   if (attribute != NULL &&
@@ -286,7 +286,7 @@ SCM g_calcule_new_attrib_bounds (SCM attrib_smob, SCM scm_alignment,
 		SCM_ARG2, "calcule-new-attrib-bounds");
   }
 
-  attribute = (struct st_attrib_smob *)SCM_CDR(attrib_smob);
+  attribute = (struct st_attrib_smob *) SCM_SMOB_DATA (attrib_smob);
   toplevel = attribute->world;
   
   SCM_ASSERT ( attribute &&
@@ -386,7 +386,7 @@ SCM g_get_attrib_bounds(SCM attrib_smob)
                ((long) SCM_CAR(attrib_smob) == attrib_smob_tag),
                attrib_smob, SCM_ARG1, "get-attribute-bounds");
   
-  attribute = (struct st_attrib_smob *)SCM_CDR(attrib_smob);
+  attribute = (struct st_attrib_smob *) SCM_SMOB_DATA (attrib_smob);
   toplevel = attribute->world;
 
   if (attribute &&
@@ -420,7 +420,7 @@ SCM g_get_attrib_angle(SCM attrib_smob)
                ((long) SCM_CAR(attrib_smob) == attrib_smob_tag),
                attrib_smob, SCM_ARG1, "get-attribute-angle");
   
-  attribute = (struct st_attrib_smob *)SCM_CDR(attrib_smob);
+  attribute = (struct st_attrib_smob *) SCM_SMOB_DATA (attrib_smob);
   toplevel = attribute->world;
 
   SCM_ASSERT ( attribute && 
@@ -440,7 +440,7 @@ SCM g_get_attrib_angle(SCM attrib_smob)
 SCM g_attrib_is_inherited (SCM attrib_smob)
 {
   struct st_attrib_smob *attribute =
-  (struct st_attrib_smob *) SCM_CDR (attrib_smob);
+    (struct st_attrib_smob *) SCM_SMOB_DATA (attrib_smob);
 
   if (attribute && attribute->attribute) {
     OBJECT *object = attribute->attribute;
@@ -780,10 +780,10 @@ static SCM g_equalp_page_smob (SCM page_smob1,
                                SCM page_smob2)
 {
   struct st_page_smob *page1 =
-  (struct st_page_smob *) SCM_CDR (page_smob1);
+    (struct st_page_smob *) SCM_SMOB_DATA (page_smob1);
 
   struct st_page_smob *page2 =
-  (struct st_page_smob *) SCM_CDR (page_smob2);
+    (struct st_page_smob *) SCM_SMOB_DATA (page_smob2);
 
   if (page1 &&
       page2 &&
@@ -856,11 +856,11 @@ gboolean g_get_data_from_page_smob(SCM page_smob, TOPLEVEL **toplevel,
   }
   if (toplevel != NULL) {
     *toplevel = (TOPLEVEL *) 
-    (((struct st_page_smob *)SCM_CDR(page_smob))->world);
+    (((struct st_page_smob *) SCM_SMOB_DATA (page_smob))->world);
   }
   if (page != NULL) {
     *page = (PAGE *) 
-    (((struct st_page_smob *)SCM_CDR(page_smob))->page);
+    (((struct st_page_smob *) SCM_SMOB_DATA (page_smob))->page);
   }
   return (TRUE);
 }
@@ -882,7 +882,7 @@ SCM g_get_page_filename(SCM page_smob)
                page_smob, SCM_ARG1, "get-page-filename");
 
   page = (PAGE *) 
-    (((struct st_page_smob *)SCM_CDR(page_smob))->page);
+    (((struct st_page_smob *) SCM_SMOB_DATA (page_smob))->page);
 
   if (page->page_filename) 
     returned = scm_from_locale_string (page->page_filename);
@@ -911,7 +911,7 @@ SCM g_set_page_filename(SCM page_smob, SCM scm_filename)
 	      SCM_ARG2, "set-page-filename");
 
   page = (PAGE *) 
-    (((struct st_page_smob *)SCM_CDR(page_smob))->page);
+    (((struct st_page_smob *) SCM_SMOB_DATA (page_smob))->page);
 
   filename = SCM_STRING_CHARS (scm_filename);
 

commit 1735a9e0378290382ec9d0db83c76d039b0c5c7c
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Commit: Peter TB Brett <peter@xxxxxxxxxxxxx>

    libgeda: Remove uses of deprecated scm_must_malloc.

diff --git a/libgeda/src/g_smob.c b/libgeda/src/g_smob.c
index e61f70f..8ff8d06 100644
--- a/libgeda/src/g_smob.c
+++ b/libgeda/src/g_smob.c
@@ -97,8 +97,7 @@ SCM g_make_attrib_smob(TOPLEVEL *curr_w, OBJECT *curr_attr)
   struct st_attrib_smob *smob_attribute;
 
   smob_attribute = (struct st_attrib_smob *)
-    			scm_must_malloc(sizeof(struct st_attrib_smob),
-					"attribute");
+    scm_malloc (sizeof(struct st_attrib_smob));
 
   smob_attribute->world     = curr_w;
   smob_attribute->attribute = curr_attr;
@@ -512,7 +511,7 @@ SCM g_make_object_smob(TOPLEVEL *curr_w, OBJECT *object)
   struct st_object_smob *smob_object;
 
   smob_object = (struct st_object_smob *)
-    scm_must_malloc(sizeof(struct st_object_smob), "object");
+    scm_malloc (sizeof(struct st_object_smob));
 
   smob_object->world  = curr_w;
   smob_object->object = object;
@@ -829,7 +828,7 @@ SCM g_make_page_smob(TOPLEVEL *curr_w, PAGE *page)
   struct st_page_smob *smob_page;
 
   smob_page = (struct st_page_smob *)
-    scm_must_malloc(sizeof(struct st_page_smob), "page");
+    scm_malloc (sizeof(struct st_page_smob));
 
   smob_page->world  = curr_w;
   smob_page->page = page;

commit fb917f8b61f58b3cde5f1730b94c28c5992edea1
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Commit: Peter TB Brett <peter@xxxxxxxxxxxxx>

    Remove uses of deprecated scm_makfrom0str.

diff --git a/gnetlist/src/g_netlist.c b/gnetlist/src/g_netlist.c
index 70ce4f9..2974a08 100644
--- a/gnetlist/src/g_netlist.c
+++ b/gnetlist/src/g_netlist.c
@@ -76,7 +76,8 @@ SCM g_get_packages(SCM level)
         if (g_hash_table_lookup (ht, nl_current->component_uref) == NULL) {
           g_hash_table_insert (ht, nl_current->component_uref,
                                    nl_current->component_uref);
-          list = scm_cons (scm_makfrom0str (nl_current->component_uref), list);
+          list = scm_cons (scm_from_locale_string (nl_current->component_uref),
+                           list);
         }
       }
     }
@@ -97,7 +98,7 @@ SCM g_get_non_unique_packages(SCM level)
     for (nl_current = netlist_head; nl_current != NULL;
          nl_current = nl_current->next) {
       if (nl_current->component_uref != NULL) {
-        list = scm_cons (scm_makfrom0str (nl_current->component_uref),
+        list = scm_cons (scm_from_locale_string (nl_current->component_uref),
                          list);
       }
     }
@@ -127,7 +128,7 @@ SCM g_get_pins(SCM uref)
 		pl_current = nl_current->cpins;
 		while (pl_current != NULL) {
 		    if (pl_current->pin_number) {
-              list = scm_cons (scm_makfrom0str (pl_current->pin_number),
+              list = scm_cons (scm_from_locale_string (pl_current->pin_number),
                                list);
 		    }
 		    pl_current = pl_current->next;
@@ -171,8 +172,8 @@ SCM g_get_all_nets(SCM scm_level)
 		    printf("Got net: `%s'\n", net_name);
 		    printf("pin %s\n", pl_current->pin_number);
 #endif
-		    list = scm_cons (scm_makfrom0str (net_name),
-                             list);
+		    list = scm_cons (scm_from_locale_string (net_name),
+                                     list);
 		}
 	    }
 	    pl_current = pl_current->next;
@@ -212,7 +213,7 @@ SCM g_get_all_unique_nets(SCM scm_level)
 		    /* add the net name to the list */
 		    /*printf("Got net: `%s'\n",net_name); */
 
-		    x = scm_makfrom0str (net_name);
+		    x = scm_from_locale_string (net_name);
 		    if (scm_member(x, list) == SCM_BOOL_F) {
               list = scm_cons (x, list);
 		    }
@@ -290,8 +291,8 @@ SCM g_get_all_connections(SCM scm_netname)
 			    sscanf(n_current->connected_to,
 				   "%s %s", uref, pin);
 
-			    pairlist = scm_list_n (scm_makfrom0str (uref),
-                                       scm_makfrom0str (pin),
+			    pairlist = scm_list_n (scm_from_locale_string (uref),
+                                       scm_from_locale_string (pin),
                                        SCM_UNDEFINED);
 
 			    x = pairlist;
@@ -383,8 +384,8 @@ SCM g_get_nets(SCM scm_uref, SCM scm_pin)
 				    sscanf(n_current->connected_to,
 					   "%s %s", uref, pin);
 
-				    pairlist = scm_list_n (scm_makfrom0str (uref),
-                                           scm_makfrom0str (pin),
+				    pairlist = scm_list_n (scm_from_locale_string (uref),
+                                           scm_from_locale_string (pin),
                                            SCM_UNDEFINED);
 
 				    pinslist = scm_cons (pairlist, pinslist);
@@ -404,9 +405,9 @@ SCM g_get_nets(SCM scm_uref, SCM scm_pin)
     }
 
     if (net_name != NULL) {
-      outerlist = scm_cons (scm_makfrom0str (net_name), pinslist);
+      outerlist = scm_cons (scm_from_locale_string (net_name), pinslist);
     } else {
-      outerlist = scm_cons (scm_makfrom0str ("ERROR_INVALID_PIN"),
+      outerlist = scm_cons (scm_from_locale_string ("ERROR_INVALID_PIN"),
                             outerlist);
 	fprintf(stderr, "Invalid wanted_pin passed to get-nets [%s]\n",
 		wanted_pin);
@@ -454,8 +455,8 @@ SCM g_get_pins_nets(SCM scm_uref)
 			    pin = pl_current->pin_number;
 			    net_name = pl_current->net_name;
 
-			    pairlist = scm_cons (scm_makfrom0str (pin),
-                                     scm_makfrom0str (net_name));
+			    pairlist = scm_cons (scm_from_locale_string (pin),
+                                                 scm_from_locale_string (net_name));
 			    pinslist = scm_cons (pairlist, pinslist);
 			}
 
@@ -594,9 +595,9 @@ SCM g_get_attribute_by_pinseq(SCM scm_uref, SCM scm_pinseq,
   }
 
   if (return_value) {
-    scm_return_value = scm_makfrom0str (return_value);
+    scm_return_value = scm_from_locale_string (return_value);
   } else {
-    scm_return_value = scm_makfrom0str ("unknown");
+    scm_return_value = scm_from_locale_string ("unknown");
   }
 
 #if DEBUG
@@ -679,9 +680,9 @@ SCM g_get_attribute_by_pinnumber(SCM scm_uref, SCM scm_pin, SCM
     }
 
     if (return_value) {
-      scm_return_value = scm_makfrom0str (return_value);
+      scm_return_value = scm_from_locale_string (return_value);
     } else {
-      scm_return_value = scm_makfrom0str ("unknown");
+      scm_return_value = scm_from_locale_string ("unknown");
     }
 
     return (scm_return_value);
@@ -718,10 +719,10 @@ SCM g_get_toplevel_attribute(SCM scm_wanted_attrib)
   }
 
   if (attrib_value != NULL) {
-    scm_return_value = scm_makfrom0str (attrib_value);
+    scm_return_value = scm_from_locale_string (attrib_value);
     g_free (attrib_value);
   } else {
-    scm_return_value = scm_makfrom0str ("not found");
+    scm_return_value = scm_from_locale_string ("not found");
   }
 
   return (scm_return_value);
@@ -774,7 +775,7 @@ SCM g_get_calling_flags()
   
     aux = backend_params;
     while (aux != NULL) {
-      arglist = scm_cons (scm_list_n (scm_makfrom0str (aux->data),
+      arglist = scm_cons (scm_list_n (scm_from_locale_string (aux->data),
 				      SCM_BOOL (TRUE),
 				      SCM_UNDEFINED), 
 			  arglist);
@@ -849,7 +850,7 @@ SCM g_graphical_objs_in_net_with_attrib_get_attrib (SCM scm_netname, SCM scm_has
 		        o_attrib_search_object_attribs_by_name (nl_current->object_ptr,
 		                                                wanted_attrib, 0);
 		      if (attrib_value) {
-			list = scm_cons (scm_makfrom0str (attrib_value), list);
+			list = scm_cons (scm_from_locale_string (attrib_value), list);
 		      }
 		      g_free (attrib_value);
 		    }
diff --git a/gnetlist/src/s_rename.c b/gnetlist/src/s_rename.c
index e847b11..b8adbb2 100644
--- a/gnetlist/src/s_rename.c
+++ b/gnetlist/src/s_rename.c
@@ -323,7 +323,9 @@ SCM g_get_renamed_nets(SCM scm_level)
     {
         for (temp_rename = temp_set->first_rename; temp_rename; temp_rename = temp_rename->next)
         {
-            pairlist = scm_list_n (scm_makfrom0str (temp_rename->src), scm_makfrom0str (temp_rename->dest), SCM_UNDEFINED);
+            pairlist = scm_list_n (scm_from_locale_string (temp_rename->src),
+                                   scm_from_locale_string (temp_rename->dest),
+                                   SCM_UNDEFINED);
             outerlist = scm_cons (pairlist, outerlist);
         }
     }
diff --git a/gnetlist/src/vams_misc.c b/gnetlist/src/vams_misc.c
index 45e99f2..6292346 100644
--- a/gnetlist/src/vams_misc.c
+++ b/gnetlist/src/vams_misc.c
@@ -55,7 +55,7 @@ vams_get_attribs_list (OBJECT *object)
       val = o_attrib_get_name_value (a_current, &found_name, NULL);
 
       if (val) {
-        list = scm_cons (scm_makfrom0str (found_name), list);
+        list = scm_cons (scm_from_locale_string (found_name), list);
       }
 
       g_free (found_name);
diff --git a/gschem/src/g_funcs.c b/gschem/src/g_funcs.c
index f5f44c6..91df379 100644
--- a/gschem/src/g_funcs.c
+++ b/gschem/src/g_funcs.c
@@ -224,7 +224,7 @@ SCM g_funcs_filesel(SCM msg, SCM templ, SCM flags)
 			      c_flags
 			      );
 
-  v = scm_makfrom0str (r);
+  v = scm_from_locale_string (r);
   g_free (r);
 
   return v;
@@ -259,7 +259,7 @@ hash_table_2_list (gpointer key,
                    gpointer user_data)
 {
   SCM *plist = (SCM*)user_data;
-  *plist = scm_cons (scm_makfrom0str ((char*)value), *plist);
+  *plist = scm_cons (scm_from_locale_string ((char*)value), *plist);
 }
 
 /*! \todo Finish function documentation!!!
diff --git a/libgeda/src/g_smob.c b/libgeda/src/g_smob.c
index d6d5388..e61f70f 100644
--- a/libgeda/src/g_smob.c
+++ b/libgeda/src/g_smob.c
@@ -73,7 +73,7 @@ static int g_print_attrib_smob(SCM attrib_smob, SCM port,
       attribute->attribute->text &&
       attribute->attribute->text->string ) {
     scm_puts("#<attribute ", port);
-    scm_display (scm_makfrom0str (attribute->attribute->text->string),
+    scm_display (scm_from_locale_string (attribute->attribute->text->string),
                  port);
     scm_puts(">", port);
   }
@@ -130,8 +130,8 @@ SCM g_get_attrib_name_value(SCM attrib_smob)
   if (attribute != NULL &&
       attribute->attribute != NULL &&
       o_attrib_get_name_value (attribute->attribute, &name, &value)) {
-    returned = scm_cons (scm_makfrom0str (name),
-                         scm_makfrom0str (value));
+    returned = scm_cons (scm_from_locale_string (name),
+                         scm_from_locale_string (value));
     g_free(name);
     g_free(value);
   }
@@ -489,7 +489,7 @@ static int g_print_object_smob(SCM object_smob, SCM port,
       object->object &&
       object->object->name) {
     scm_puts("#<object ", port);
-    scm_display (scm_makfrom0str (object->object->name),
+    scm_display (scm_from_locale_string (object->object->name),
                  port);
     scm_puts(">", port);
   }
@@ -600,7 +600,7 @@ SCM g_get_attrib_value_by_attrib_name(SCM object_smob, SCM scm_attrib_name)
       if (a_current != NULL &&
           o_attrib_get_name_value (a_current, &name, &value)) {
         if (strcmp(name, attrib_name) == 0)
-          returned = scm_cons (scm_makfrom0str (value), returned);
+          returned = scm_cons (scm_from_locale_string (value), returned);
         g_free (name);
         g_free (value);
       }
@@ -759,7 +759,7 @@ static int g_print_page_smob(SCM page_smob, SCM port,
       page->page &&
       page->page->page_filename) {
     scm_puts("#<page ", port);
-    scm_display (scm_makfrom0str (page->page->page_filename),
+    scm_display (scm_from_locale_string (page->page->page_filename),
                  port);
     scm_puts(">", port);
   }
@@ -886,7 +886,7 @@ SCM g_get_page_filename(SCM page_smob)
     (((struct st_page_smob *)SCM_CDR(page_smob))->page);
 
   if (page->page_filename) 
-    returned = scm_makfrom0str (page->page_filename);
+    returned = scm_from_locale_string (page->page_filename);
 
   return (returned);
 }

commit eb2eeee3626c6f127ba2790f708b03d06bb04122
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Commit: Peter TB Brett <peter@xxxxxxxxxxxxx>

    Remove uses of deprecated scm_num2double.

diff --git a/gschem/src/g_rc.c b/gschem/src/g_rc.c
index 0bcfbe9..04e8e8d 100644
--- a/gschem/src/g_rc.c
+++ b/gschem/src/g_rc.c
@@ -563,8 +563,8 @@ SCM g_rc_paper_size(SCM width, SCM height)
               SCM_ARG2, FUNC_NAME);
   
   /* yes this is legit, we are casting the resulting double to an int */
-  default_paper_width  = (int) (SCM_NUM2DOUBLE (0, width)  * MILS_PER_INCH);
-  default_paper_height = (int) (SCM_NUM2DOUBLE (0, height) * MILS_PER_INCH);
+  default_paper_width  = (int) (scm_to_double (width)  * MILS_PER_INCH);
+  default_paper_height = (int) (scm_to_double (height) * MILS_PER_INCH);
 
   return SCM_BOOL_T;
 }
@@ -591,8 +591,8 @@ SCM g_rc_paper_sizes(SCM scm_papername, SCM scm_width, SCM scm_height)
               SCM_ARG3, FUNC_NAME);
 
   papername = SCM_STRING_CHARS (scm_papername);
-  width  = (int) (SCM_NUM2DOUBLE (0, scm_width)  * MILS_PER_INCH);
-  height = (int) (SCM_NUM2DOUBLE (0, scm_height) * MILS_PER_INCH);
+  width  = (int) (scm_to_double (scm_width)  * MILS_PER_INCH);
+  height = (int) (scm_to_double (scm_height) * MILS_PER_INCH);
 
   if (!s_papersizes_uniq(papername)) {
     ret = SCM_BOOL_F;
diff --git a/libgeda/src/g_rc.c b/libgeda/src/g_rc.c
index e287da7..f9d57dd 100644
--- a/libgeda/src/g_rc.c
+++ b/libgeda/src/g_rc.c
@@ -742,9 +742,9 @@ SCM g_rc_world_size(SCM width, SCM height, SCM border)
               SCM_ARG3, FUNC_NAME);
   
   /* yes this is legit, we are casing the resulting double to an int */
-  i_width  = (int) (SCM_NUM2DOUBLE (0, width)  * MILS_PER_INCH);
-  i_height = (int) (SCM_NUM2DOUBLE (0, height) * MILS_PER_INCH);
-  i_border = (int) (SCM_NUM2DOUBLE (0, border) * MILS_PER_INCH);
+  i_width  = (int) (scm_to_double (width)  * MILS_PER_INCH);
+  i_height = (int) (scm_to_double (height) * MILS_PER_INCH);
+  i_border = (int) (scm_to_double (border) * MILS_PER_INCH);
 
   PAPERSIZEtoWORLD(i_width, i_height, i_border,
                    &init_right, &init_bottom);




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