From 4638e08794a1853fc6b1ac728c62f339844c8d08 Mon Sep 17 00:00:00 2001 From: "Greg J. Badros" Date: Sat, 18 Dec 1999 23:24:35 +0000 Subject: [PATCH] * alist.c, chars.c, dynl.c, net_db.c, numbers.c, unif.c: Use SCM_NUM2ULONG instead of scm_num2ulong; SCM_NUM2LONG instead of scm_num2long; SCM_WTA instead of scm_wta. Only done for when FUNC_NAME was used as an argument of the macro and the formal argument name was the explicit argument in the old function call. These were just missed in my first pass of changes. --- libguile/alist.c | 2 +- libguile/chars.c | 2 +- libguile/dynl.c | 5 ++--- libguile/net_db.c | 4 ++-- libguile/numbers.c | 4 ++-- libguile/unif.c | 10 +++++----- 6 files changed, 13 insertions(+), 14 deletions(-) diff --git a/libguile/alist.c b/libguile/alist.c index 8a850be7d..1e915410d 100644 --- a/libguile/alist.c +++ b/libguile/alist.c @@ -172,7 +172,7 @@ GUILE_PROC(scm_assv, "assv", 2, 0, 0, } # ifndef SCM_RECKLESS if (!(SCM_NULLP(alist))) - badlst: scm_wta(alist, (char *)SCM_ARG2, FUNC_NAME); + badlst: SCM_WTA(2,alist); # endif return SCM_BOOL_F; } diff --git a/libguile/chars.c b/libguile/chars.c index e578355bc..2c970b693 100644 --- a/libguile/chars.c +++ b/libguile/chars.c @@ -265,7 +265,7 @@ GUILE_PROC(scm_integer_to_char, "integer->char", 1, 0, 0, "Return the character at position N in the Ascii sequence.") #define FUNC_NAME s_scm_integer_to_char { - unsigned long ni = 0xffff & scm_num2ulong (n, (char *)SCM_ARG1, FUNC_NAME); + unsigned long ni = 0xffff & SCM_NUM2ULONG (1,n); return SCM_MAKICHR(ni); } #undef FUNC_NAME diff --git a/libguile/dynl.c b/libguile/dynl.c index 2e7f340a1..943fadc6e 100644 --- a/libguile/dynl.c +++ b/libguile/dynl.c @@ -476,7 +476,7 @@ Interrupts are deferred while the C function is executing (with if (SCM_ROSTRINGP (func)) func = scm_dynamic_func (func, dobj); - fptr = (void (*)()) scm_num2ulong (func, (char *)SCM_ARG1, FUNC_NAME); + fptr = (void (*)()) SCM_NUM2ULONG (1, func); SCM_DEFER_INTS; fptr (); SCM_ALLOW_INTS; @@ -520,8 +520,7 @@ and returned from the call to @code{dynamic-args-call}. if (SCM_ROSTRINGP (func)) func = scm_dynamic_func (func, dobj); - fptr = (int (*)(int, char **)) scm_num2ulong (func, (char *)SCM_ARG1, - FUNC_NAME); + fptr = (int (*)(int, char **)) SCM_NUM2ULONG (1,func); SCM_DEFER_INTS; argv = scm_make_argv_from_stringlist (args, &argc, FUNC_NAME, SCM_ARG3); diff --git a/libguile/net_db.c b/libguile/net_db.c index 1815e0e61..1d21715e1 100644 --- a/libguile/net_db.c +++ b/libguile/net_db.c @@ -281,7 +281,7 @@ Unusual conditions may result in errors thrown to the } else { - inad.s_addr = htonl (scm_num2ulong (name, (char *) SCM_ARG1, FUNC_NAME)); + inad.s_addr = htonl (SCM_NUM2ULONG (1,name); entry = gethostbyaddr ((char *) &inad, sizeof (inad), AF_INET); } if (!entry) @@ -356,7 +356,7 @@ given.") else { unsigned long netnum; - netnum = scm_num2ulong (name, (char *) SCM_ARG1, FUNC_NAME); + netnum = SCM_NUM2ULONG (1, name); entry = getnetbyaddr (netnum, AF_INET); } if (!entry) diff --git a/libguile/numbers.c b/libguile/numbers.c index 46a205cbc..035ad7963 100644 --- a/libguile/numbers.c +++ b/libguile/numbers.c @@ -1875,7 +1875,7 @@ GUILE_PROC (scm_number_to_string, "number->string", 1, 1, 0, if (!SCM_INEXP (x)) { badx: - scm_wta (x, (char *) SCM_ARG1, FUNC_NAME); + SCM_WTA (1, x); } #endif #else @@ -4436,7 +4436,7 @@ GUILE_PROC (scm_inexact_to_exact, "inexact->exact", 1, 0, 0, if (!(SCM_REALP (z))) { badz: - scm_wta (z, (char *) SCM_ARG1, FUNC_NAME); + SCM_WTA (1, z); } #endif #else diff --git a/libguile/unif.c b/libguile/unif.c index f49e6aa1d..875f60f75 100644 --- a/libguile/unif.c +++ b/libguile/unif.c @@ -1536,7 +1536,7 @@ loop: if (!SCM_UNBNDP (start)) { offset = - scm_num2long (start, (char *) SCM_ARG3, FUNC_NAME); + SCM_NUM2LONG (3, start); if (offset < 0 || offset >= cend) scm_out_of_range (FUNC_NAME, start); @@ -1544,7 +1544,7 @@ loop: if (!SCM_UNBNDP (end)) { long tend = - scm_num2long (end, (char *) SCM_ARG4, FUNC_NAME); + SCM_NUM2LONG (4, end); if (tend <= offset || tend > cend) scm_out_of_range (FUNC_NAME, end); @@ -1647,7 +1647,7 @@ loop: switch SCM_TYP7 (v) { default: - badarg1:scm_wta (v, (char *) SCM_ARG1, FUNC_NAME); + badarg1:SCM_WTA (1, v); case scm_tc7_smob: SCM_ASRTGO (SCM_ARRAYP (v), badarg1); v = scm_ra2contig (v, 1); @@ -1694,7 +1694,7 @@ loop: if (!SCM_UNBNDP (start)) { offset = - scm_num2long (start, (char *) SCM_ARG3, FUNC_NAME); + SCM_NUM2LONG (3, start); if (offset < 0 || offset >= cend) scm_out_of_range (FUNC_NAME, start); @@ -1702,7 +1702,7 @@ loop: if (!SCM_UNBNDP (end)) { long tend = - scm_num2long (end, (char *) SCM_ARG4, FUNC_NAME); + SCM_NUM2LONG (4, end); if (tend <= offset || tend > cend) scm_out_of_range (FUNC_NAME, end);