[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: CVS update: g_netlist.c
User: peterb
Date: 07/06/04 12:15:38
Modified: . g_netlist.c g_rc.c vams_misc.c
Log:
Replace deprecated Guile functions & macros.
Replace deprecated SCM_STRINGP, SCM_INUM, SXM_INUMP & SCM_MAKINUM with
recommended equivalents for Guile 1.8.
Revision Changes Path
1.46 eda/geda/gaf/gnetlist/src/g_netlist.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: g_netlist.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gnetlist/src/g_netlist.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -b -r1.45 -r1.46
--- g_netlist.c 29 Apr 2007 12:04:19 -0000 1.45
+++ g_netlist.c 4 Jun 2007 16:15:38 -0000 1.46
@@ -63,8 +63,7 @@
NETLIST *nl_current = NULL;
- SCM_ASSERT( (SCM_NIMP (level) && SCM_STRINGP (level) ),
- level, SCM_ARG1, "gnetlist:get-pins");
+ SCM_ASSERT(scm_is_string (level), level, SCM_ARG1, "gnetlist:get-pins");
/* build a hash table */
ht = g_hash_table_new (g_str_hash, g_str_equal);
@@ -92,8 +91,7 @@
NETLIST *nl_current = NULL;
- SCM_ASSERT( (SCM_NIMP (level) && SCM_STRINGP (level) ),
- level, SCM_ARG1, "gnetlist:get-pins");
+ SCM_ASSERT(scm_is_string (level), level, SCM_ARG1, "gnetlist:get-pins");
for (nl_current = netlist_head; nl_current != NULL;
nl_current = nl_current->next) {
@@ -113,8 +111,7 @@
NETLIST *nl_current;
CPINLIST *pl_current;
- SCM_ASSERT( (SCM_NIMP (uref) && SCM_STRINGP (uref) ),
- uref, SCM_ARG1, "gnetlist:get-pins");
+ SCM_ASSERT(scm_is_string (uref), uref, SCM_ARG1, "gnetlist:get-pins");
/* here is where you make it multi page aware */
nl_current = netlist_head;
@@ -150,8 +147,8 @@
CPINLIST *pl_current;
char *net_name;
- SCM_ASSERT( (SCM_NIMP (scm_level) && SCM_STRINGP (scm_level) ),
- scm_level, SCM_ARG1, "gnetlist:get-all-nets");
+ SCM_ASSERT(scm_is_string (scm_level), scm_level, SCM_ARG1,
+ "gnetlist:get-all-nets");
nl_current = netlist_head;
@@ -194,8 +191,8 @@
CPINLIST *pl_current;
char *net_name;
- SCM_ASSERT( (SCM_NIMP (scm_level) && SCM_STRINGP (scm_level) ),
- scm_level, SCM_ARG1, "gnetlist:get-all-unique-nets");
+ SCM_ASSERT(scm_is_string (scm_level), scm_level, SCM_ARG1,
+ "gnetlist:get-all-unique-nets");
nl_current = netlist_head;
@@ -245,8 +242,8 @@
char *pin;
char *uref;
- SCM_ASSERT( (SCM_NIMP (scm_netname) && SCM_STRINGP (scm_netname) ),
- scm_netname, SCM_ARG1, "gnetlist:get-all-connections");
+ SCM_ASSERT(scm_is_string(scm_netname), scm_netname, SCM_ARG1,
+ "gnetlist:get-all-connections");
wanted_net_name = SCM_STRING_CHARS (scm_netname);
@@ -335,11 +332,11 @@
char *pin;
char *uref;
- SCM_ASSERT( (SCM_NIMP (scm_uref) && SCM_STRINGP (scm_uref) ),
- scm_uref, SCM_ARG1, "gnetlist:get-nets");
+ SCM_ASSERT(scm_is_string (scm_uref), scm_uref, SCM_ARG1,
+ "gnetlist:get-nets");
- SCM_ASSERT( (SCM_NIMP (scm_pin) && SCM_STRINGP (scm_pin) ),
- scm_pin, SCM_ARG2, "gnetlist:get-nets");
+ SCM_ASSERT(scm_is_string (scm_pin), scm_pin, SCM_ARG2,
+ "gnetlist:get-nets");
wanted_uref = SCM_STRING_CHARS (scm_uref);
@@ -432,7 +429,7 @@
char *net_name = NULL;
char *pin = NULL;
- SCM_ASSERT( (SCM_NIMP (scm_uref) && SCM_STRINGP (scm_uref) ),
+ SCM_ASSERT(scm_is_string (scm_uref),
scm_uref, SCM_ARG1, "gnetlist:get-pins-nets");
wanted_uref = SCM_STRING_CHARS (scm_uref);
@@ -482,10 +479,10 @@
char *wanted_attrib;
char *return_value = NULL;
- SCM_ASSERT( (SCM_NIMP (scm_uref) && SCM_STRINGP (scm_uref) ),
+ SCM_ASSERT(scm_is_string (scm_uref),
scm_uref, SCM_ARG1, "gnetlist:get-package-attribute");
- SCM_ASSERT( (SCM_NIMP (scm_wanted_attrib) && SCM_STRINGP (scm_wanted_attrib) ),
+ SCM_ASSERT(scm_is_string (scm_wanted_attrib),
scm_wanted_attrib, SCM_ARG2, "gnetlist:get-package-attribute");
uref = SCM_STRING_CHARS (scm_uref);
@@ -546,16 +543,14 @@
OBJECT *o_text_object;
OBJECT *o_pin_object;
- SCM_ASSERT( (SCM_NIMP (scm_uref) && SCM_STRINGP (scm_uref) ),
+ SCM_ASSERT(scm_is_string (scm_uref),
scm_uref, SCM_ARG1, "gnetlist:get-pin-number-seq");
- SCM_ASSERT( (SCM_NIMP (scm_pinseq) &&
- SCM_STRINGP (scm_pinseq) ),
+ SCM_ASSERT(scm_is_string (scm_pinseq),
scm_pinseq, SCM_ARG2, "gnetlist:get-pin-number-seq");
- SCM_ASSERT( (SCM_NIMP (scm_wanted_attrib) &&
- SCM_STRINGP (scm_wanted_attrib) ),
+ SCM_ASSERT(scm_is_string (scm_wanted_attrib),
scm_wanted_attrib, SCM_ARG3, "gnetlist:get-pin-attribute-seq");
uref = SCM_STRING_CHARS (scm_uref);
@@ -660,13 +655,13 @@
char *return_value = NULL;
int done = FALSE;
- SCM_ASSERT( (SCM_NIMP (scm_uref) && SCM_STRINGP (scm_uref) ),
+ SCM_ASSERT(scm_is_string (scm_uref),
scm_uref, SCM_ARG1, "gnetlist:get-pin-attribute");
- SCM_ASSERT( (SCM_NIMP (scm_pin) && SCM_STRINGP (scm_pin) ),
+ SCM_ASSERT(scm_is_string (scm_pin),
scm_pin, SCM_ARG2, "gnetlist:get-pin-attribute");
- SCM_ASSERT( (SCM_NIMP (scm_wanted_attrib) && SCM_STRINGP (scm_wanted_attrib) ),
+ SCM_ASSERT(scm_is_string (scm_wanted_attrib),
scm_wanted_attrib, SCM_ARG3, "gnetlist:get-pin-attribute");
uref = SCM_STRING_CHARS (scm_uref);
@@ -735,7 +730,7 @@
char *return_value;
SCM scm_return_value;
- SCM_ASSERT( (SCM_NIMP (scm_wanted_attrib) && SCM_STRINGP (scm_wanted_attrib) ),
+ SCM_ASSERT(scm_is_string (scm_wanted_attrib),
scm_wanted_attrib, SCM_ARG1, "gnetlist:get-toplevel-attribute");
wanted_attrib = SCM_STRING_CHARS (scm_wanted_attrib);
@@ -771,7 +766,7 @@
printf("netlist_mode: %s %d\n", string, netlist_mode);
#endif
- return (SCM_MAKINUM (0));
+ return (scm_from_int (0));
}
#endif
@@ -787,7 +782,7 @@
SCM slot_number;
- SCM_ASSERT( (SCM_NIMP (scm_uref) && SCM_STRINGP (scm_uref) ),
+ SCM_ASSERT(scm_is_string (scm_uref),
scm_uref, SCM_ARG1, "gnetlist:get-slots-used-of-package");
uref = SCM_STRING_CHARS (scm_uref);
@@ -821,7 +816,7 @@
slot = g_strconcat ("#d", slot_tmp, NULL);
g_free (slot_tmp);
slot_number = scm_string_to_number(scm_makfrom0str (slot),
- SCM_MAKINUM(10));
+ scm_from_int(10));
g_free (slot);
if (slot_number != SCM_BOOL_F) {
slots_list = scm_cons (slot_number, slots_list);
@@ -852,7 +847,7 @@
SCM slot_number;
- SCM_ASSERT( (SCM_NIMP (scm_uref) && SCM_STRINGP (scm_uref) ),
+ SCM_ASSERT(scm_is_string (scm_uref),
scm_uref, SCM_ARG1, "gnetlist:get-unique-slots-used-of-package");
uref = SCM_STRING_CHARS (scm_uref);
@@ -886,7 +881,7 @@
slot = g_strconcat ("#d", slot_tmp, NULL);
g_free (slot_tmp);
slot_number = scm_string_to_number(scm_makfrom0str (slot),
- SCM_MAKINUM(10));
+ scm_from_int(10));
g_free (slot);
if (slot_number != SCM_BOOL_F) {
if (scm_member(slot_number, slots_list) == SCM_BOOL_F) {
@@ -975,17 +970,14 @@
char *has_attrib_value = NULL;
char *has_attrib_name = NULL;
- SCM_ASSERT( (SCM_NIMP (scm_netname) && SCM_STRINGP (scm_netname) ),
- scm_netname, SCM_ARG1,
+ SCM_ASSERT(scm_is_string (scm_netname), scm_netname, SCM_ARG1,
"gnetlist:get-attr-of-conn-graph-objs-with-attr");
- SCM_ASSERT( (SCM_NIMP (scm_wanted_attribute) &&
- SCM_STRINGP (scm_wanted_attribute) ),
+ SCM_ASSERT(scm_is_string (scm_wanted_attribute),
scm_wanted_attribute, SCM_ARG2,
"gnetlist:get-attr-of-conn-graph-objs-with-attr");
- SCM_ASSERT( (SCM_NIMP (scm_has_attribute) &&
- SCM_STRINGP (scm_has_attribute) ),
+ SCM_ASSERT(scm_is_string (scm_has_attribute),
scm_has_attribute, SCM_ARG3,
"gnetlist:get-attr-of-conn-graph-objs-with-attr");
1.29 eda/geda/gaf/gnetlist/src/g_rc.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: g_rc.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gnetlist/src/g_rc.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -b -r1.28 -r1.29
--- g_rc.c 16 Jul 2006 02:11:31 -0000 1.28
+++ g_rc.c 4 Jun 2007 16:15:38 -0000 1.29
@@ -80,7 +80,7 @@
int index;
char *mode;
- SCM_ASSERT (SCM_NIMP (scmmode) && SCM_STRINGP (scmmode), scmmode,
+ SCM_ASSERT (scm_is_string (scmmode), scmmode,
SCM_ARG1, rc_name);
mode = SCM_STRING_CHARS (scmmode);
@@ -111,7 +111,7 @@
SCM g_rc_gnetlist_version(SCM version)
{
- SCM_ASSERT (SCM_NIMP (version) && SCM_STRINGP (version), version,
+ SCM_ASSERT (scm_is_string (version), version,
SCM_ARG1, "gnetlist-version");
if (strcmp (SCM_STRING_CHARS (version), VERSION) != 0) {
@@ -122,7 +122,7 @@
"While gnetlist is in ALPHA, please be sure that you have the latest rc file.\n");
}
- return SCM_MAKINUM (0);
+ return scm_from_int (0);
}
@@ -183,7 +183,7 @@
SCM g_rc_hierarchy_netname_separator(SCM name)
{
- SCM_ASSERT (SCM_NIMP (name) && SCM_STRINGP (name), name,
+ SCM_ASSERT (scm_is_string (name), name,
SCM_ARG1, "hierarchy-netname-separator");
if (default_hierarchy_netname_separator) {
@@ -197,7 +197,7 @@
SCM g_rc_hierarchy_netattrib_separator(SCM name)
{
- SCM_ASSERT (SCM_NIMP (name) && SCM_STRINGP (name), name,
+ SCM_ASSERT (scm_is_string (name), name,
SCM_ARG1, "hierarchy-netattrib-separator");
if (default_hierarchy_netattrib_separator) {
@@ -211,7 +211,7 @@
SCM g_rc_hierarchy_uref_separator(SCM name)
{
- SCM_ASSERT (SCM_NIMP (name) && SCM_STRINGP (name), name,
+ SCM_ASSERT (scm_is_string (name), name,
SCM_ARG1, "hierarchy-uref-separator");
if (default_hierarchy_uref_separator) {
@@ -258,7 +258,7 @@
SCM g_rc_unnamed_netname(SCM name)
{
- SCM_ASSERT (SCM_NIMP (name) && SCM_STRINGP (name), name,
+ SCM_ASSERT (scm_is_string (name), name,
SCM_ARG1, "unamed-netname");
if (default_unnamed_netname) {
1.10 eda/geda/gaf/gnetlist/src/vams_misc.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: vams_misc.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gnetlist/src/vams_misc.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- vams_misc.c 16 Jul 2006 02:11:31 -0000 1.9
+++ vams_misc.c 4 Jun 2007 16:15:38 -0000 1.10
@@ -89,8 +89,8 @@
char *uref;
char *return_value=NULL;
- SCM_ASSERT( (SCM_NIMP (scm_uref) && SCM_STRINGP (scm_uref) ),
- scm_uref , SCM_ARG1, "gnetlist:vams-get-package-attributes");
+ SCM_ASSERT(scm_is_string (scm_uref), scm_uref, SCM_ARG1,
+ "gnetlist:vams-get-package-attributes");
uref = SCM_STRING_CHARS (scm_uref);
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs