summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg J. Badros <gjb@cs.washington.edu>1999-12-16 20:48:05 +0000
committerGreg J. Badros <gjb@cs.washington.edu>1999-12-16 20:48:05 +0000
commit0c95b57d77efbe82bb0ade78df5d78d6d0f2a641 (patch)
tree4cd49dc6b94effdaed1476f397dc7c82d371b008
parent9c24ff3e6c28e7b9adc6b386ea0033e8a947c40e (diff)
downloadguile-0c95b57d77efbe82bb0ade78df5d78d6d0f2a641.tar.gz
* coop-threads.c: Remove K&R function headers.
* scm_validate.h: Added SCM_VALIDATE_THREAD. * *.c: Remove SCM_NIMP(X) when it is an extraneous pre-test given that SCM_FOOP macros all now include SCM_NIMP in their expansion. This simplifies lots of code, making it far more readable.
-rw-r--r--libguile/alist.c28
-rw-r--r--libguile/async.c2
-rw-r--r--libguile/backtrace.c36
-rw-r--r--libguile/coop-threads.c89
-rw-r--r--libguile/debug.c14
-rw-r--r--libguile/dynl.c12
-rw-r--r--libguile/eval.c33
-rw-r--r--libguile/evalext.c10
-rw-r--r--libguile/feature.c4
-rw-r--r--libguile/filesys.c26
-rw-r--r--libguile/fluids.c2
-rw-r--r--libguile/fports.c2
-rw-r--r--libguile/gc.c8
-rw-r--r--libguile/gh_data.c14
-rw-r--r--libguile/hash.c2
-rw-r--r--libguile/hashtab.c10
-rw-r--r--libguile/ioext.c2
-rw-r--r--libguile/keywords.c2
-rw-r--r--libguile/list.c32
-rw-r--r--libguile/load.c6
-rw-r--r--libguile/mit-pthreads.c10
-rw-r--r--libguile/net_db.c8
-rw-r--r--libguile/numbers.c182
-rw-r--r--libguile/objects.c6
-rw-r--r--libguile/options.c2
-rw-r--r--libguile/ports.c6
-rw-r--r--libguile/posix.c7
-rw-r--r--libguile/print.c6
-rw-r--r--libguile/procprop.c10
-rw-r--r--libguile/procs.c4
-rw-r--r--libguile/ramap.c14
-rw-r--r--libguile/random.c2
-rw-r--r--libguile/read.c10
-rw-r--r--libguile/regex-posix.c2
-rw-r--r--libguile/root.c2
-rw-r--r--libguile/scm_validate.h5
-rw-r--r--libguile/socket.c8
-rw-r--r--libguile/srcprop.c12
-rw-r--r--libguile/stacks.c12
-rw-r--r--libguile/stime.c7
-rw-r--r--libguile/strings.c2
-rw-r--r--libguile/strop.c2
-rw-r--r--libguile/strports.c2
-rw-r--r--libguile/struct.c2
-rw-r--r--libguile/symbols.c2
-rw-r--r--libguile/throw.c7
-rw-r--r--libguile/unif.c24
-rw-r--r--libguile/variable.c2
-rw-r--r--libguile/vectors.c6
-rw-r--r--libguile/weaks.c10
50 files changed, 324 insertions, 384 deletions
diff --git a/libguile/alist.c b/libguile/alist.c
index 69edf3e6c..8a850be7d 100644
--- a/libguile/alist.c
+++ b/libguile/alist.c
@@ -82,10 +82,10 @@ Recommended only for use in Guile internals.")
#define FUNC_NAME s_scm_sloppy_assq
{
- for (; SCM_NIMP (alist) && SCM_CONSP (alist); alist = SCM_CDR (alist))
+ for (; SCM_CONSP (alist); alist = SCM_CDR (alist))
{
SCM tmp = SCM_CAR(alist);
- if (SCM_NIMP (tmp) && SCM_CONSP (tmp) && (SCM_CAR (tmp)==x))
+ if (SCM_CONSP (tmp) && (SCM_CAR (tmp)==x))
return tmp;
}
return SCM_BOOL_F;
@@ -100,7 +100,7 @@ GUILE_PROC (scm_sloppy_assv, "sloppy-assv", 2, 0, 0,
Recommended only for use in Guile internals.")
#define FUNC_NAME s_scm_sloppy_assv
{
- for (; SCM_NIMP (alist) && SCM_CONSP (alist); alist = SCM_CDR (alist))
+ for (; SCM_CONSP (alist); alist = SCM_CDR (alist))
{
SCM tmp = SCM_CAR(alist);
if (SCM_NIMP (tmp)
@@ -119,7 +119,7 @@ GUILE_PROC (scm_sloppy_assoc, "sloppy-assoc", 2, 0, 0,
Recommended only for use in Guile internals.")
#define FUNC_NAME s_scm_sloppy_assoc
{
- for (; SCM_NIMP (alist) && SCM_CONSP (alist); alist = SCM_CDR (alist))
+ for (; SCM_CONSP (alist); alist = SCM_CDR (alist))
{
SCM tmp = SCM_CAR(alist);
if (SCM_NIMP (tmp)
@@ -167,7 +167,7 @@ GUILE_PROC(scm_assv, "assv", 2, 0, 0,
for(;SCM_NIMP(alist);alist = SCM_CDR(alist)) {
SCM_ASRTGO(SCM_CONSP(alist), badlst);
tmp = SCM_CAR(alist);
- SCM_ASRTGO(SCM_NIMP(tmp) && SCM_CONSP(tmp), badlst);
+ SCM_ASRTGO(SCM_CONSP(tmp), badlst);
if SCM_NFALSEP(scm_eqv_p(SCM_CAR(tmp), x)) return tmp;
}
# ifndef SCM_RECKLESS
@@ -216,7 +216,7 @@ where @var{associator} is one of @code{assq}, @code{assv} or @code{assoc}.")
SCM handle;
handle = scm_sloppy_assq (key, alist);
- if (SCM_NIMP (handle) && SCM_CONSP (handle))
+ if (SCM_CONSP (handle))
{
return SCM_CDR (handle);
}
@@ -233,7 +233,7 @@ GUILE_PROC (scm_assv_ref, "assv-ref", 2, 0, 0,
SCM handle;
handle = scm_sloppy_assv (key, alist);
- if (SCM_NIMP (handle) && SCM_CONSP (handle))
+ if (SCM_CONSP (handle))
{
return SCM_CDR (handle);
}
@@ -250,7 +250,7 @@ GUILE_PROC (scm_assoc_ref, "assoc-ref", 2, 0, 0,
SCM handle;
handle = scm_sloppy_assoc (key, alist);
- if (SCM_NIMP (handle) && SCM_CONSP (handle))
+ if (SCM_CONSP (handle))
{
return SCM_CDR (handle);
}
@@ -280,7 +280,7 @@ association list.")
SCM handle;
handle = scm_sloppy_assq (key, alist);
- if (SCM_NIMP (handle) && SCM_CONSP (handle))
+ if (SCM_CONSP (handle))
{
SCM_SETCDR (handle, val);
return alist;
@@ -298,7 +298,7 @@ GUILE_PROC (scm_assv_set_x, "assv-set!", 3, 0, 0,
SCM handle;
handle = scm_sloppy_assv (key, alist);
- if (SCM_NIMP (handle) && SCM_CONSP (handle))
+ if (SCM_CONSP (handle))
{
SCM_SETCDR (handle, val);
return alist;
@@ -316,7 +316,7 @@ GUILE_PROC (scm_assoc_set_x, "assoc-set!", 3, 0, 0,
SCM handle;
handle = scm_sloppy_assoc (key, alist);
- if (SCM_NIMP (handle) && SCM_CONSP (handle))
+ if (SCM_CONSP (handle))
{
SCM_SETCDR (handle, val);
return alist;
@@ -340,7 +340,7 @@ the resulting alist.")
SCM handle;
handle = scm_sloppy_assq (key, alist);
- if (SCM_NIMP (handle) && SCM_CONSP (handle))
+ if (SCM_CONSP (handle))
{
return scm_delq_x (handle, alist);
}
@@ -358,7 +358,7 @@ GUILE_PROC (scm_assv_remove_x, "assv-remove!", 2, 0, 0,
SCM handle;
handle = scm_sloppy_assv (key, alist);
- if (SCM_NIMP (handle) && SCM_CONSP (handle))
+ if (SCM_CONSP (handle))
{
return scm_delv_x (handle, alist);
}
@@ -376,7 +376,7 @@ GUILE_PROC (scm_assoc_remove_x, "assoc-remove!", 2, 0, 0,
SCM handle;
handle = scm_sloppy_assoc (key, alist);
- if (SCM_NIMP (handle) && SCM_CONSP (handle))
+ if (SCM_CONSP (handle))
{
return scm_delete_x (handle, alist);
}
diff --git a/libguile/async.c b/libguile/async.c
index f53354dd7..db636611e 100644
--- a/libguile/async.c
+++ b/libguile/async.c
@@ -348,7 +348,7 @@ GUILE_PROC(scm_run_asyncs, "run-asyncs", 1, 0, 0,
struct scm_async * it;
SCM_VALIDATE_NIMCONS(1,list_of_a);
a = SCM_CAR (list_of_a);
- SCM_ASSERT (SCM_NIMP (a) && SCM_ASYNCP (a), a, SCM_ARG1, FUNC_NAME);
+ SCM_ASSERT (SCM_ASYNCP (a), a, SCM_ARG1, FUNC_NAME);
it = SCM_ASYNC (a);
scm_mask_ints = 1;
if (it->got_it)
diff --git a/libguile/backtrace.c b/libguile/backtrace.c
index c471077d7..c2b325ee7 100644
--- a/libguile/backtrace.c
+++ b/libguile/backtrace.c
@@ -64,6 +64,7 @@
#include "throw.h"
#include "fluids.h"
+#include "scm_validate.h"
#include "backtrace.h"
/* {Error reporting and backtraces}
@@ -84,10 +85,10 @@ SCM scm_the_last_stack_fluid;
static void
display_header (SCM source, SCM port)
{
- SCM fname = (SCM_NIMP (source) && SCM_MEMOIZEDP (source)
+ SCM fname = (SCM_MEMOIZEDP (source)
? scm_source_property (source, scm_sym_filename)
: SCM_BOOL_F);
- if (SCM_NIMP (fname) && SCM_STRINGP (fname))
+ if (SCM_STRINGP (fname))
{
scm_prin1 (fname, port, 0);
scm_putc (':', port);
@@ -154,7 +155,7 @@ display_expression (SCM frame,SCM pname,SCM source,SCM port)
pstate->fancyp = 1;
pstate->level = 2;
pstate->length = 3;
- if (SCM_NIMP (pname) && SCM_ROSTRINGP (pname))
+ if (SCM_ROSTRINGP (pname))
{
if (SCM_NIMP (frame)
&& SCM_FRAMEP (frame)
@@ -163,7 +164,7 @@ display_expression (SCM frame,SCM pname,SCM source,SCM port)
else
scm_puts ("In procedure ", port);
scm_iprin1 (pname, port, pstate);
- if (SCM_NIMP (source) && SCM_MEMOIZEDP (source))
+ if (SCM_MEMOIZEDP (source))
{
scm_puts (" in expression ", port);
pstate->writingp = 1;
@@ -205,17 +206,16 @@ display_error_body (struct display_error_args *a)
current_frame = scm_stack_ref (a->stack, SCM_INUM0);
source = SCM_FRAME_SOURCE (current_frame);
prev_frame = SCM_FRAME_PREV (current_frame);
- if (!(SCM_NIMP (source) && SCM_MEMOIZEDP (source))
+ if (!SCM_MEMOIZEDP (source)
&& prev_frame != SCM_BOOL_F)
source = SCM_FRAME_SOURCE (prev_frame);
if (SCM_FRAME_PROC_P (current_frame)
&& scm_procedure_p (SCM_FRAME_PROC (current_frame)) == SCM_BOOL_T)
pname = scm_procedure_name (SCM_FRAME_PROC (current_frame));
}
- if (!(SCM_NIMP (pname) && SCM_ROSTRINGP (pname)))
+ if (!SCM_ROSTRINGP (pname))
pname = a->subr;
- if ((SCM_NIMP (pname) && SCM_ROSTRINGP (pname))
- || (SCM_NIMP (source) && SCM_MEMOIZEDP (source)))
+ if (SCM_ROSTRINGP (pname) || SCM_MEMOIZEDP (source))
{
display_header (source, a->port);
display_expression (current_frame, pname, source, a->port);
@@ -338,7 +338,7 @@ display_frame_expr (char *hdr,SCM exp,char *tlr,int indentation,SCM sport,SCM po
{
pstate->length = print_params[i].length;
ptob->seek (sport, 0, SEEK_SET);
- if (SCM_NIMP (exp) && SCM_CONSP (exp))
+ if (SCM_CONSP (exp))
{
pstate->level = print_params[i].level - 1;
scm_iprlist (hdr, exp, tlr[0], sport, pstate);
@@ -392,17 +392,15 @@ GUILE_PROC(scm_display_application, "display-application", 1, 2, 0,
"")
#define FUNC_NAME s_scm_display_application
{
- SCM_ASSERT (SCM_NIMP (frame) && SCM_FRAMEP (frame),
- frame, SCM_ARG1, s_display_application);
+ SCM_VALIDATE_FRAME(1,frame);
if (SCM_UNBNDP (port))
port = scm_cur_outp;
else
- SCM_ASSERT (SCM_NIMP (port) && SCM_OPOUTPORTP (port),
- port, SCM_ARG2, s_display_application);
+ SCM_VALIDATE_OPOUTPORT(2,port);
if (SCM_UNBNDP (indent))
indent = SCM_INUM0;
else
- SCM_ASSERT (SCM_INUMP (indent), indent, SCM_ARG3, s_display_application);
+ SCM_VALIDATE_INT(3,indent);
if (SCM_FRAME_PROC_P (frame))
/* Display an application. */
@@ -466,14 +464,14 @@ display_frame (SCM frame,int nfield,int indentation,SCM sport,SCM port,scm_print
/* Display a special form. */
{
SCM source = SCM_FRAME_SOURCE (frame);
- SCM copy = (SCM_NIMP (source) && SCM_CONSP (source)
+ SCM copy = (SCM_CONSP (source)
? scm_source_property (source, scm_sym_copy)
: SCM_BOOL_F);
- SCM umcopy = (SCM_NIMP (source) && SCM_MEMOIZEDP (source)
+ SCM umcopy = (SCM_MEMOIZEDP (source)
? scm_unmemoize (source)
: SCM_BOOL_F);
display_frame_expr ("(",
- SCM_NIMP (copy) && SCM_CONSP (copy) ? copy : umcopy,
+ SCM_CONSP (copy) ? copy : umcopy,
")",
nfield + 1 + indentation,
sport,
@@ -509,11 +507,11 @@ display_backtrace_body(struct display_backtrace_args *a)
a->port = SCM_COERCE_OUTPORT (a->port);
/* Argument checking and extraction. */
- SCM_ASSERT (SCM_NIMP (a->stack) && SCM_STACKP (a->stack),
+ SCM_ASSERT (SCM_STACKP (a->stack),
a->stack,
SCM_ARG1,
s_display_backtrace);
- SCM_ASSERT (SCM_NIMP (a->port) && SCM_OPOUTPORTP (a->port),
+ SCM_ASSERT (SCM_OPOUTPORTP (a->port),
a->port,
SCM_ARG2,
s_display_backtrace);
diff --git a/libguile/coop-threads.c b/libguile/coop-threads.c
index c7f4e60a7..95eac02a7 100644
--- a/libguile/coop-threads.c
+++ b/libguile/coop-threads.c
@@ -38,8 +38,13 @@
* If you write modifications of your own for GUILE, it is your choice
* whether to permit this exception to apply to your modifications.
* If you do not wish that, delete this exception notice. */
+
+/* Software engineering face-lift by Greg J. Badros, 11-Dec-1999,
+ gjb@cs.washington.edu, http://www.cs.washington.edu/homes/gjb */
+
+#include "scm_validate.h"
#include "coop-threads.h"
/* A counter of the current number of threads */
@@ -55,14 +60,8 @@ size_t scm_switch_counter = SCM_THREAD_SWITCH_COUNT;
coop_m scm_critical_section_mutex;
-#ifdef __STDC__
void
scm_threads_init (SCM_STACKITEM *i)
-#else
-void
-scm_threads_init (i)
- SCM_STACKITEM *i;
-#endif
{
coop_init();
@@ -78,13 +77,8 @@ scm_threads_init (i)
coop_global_main.data = 0; /* Initialized in init.c */
}
-#ifdef __STDC__
void
-scm_threads_mark_stacks ()
-#else
-void
-scm_threads_mark_stacks ()
-#endif
+scm_threads_mark_stacks (void)
{
coop_t *thread;
@@ -377,27 +371,18 @@ scm_spawn_thread (scm_catch_body_t body, void *body_data,
return thread;
}
-#ifdef __STDC__
SCM
scm_join_thread (SCM t)
-#else
-SCM
-scm_join_thread (t)
- SCM t;
-#endif
+#define FUNC_NAME s_join_thread
{
- SCM_ASSERT (SCM_NIMP (t) && SCM_THREADP (t), t, SCM_ARG1, s_join_thread);
+ SCM_VALIDATE_THREAD(1,t);
coop_join (SCM_THREAD_DATA (t));
return SCM_BOOL_T;
}
+#undef FUNC_NAME
-#ifdef __STDC__
SCM
-scm_yield ()
-#else
-SCM
-scm_yield ()
-#endif
+scm_yield (void)
{
/* Yield early */
scm_switch_counter = SCM_THREAD_SWITCH_COUNT;
@@ -406,26 +391,16 @@ scm_yield ()
return SCM_BOOL_T;
}
-#ifdef __STDC__
SCM
-scm_single_thread_p ()
-#else
-SCM
-scm_single_thread_p ()
-#endif
+scm_single_thread_p (void)
{
return (coop_global_runq.tail == &coop_global_runq.t
? SCM_BOOL_T
: SCM_BOOL_F);
}
-#ifdef __STDC__
SCM
-scm_make_mutex ()
-#else
-SCM
-scm_make_mutex ()
-#endif
+scm_make_mutex (void)
{
SCM m;
coop_m *data = (coop_m *) scm_must_malloc (sizeof (coop_m), "mutex");
@@ -435,30 +410,18 @@ scm_make_mutex ()
return m;
}
-#ifdef __STDC__
SCM
scm_lock_mutex (SCM m)
-#else
-SCM
-scm_lock_mutex (m)
- SCM m;
-#endif
{
SCM_ASSERT (SCM_NIMP (m) && SCM_MUTEXP (m), m, SCM_ARG1, s_lock_mutex);
coop_mutex_lock (SCM_MUTEX_DATA (m));
return SCM_BOOL_T;
}
-#ifdef __STDC__
SCM
scm_unlock_mutex (SCM m)
-#else
-SCM
-scm_unlock_mutex (m)
- SCM m;
-#endif
{
- SCM_ASSERT (SCM_NIMP (m) && SCM_MUTEXP (m), m, SCM_ARG1, s_unlock_mutex);
+ SCM_ASSERT (SCM_MUTEXP (m), m, SCM_ARG1, s_unlock_mutex);
coop_mutex_unlock(SCM_MUTEX_DATA (m));
/* Yield early */
@@ -468,13 +431,8 @@ scm_unlock_mutex (m)
return SCM_BOOL_T;
}
-#ifdef __STDC__
SCM
-scm_make_condition_variable ()
-#else
-SCM
-scm_make_condition_variable ()
-#endif
+scm_make_condition_variable (void)
{
SCM c;
coop_c *data = (coop_c *) scm_must_malloc (sizeof (coop_c), "condvar");
@@ -483,21 +441,14 @@ scm_make_condition_variable ()
return c;
}
-#ifdef __STDC__
SCM
scm_wait_condition_variable (SCM c, SCM m)
-#else
-SCM
-scm_wait_condition_variable (c, m)
- SCM c;
- SCM m;
-#endif
{
- SCM_ASSERT (SCM_NIMP (c) && SCM_CONDVARP (c),
+ SCM_ASSERT (SCM_CONDVARP (c),
c,
SCM_ARG1,
s_wait_condition_variable);
- SCM_ASSERT (SCM_NIMP (m) && SCM_MUTEXP (m),
+ SCM_ASSERT (SCM_MUTEXP (m),
m,
SCM_ARG2,
s_wait_condition_variable);
@@ -506,16 +457,10 @@ scm_wait_condition_variable (c, m)
return SCM_BOOL_T;
}
-#ifdef __STDC__
SCM
scm_signal_condition_variable (SCM c)
-#else
-SCM
-scm_signal_condition_variable (c)
- SCM c;
-#endif
{
- SCM_ASSERT (SCM_NIMP (c) && SCM_CONDVARP (c),
+ SCM_ASSERT (SCM_CONDVARP (c),
c,
SCM_ARG1,
s_signal_condition_variable);
diff --git a/libguile/debug.c b/libguile/debug.c
index dd2c13ff8..8d80b01d4 100644
--- a/libguile/debug.c
+++ b/libguile/debug.c
@@ -166,7 +166,7 @@ GUILE_PROC (scm_memoized_p, "memoized?", 1, 0, 0,
"")
#define FUNC_NAME s_scm_memoized_p
{
- return SCM_BOOL(SCM_NIMP (obj) && SCM_MEMOIZEDP (obj));
+ return SCM_BOOL(SCM_MEMOIZEDP (obj));
}
#undef FUNC_NAME
@@ -256,7 +256,7 @@ GUILE_PROC (scm_make_gloc, "make-gloc", 1, 1, 0,
#define FUNC_NAME s_scm_make_gloc
{
#if 1 /* Unsafe */
- if (SCM_NIMP (var) && SCM_CONSP (var))
+ if (SCM_CONSP (var))
var = scm_cons (SCM_BOOL_F, var);
else
#endif
@@ -308,7 +308,7 @@ GUILE_PROC (scm_memcons, "memcons", 2, 1, 0,
"")
#define FUNC_NAME s_scm_memcons
{
- if (SCM_NIMP (car) && SCM_MEMOIZEDP (car))
+ if (SCM_MEMOIZEDP (car))
{
/*fixme* environments may be two different but equal top-level envs */
if (!SCM_UNBNDP (env) && SCM_MEMOIZED_ENV (car) != env)
@@ -318,7 +318,7 @@ GUILE_PROC (scm_memcons, "memcons", 2, 1, 0,
env = SCM_MEMOIZED_ENV (car);
car = SCM_MEMOIZED_EXP (car);
}
- if (SCM_NIMP (cdr) && SCM_MEMOIZEDP (cdr))
+ if (SCM_MEMOIZEDP (cdr))
{
if (!SCM_UNBNDP (env) && SCM_MEMOIZED_ENV (cdr) != env)
SCM_MISC_ERROR ("environment mismatch arg2 <-> arg3",
@@ -500,11 +500,11 @@ SCM
scm_reverse_lookup (SCM env, SCM data)
{
SCM names, values;
- while (SCM_NIMP (env) && SCM_CONSP (SCM_CAR (env)))
+ while (SCM_CONSP (SCM_CAR (env)))
{
names = SCM_CAAR (env);
values = SCM_CDAR (env);
- while (SCM_NIMP (names) && SCM_CONSP (names))
+ while (SCM_CONSP (names))
{
if (SCM_CAR (values) == data)
return SCM_CAR (names);
@@ -572,7 +572,7 @@ GUILE_PROC (scm_debug_object_p, "debug-object?", 1, 0, 0,
"")
#define FUNC_NAME s_scm_debug_object_p
{
- return SCM_BOOL(SCM_NIMP (obj) && SCM_DEBUGOBJP (obj));
+ return SCM_BOOL(SCM_DEBUGOBJP (obj));
}
#undef FUNC_NAME
diff --git a/libguile/dynl.c b/libguile/dynl.c
index b33a64a7b..2e7f340a1 100644
--- a/libguile/dynl.c
+++ b/libguile/dynl.c
@@ -92,7 +92,7 @@ scm_make_argv_from_stringlist (SCM args,int *argcp,const char *subr,int argn)
char *dst, *src;
SCM str = SCM_CAR (args);
- SCM_ASSERT (SCM_NIMP (str) && SCM_ROSTRINGP (str), str, argn, subr);
+ SCM_ASSERT (SCM_ROSTRINGP (str), str, argn, subr);
len = 1 + SCM_ROLENGTH (str);
dst = (char *) scm_must_malloc ((long)len, subr);
src = SCM_ROCHARS (str);
@@ -122,7 +122,7 @@ scm_must_free_argv(char **argv)
static SCM
scm_coerce_rostring (SCM rostr,const char *subr,int argn)
{
- SCM_ASSERT (SCM_NIMP (rostr) && SCM_ROSTRINGP (rostr), rostr, argn, subr);
+ SCM_ASSERT (SCM_ROSTRINGP (rostr), rostr, argn, subr);
if (SCM_SUBSTRP (rostr))
rostr = scm_makfromstr (SCM_ROCHARS (rostr), SCM_ROLENGTH (rostr), 0);
return rostr;
@@ -332,14 +332,14 @@ as the @var{lib} argument to the following functions.")
fname = scm_coerce_rostring (fname, FUNC_NAME, SCM_ARG1);
/* collect flags */
- while (SCM_NIMP (rest) && SCM_CONSP (rest))
+ while (SCM_CONSP (rest))
{
SCM kw, val;
kw = SCM_CAR (rest);
rest = SCM_CDR (rest);
- if (!(SCM_NIMP (rest) && SCM_CONSP (rest)))
+ if (!SCM_CONSP (rest))
scm_misc_error (FUNC_NAME, "keyword without value", SCM_EOL);
val = SCM_CAR (rest);
@@ -474,7 +474,7 @@ Interrupts are deferred while the C function is executing (with
{
void (*fptr)();
- if (SCM_NIMP (func) && SCM_ROSTRINGP (func))
+ if (SCM_ROSTRINGP (func))
func = scm_dynamic_func (func, dobj);
fptr = (void (*)()) scm_num2ulong (func, (char *)SCM_ARG1, FUNC_NAME);
SCM_DEFER_INTS;
@@ -517,7 +517,7 @@ and returned from the call to @code{dynamic-args-call}.
int result, argc;
char **argv;
- if (SCM_NIMP (func) && SCM_ROSTRINGP (func))
+ if (SCM_ROSTRINGP (func))
func = scm_dynamic_func (func, dobj);
fptr = (int (*)(int, char **)) scm_num2ulong (func, (char *)SCM_ARG1,
diff --git a/libguile/eval.c b/libguile/eval.c
index 563936718..4d6c8c4fc 100644
--- a/libguile/eval.c
+++ b/libguile/eval.c
@@ -694,7 +694,7 @@ scm_m_lambda (SCM xorig, SCM env)
else
goto memlambda;
}
- if (!(SCM_NIMP (SCM_CAR (proc)) && SCM_SYMBOLP (SCM_CAR (proc))))
+ if (!SCM_SYMBOLP (SCM_CAR (proc)))
goto badforms;
proc = SCM_CDR (proc);
}
@@ -725,8 +725,7 @@ scm_m_letstar (SCM xorig, SCM env)
{
arg1 = SCM_CAR (proc);
SCM_ASSYNT (2 == scm_ilength (arg1), xorig, scm_s_bindings, s_letstar);
- SCM_ASSYNT (SCM_NIMP (SCM_CAR (arg1)) && SCM_SYMBOLP (SCM_CAR (arg1)),
- xorig, scm_s_variable, s_letstar);
+ SCM_ASSYNT (SCM_SYMBOLP (SCM_CAR (arg1)), xorig, scm_s_variable, s_letstar);
*varloc = scm_cons2 (SCM_CAR (arg1), SCM_CAR (SCM_CDR (arg1)), SCM_EOL);
varloc = SCM_CDRLOC (SCM_CDR (*varloc));
proc = SCM_CDR (proc);
@@ -769,8 +768,7 @@ scm_m_do (SCM xorig, SCM env)
arg1 = SCM_CAR (proc);
len = scm_ilength (arg1);
SCM_ASSYNT (2 == len || 3 == len, xorig, scm_s_bindings, "do");
- SCM_ASSYNT (SCM_NIMP (SCM_CAR (arg1)) && SCM_SYMBOLP (SCM_CAR (arg1)),
- xorig, scm_s_variable, "do");
+ SCM_ASSYNT (SCM_SYMBOLP (SCM_CAR (arg1)), xorig, scm_s_variable, "do");
/* vars reversed here, inits and steps reversed at evaluation */
vars = scm_cons (SCM_CAR (arg1), vars); /* variable */
arg1 = SCM_CDR (arg1);
@@ -838,8 +836,8 @@ iqq (SCM form,SCM env,int depth)
--depth;
label:
form = SCM_CDR (form);
- SCM_ASSERT (SCM_NIMP (form) && SCM_ECONSP (form) && SCM_NULLP (SCM_CDR (form)),
- form, SCM_ARG1, s_quasiquote);
+ SCM_ASSERT (SCM_ECONSP (form) && SCM_NULLP (SCM_CDR (form)),
+ form, SCM_ARG1, s_quasiquote);
if (0 == depth)
return evalcar (form, env);
return scm_cons2 (tmp, iqq (SCM_CAR (form), env, depth), SCM_EOL);
@@ -878,12 +876,12 @@ scm_m_define (SCM x, SCM env)
SCM_ASSYNT (scm_ilength (x) >= 2, arg1, scm_s_expression, s_define);
proc = SCM_CAR (x);
x = SCM_CDR (x);
- while (SCM_NIMP (proc) && SCM_CONSP (proc))
+ while (SCM_CONSP (proc))
{ /* nested define syntax */
x = scm_cons (scm_cons2 (scm_sym_lambda, SCM_CDR (proc), x), SCM_EOL);
proc = SCM_CAR (proc);
}
- SCM_ASSYNT (SCM_NIMP (proc) && SCM_SYMBOLP (proc),
+ SCM_ASSYNT (SCM_SYMBOLP (proc),
arg1, scm_s_variable, s_define);
SCM_ASSYNT (1 == scm_ilength (x), arg1, scm_s_expression, s_define);
if (SCM_TOP_LEVEL (env))
@@ -944,7 +942,7 @@ scm_m_letrec1 (SCM op, SCM imm, SCM xorig, SCM env)
/* vars scm_list reversed here, inits reversed at evaluation */
arg1 = SCM_CAR (proc);
ASRTSYNTAX (2 == scm_ilength (arg1), scm_s_bindings);
- ASRTSYNTAX (SCM_NIMP (SCM_CAR (arg1)) && SCM_SYMBOLP (SCM_CAR (arg1)),
+ ASRTSYNTAX (SCM_SYMBOLP (SCM_CAR (arg1)),
scm_s_variable);
vars = scm_cons (SCM_CAR (arg1), vars);
*initloc = scm_cons (SCM_CAR (SCM_CDR (arg1)), SCM_EOL);
@@ -988,8 +986,7 @@ scm_m_let (SCM xorig, SCM env)
SCM_ASSYNT (scm_ilength (x) >= 2, xorig, scm_s_body, s_let);
proc = SCM_CAR (x);
if (SCM_NULLP (proc)
- || (SCM_NIMP (proc) && SCM_CONSP (proc)
- && SCM_NIMP (SCM_CAR (proc))
+ || (SCM_CONSP (proc)
&& SCM_CONSP (SCM_CAR (proc)) && SCM_NULLP (SCM_CDR (proc))))
{
/* null or single binding, let* is faster */
@@ -1018,7 +1015,7 @@ scm_m_let (SCM xorig, SCM env)
{ /* vars and inits both in order */
arg1 = SCM_CAR (proc);
SCM_ASSYNT (2 == scm_ilength (arg1), xorig, scm_s_bindings, s_let);
- SCM_ASSYNT (SCM_NIMP (SCM_CAR (arg1)) && SCM_SYMBOLP (SCM_CAR (arg1)),
+ SCM_ASSYNT (SCM_SYMBOLP (SCM_CAR (arg1)),
xorig, scm_s_variable, s_let);
*varloc = scm_cons (SCM_CAR (arg1), SCM_EOL);
varloc = SCM_CDRLOC (*varloc);
@@ -1136,7 +1133,7 @@ scm_m_atfop (SCM xorig, SCM env)
SCM x = SCM_CDR (xorig), vcell;
SCM_ASSYNT (scm_ilength (x) >= 1, xorig, scm_s_expression, "@fop");
vcell = scm_symbol_fref (SCM_CAR (x));
- SCM_ASSYNT (SCM_NIMP (vcell) && SCM_CONSP (vcell), x,
+ SCM_ASSYNT (SCM_CONSP (vcell), x,
"Symbol's function definition is void", NULL);
SCM_SETCAR (x, vcell + 1);
return x;
@@ -2766,7 +2763,7 @@ evapply:
char *chrs = SCM_CHARS (proc) + SCM_LENGTH (proc) - 1;
while ('c' != *--chrs)
{
- SCM_ASSERT (SCM_NIMP (t.arg1) && SCM_CONSP (t.arg1),
+ SCM_ASSERT (SCM_CONSP (t.arg1),
t.arg1, SCM_ARG1, SCM_CHARS (proc));
t.arg1 = ('a' == *chrs) ? SCM_CAR (t.arg1) : SCM_CDR (t.arg1);
}
@@ -3288,7 +3285,7 @@ SCM_APPLY (SCM proc, SCM arg1, SCM args)
}
else
{
- /* SCM_ASRTGO(SCM_NIMP(args) && SCM_CONSP(args), wrongnumargs); */
+ /* SCM_ASRTGO(SCM_CONSP(args), wrongnumargs); */
args = scm_nconc2last (args);
#ifdef DEVAL
debug.vect[0].a.args = scm_cons (arg1, args);
@@ -3359,7 +3356,7 @@ tail:
char *chrs = SCM_CHARS (proc) + SCM_LENGTH (proc) - 1;
while ('c' != *--chrs)
{
- SCM_ASSERT (SCM_NIMP (arg1) && SCM_CONSP (arg1),
+ SCM_ASSERT (SCM_CONSP (arg1),
arg1, SCM_ARG1, SCM_CHARS (proc));
arg1 = ('a' == *chrs) ? SCM_CAR (arg1) : SCM_CDR (arg1);
}
@@ -3374,7 +3371,7 @@ tail:
RETURN (SCM_SUBRF (proc) (SCM_UNBNDP (arg1) ? SCM_EOL : scm_cons (arg1, args)))
#endif
case scm_tc7_lsubr_2:
- SCM_ASRTGO (SCM_NIMP (args) && SCM_CONSP (args), wrongnumargs);
+ SCM_ASRTGO (SCM_CONSP (args), wrongnumargs);
RETURN (SCM_SUBRF (proc) (arg1, SCM_CAR (args), SCM_CDR (args)))
case scm_tc7_asubr:
if (SCM_NULLP (args))
diff --git a/libguile/evalext.c b/libguile/evalext.c
index fa9d26c26..bf8000a61 100644
--- a/libguile/evalext.c
+++ b/libguile/evalext.c
@@ -59,9 +59,9 @@ scm_m_generalized_set_x (SCM xorig, SCM env)
{
SCM x = SCM_CDR (xorig);
SCM_ASSYNT (2 == scm_ilength (x), xorig, scm_s_expression, scm_s_set_x);
- if (SCM_NIMP (SCM_CAR (x)) && SCM_SYMBOLP (SCM_CAR (x)))
+ if (SCM_SYMBOLP (SCM_CAR (x)))
return scm_cons (SCM_IM_SET_X, x);
- else if (SCM_NIMP (SCM_CAR (x)) && SCM_CONSP (SCM_CAR (x)))
+ else if (SCM_CONSP (SCM_CAR (x)))
return scm_cons (SCM_LIST2 (scm_sym_setter, SCM_CAAR (x)),
scm_append (SCM_LIST2 (SCM_CDAR (x), SCM_CDR (x))));
return scm_wta (xorig, scm_s_variable, scm_s_set_x);
@@ -90,7 +90,7 @@ GUILE_PROC (scm_definedp, "defined?", 1, 1, 0,
b = SCM_CAR (frames);
if (SCM_NFALSEP (scm_procedure_p (b)))
break;
- SCM_ASSERT (SCM_NIMP (b) && SCM_CONSP (b),
+ SCM_ASSERT (SCM_CONSP (b),
env, SCM_ARG2, FUNC_NAME);
for (b = SCM_CAR (b); SCM_NIMP (b); b = SCM_CDR (b))
{
@@ -125,10 +125,10 @@ scm_m_undefine (SCM x, SCM env)
SCM arg1 = x;
x = SCM_CDR (x);
SCM_ASSYNT (SCM_TOP_LEVEL (env), arg1, "bad placement ", s_undefine);
- SCM_ASSYNT (SCM_NIMP (x) && SCM_CONSP (x) && SCM_CDR (x) == SCM_EOL,
+ SCM_ASSYNT (SCM_CONSP (x) && SCM_CDR (x) == SCM_EOL,
arg1, scm_s_expression, s_undefine);
x = SCM_CAR (x);
- SCM_ASSYNT (SCM_NIMP (x) && SCM_SYMBOLP (x), arg1, scm_s_variable, s_undefine);
+ SCM_ASSYNT (SCM_SYMBOLP (x), arg1, scm_s_variable, s_undefine);
arg1 = scm_sym2vcell (x, scm_env_top_level (env), SCM_BOOL_F);
SCM_ASSYNT (SCM_NFALSEP (arg1) && !SCM_UNBNDP (SCM_CDR (arg1)),
x, "variable already unbound ", s_undefine);
diff --git a/libguile/feature.c b/libguile/feature.c
index efff9d789..f8bc1f834 100644
--- a/libguile/feature.c
+++ b/libguile/feature.c
@@ -114,7 +114,7 @@ static SCM
make_hook (SCM name, SCM n_args, const char *subr)
{
int n;
- SCM_ASSERT (SCM_FALSEP (name) || (SCM_NIMP (name) && SCM_SYMBOLP (name)),
+ SCM_ASSERT (SCM_FALSEP (name) || (SCM_SYMBOLP (name)),
name,
SCM_ARG1,
subr);
@@ -204,7 +204,7 @@ GUILE_PROC (scm_hook_p, "hook?", 1, 0, 0,
"")
#define FUNC_NAME s_scm_hook_p
{
- return SCM_BOOL(SCM_NIMP (x) && SCM_HOOKP (x));
+ return SCM_BOOL(SCM_HOOKP (x));
}
#undef FUNC_NAME
diff --git a/libguile/filesys.c b/libguile/filesys.c
index c2dabd921..c7e8732b0 100644
--- a/libguile/filesys.c
+++ b/libguile/filesys.c
@@ -145,7 +145,7 @@ as @code{-1}, then that ID is not changed.")
SCM_VALIDATE_INT(2,owner);
SCM_VALIDATE_INT(3,group);
- if (SCM_INUMP (object) || (SCM_NIMP (object) && SCM_OPFPORTP (object)))
+ if (SCM_INUMP (object) || (SCM_OPFPORTP (object)))
{
if (SCM_INUMP (object))
fdes = SCM_INUM (object);
@@ -155,7 +155,7 @@ as @code{-1}, then that ID is not changed.")
}
else
{
- SCM_ASSERT (SCM_NIMP (object) && SCM_ROSTRINGP (object),
+ SCM_ASSERT (SCM_ROSTRINGP (object),
object, SCM_ARG1, FUNC_NAME);
SCM_COERCE_SUBSTR (object);
SCM_SYSCALL (rv = chown (SCM_ROCHARS (object),
@@ -185,7 +185,7 @@ The return value is unspecified.")
object = SCM_COERCE_OUTPORT (object);
SCM_VALIDATE_INT(2,mode);
- if (SCM_INUMP (object) || (SCM_NIMP (object) && SCM_OPFPORTP (object)))
+ if (SCM_INUMP (object) || SCM_OPFPORTP (object))
{
if (SCM_INUMP (object))
fdes = SCM_INUM (object);
@@ -326,7 +326,7 @@ their revealed counts set to zero.")
fd_or_port = SCM_COERCE_OUTPORT (fd_or_port);
- if (SCM_NIMP (fd_or_port) && SCM_PORTP (fd_or_port))
+ if (SCM_PORTP (fd_or_port))
return scm_close_port (fd_or_port);
SCM_VALIDATE_INT(1,fd_or_port);
fd = SCM_INUM (fd_or_port);
@@ -685,7 +685,7 @@ GUILE_PROC (scm_directory_stream_p, "directory-stream?", 1, 0, 0,
as returned by @code{opendir}.")
#define FUNC_NAME s_scm_directory_stream_p
{
- return SCM_BOOL(SCM_NIMP (obj) && SCM_DIRP (obj));
+ return SCM_BOOL(SCM_DIRP (obj));
}
#undef FUNC_NAME
@@ -848,7 +848,7 @@ set_element (SELECT_TYPE *set, SCM element, int arg)
{
int fd;
element = SCM_COERCE_OUTPORT (element);
- if (SCM_NIMP (element) && SCM_OPFPORTP (element))
+ if (SCM_OPFPORTP (element))
fd = SCM_FPORT_FDES (element);
else {
SCM_ASSERT (SCM_INUMP (element), element, arg, "select");
@@ -862,7 +862,7 @@ static int
fill_select_type (SELECT_TYPE *set, SCM list, int arg)
{
int max_fd = 0, fd;
- if (SCM_NIMP (list) && SCM_VECTORP (list))
+ if (SCM_VECTORP (list))
{
int len = SCM_LENGTH (list);
SCM *ve = SCM_VELTS (list);
@@ -893,7 +893,7 @@ static SCM
get_element (SELECT_TYPE *set, SCM element, SCM list)
{
element = SCM_COERCE_OUTPORT (element);
- if (SCM_NIMP (element) && SCM_OPFPORTP (element))
+ if (SCM_OPFPORTP (element))
{
if (FD_ISSET (SCM_FPORT_FDES (element), set))
list = scm_cons (element, list);
@@ -911,7 +911,7 @@ retrieve_select_type (SELECT_TYPE *set, SCM list)
{
SCM answer_list = SCM_EOL;
- if (SCM_NIMP (list) && SCM_VECTORP (list))
+ if (SCM_VECTORP (list))
{
int len = SCM_LENGTH (list);
SCM *ve = SCM_VELTS (list);
@@ -973,7 +973,7 @@ values instead of a list and has an additional select! interface.
int sreturn;
#define assert_set(x, arg) \
- SCM_ASSERT (scm_ilength (x) >= 0 || (SCM_NIMP (x) && SCM_VECTORP (x)), \
+ SCM_ASSERT (scm_ilength (x) >= 0 || (SCM_VECTORP (x)), \
x, arg, FUNC_NAME)
assert_set (reads, SCM_ARG1);
assert_set (writes, SCM_ARG2);
@@ -1080,7 +1080,7 @@ The value used to indicate the "close on exec" flag with @code{F_GETFL} or
object = SCM_COERCE_OUTPORT (object);
SCM_VALIDATE_INT(2,cmd);
- if (SCM_NIMP (object) && SCM_OPFPORTP (object))
+ if (SCM_OPFPORTP (object))
fdes = SCM_FPORT_FDES (object);
else
{
@@ -1113,7 +1113,7 @@ The return value is unspecified.")
object = SCM_COERCE_OUTPORT (object);
- if (SCM_NIMP (object) && SCM_OPFPORTP (object))
+ if (SCM_OPFPORTP (object))
{
scm_flush (object);
fdes = SCM_FPORT_FDES (object);
@@ -1307,7 +1307,7 @@ GUILE_PROC (scm_basename, "basename", 1, 1, 0,
int i, j, len, end;
SCM_VALIDATE_ROSTRING(1,filename);
SCM_ASSERT (SCM_UNBNDP (suffix)
- || (SCM_NIMP (suffix) && SCM_ROSTRINGP (suffix)),
+ || (SCM_ROSTRINGP (suffix)),
suffix,
SCM_ARG2,
FUNC_NAME);
diff --git a/libguile/fluids.c b/libguile/fluids.c
index 9df4d4ab5..9f040d37a 100644
--- a/libguile/fluids.c
+++ b/libguile/fluids.c
@@ -136,7 +136,7 @@ GUILE_PROC (scm_fluid_p, "fluid?", 1, 0, 0,
"")
#define FUNC_NAME s_scm_fluid_p
{
- return SCM_BOOL(SCM_NIMP (fl) && SCM_FLUIDP (fl));
+ return SCM_BOOL(SCM_FLUIDP (fl));
}
#undef FUNC_NAME
diff --git a/libguile/fports.c b/libguile/fports.c
index 73b463286..a085e9cba 100644
--- a/libguile/fports.c
+++ b/libguile/fports.c
@@ -451,7 +451,7 @@ prinfport (SCM exp,SCM port,scm_print_state *pstate)
{
int fdes;
SCM name = SCM_PTAB_ENTRY (exp)->file_name;
- scm_puts (SCM_NIMP (name) && SCM_ROSTRINGP (name)
+ scm_puts (SCM_ROSTRINGP (name)
? SCM_ROCHARS (name)
: SCM_PTOBNAME (SCM_PTOBNUM (exp)),
port);
diff --git a/libguile/gc.c b/libguile/gc.c
index bcec7f7d3..1f813f7c1 100644
--- a/libguile/gc.c
+++ b/libguile/gc.c
@@ -1379,7 +1379,7 @@ scm_gc_sweep ()
ptr = SCM_VELTS (w);
n = SCM_LENGTH (w);
for (j = 0; j < n; ++j)
- if (SCM_NIMP (ptr[j]) && SCM_FREEP (ptr[j]))
+ if (SCM_FREEP (ptr[j]))
ptr[j] = SCM_BOOL_F;
}
else /* if (SCM_IS_WHVEC_ANY (scm_weak_vectors[i])) */
@@ -1413,8 +1413,8 @@ scm_gc_sweep ()
key = SCM_CAAR (alist);
value = SCM_CDAR (alist);
- if ( (weak_keys && SCM_NIMP (key) && SCM_FREEP (key))
- || (weak_values && SCM_NIMP (value) && SCM_FREEP (value)))
+ if ( (weak_keys && SCM_FREEP (key))
+ || (weak_values && SCM_FREEP (value)))
{
*fixup = SCM_CDR (alist);
}
@@ -1859,7 +1859,7 @@ scm_unprotect_object (SCM obj)
{
SCM *tail_ptr = &scm_protects;
- while (SCM_NIMP (*tail_ptr) && SCM_CONSP (*tail_ptr))
+ while (SCM_CONSP (*tail_ptr))
if (SCM_CAR (*tail_ptr) == obj)
{
*tail_ptr = SCM_CDR (*tail_ptr);
diff --git a/libguile/gh_data.c b/libguile/gh_data.c
index b485282ce..ffa5b288d 100644
--- a/libguile/gh_data.c
+++ b/libguile/gh_data.c
@@ -104,7 +104,7 @@ gh_set_substr (char *src, SCM dst, int start, int len)
unsigned long dst_len;
unsigned long effective_length;
- SCM_ASSERT (SCM_NIMP (dst) && SCM_STRINGP (dst), dst, SCM_ARG3,
+ SCM_ASSERT (SCM_STRINGP (dst), dst, SCM_ARG3,
"gh_set_substr");
dst_ptr = SCM_CHARS (dst);
@@ -366,7 +366,7 @@ gh_scm2longs (SCM obj, long *m)
for (i = 0; i < n; ++i)
{
val = SCM_VELTS (obj)[i];
- if (!SCM_INUMP (val) && !(SCM_NIMP (val) && SCM_BIGP (val)))
+ if (!SCM_INUMP (val) && !SCM_BIGP (val))
scm_wrong_type_arg (0, 0, obj);
}
if (m == 0)
@@ -410,7 +410,7 @@ gh_scm2floats (SCM obj, float *m)
{
val = SCM_VELTS (obj)[i];
if (!SCM_INUMP (val)
- && !(SCM_NIMP (val) && (SCM_BIGP (val) || SCM_REALP (val))))
+ && !(SCM_BIGP (val) || SCM_REALP (val)))
scm_wrong_type_arg (0, 0, val);
}
if (m == 0)
@@ -469,7 +469,7 @@ gh_scm2doubles (SCM obj, double *m)
{
val = SCM_VELTS (obj)[i];
if (!SCM_INUMP (val)
- && !(SCM_NIMP (val) && (SCM_BIGP (val) || SCM_REALP (val))))
+ && !(SCM_BIGP (val) || SCM_REALP (val)))
scm_wrong_type_arg (0, 0, val);
}
if (m == 0)
@@ -530,7 +530,7 @@ gh_scm2newstr (SCM str, int *lenp)
char *ret_str;
int len;
- SCM_ASSERT (SCM_NIMP (str) && SCM_ROSTRINGP (str), str, SCM_ARG3,
+ SCM_ASSERT (SCM_ROSTRINGP (str), str, SCM_ARG3,
"gh_scm2newstr");
/* protect str from GC while we copy off its data */
@@ -567,7 +567,7 @@ void
gh_get_substr (SCM src, char *dst, int start, int len)
{
int src_len, effective_length;
- SCM_ASSERT (SCM_NIMP (src) && SCM_ROSTRINGP (src), src, SCM_ARG3,
+ SCM_ASSERT (SCM_ROSTRINGP (src), src, SCM_ARG3,
"gh_get_substr");
scm_protect_object (src);
@@ -592,7 +592,7 @@ gh_symbol2newstr (SCM sym, int *lenp)
char *ret_str;
int len;
- SCM_ASSERT (SCM_NIMP (sym) && SCM_SYMBOLP (sym), sym, SCM_ARG3,
+ SCM_ASSERT (SCM_SYMBOLP (sym), sym, SCM_ARG3,
"gh_scm2newsymbol");
/* protect str from GC while we copy off its data */
diff --git a/libguile/hash.c b/libguile/hash.c
index 3a6665a77..3ce8ef710 100644
--- a/libguile/hash.c
+++ b/libguile/hash.c
@@ -169,7 +169,7 @@ scm_ihashv (SCM obj, unsigned int n)
if (SCM_ICHRP(obj))
return ((unsigned int)(scm_downcase(SCM_ICHR(obj)))) % n; /* downcase!?!! */
- if (SCM_NIMP(obj) && SCM_NUMP(obj))
+ if (SCM_NUMP(obj))
return (unsigned int) scm_hasher(obj, n, 10);
else
return ((unsigned int)obj) % n;
diff --git a/libguile/hashtab.c b/libguile/hashtab.c
index 7908b067e..8f7d17472 100644
--- a/libguile/hashtab.c
+++ b/libguile/hashtab.c
@@ -61,7 +61,7 @@ scm_hash_fn_get_handle (SCM table,SCM obj,unsigned int (*hash_fn)(),SCM (*assoc_
unsigned int k;
SCM h;
- SCM_ASSERT (SCM_NIMP (table) && SCM_VECTORP (table), table, SCM_ARG1, "hash_fn_get_handle");
+ SCM_ASSERT (SCM_VECTORP (table), table, SCM_ARG1, "hash_fn_get_handle");
if (SCM_LENGTH (table) == 0)
return SCM_EOL;
k = hash_fn (obj, SCM_LENGTH (table), closure);
@@ -82,7 +82,7 @@ scm_hash_fn_create_handle_x (SCM table,SCM obj,SCM init,unsigned int (*hash_fn)(
unsigned int k;
SCM it;
- SCM_ASSERT (SCM_NIMP (table) && SCM_VECTORP (table), table, SCM_ARG1, "hash_fn_create_handle_x");
+ SCM_ASSERT (SCM_VECTORP (table), table, SCM_ARG1, "hash_fn_create_handle_x");
if (SCM_LENGTH (table) == 0)
return SCM_EOL;
k = hash_fn (obj, SCM_LENGTH (table), closure);
@@ -148,7 +148,7 @@ scm_hash_fn_remove_x (SCM table,SCM obj,unsigned int (*hash_fn)(),SCM (*assoc_fn
unsigned int k;
SCM h;
- SCM_ASSERT (SCM_NIMP (table) && SCM_VECTORP (table), table, SCM_ARG1, "hash_fn_remove_x");
+ SCM_ASSERT (SCM_VECTORP (table), table, SCM_ARG1, "hash_fn_remove_x");
if (SCM_LENGTH (table) == 0)
return SCM_EOL;
k = hash_fn (obj, SCM_LENGTH (table), closure);
@@ -510,10 +510,10 @@ scm_internal_hash_fold (SCM (*fn) (), void *closure, SCM init, SCM table)
SCM ls = SCM_VELTS (table)[i], handle;
while (SCM_NNULLP (ls))
{
- SCM_ASSERT (SCM_NIMP (ls) && SCM_CONSP (ls),
+ SCM_ASSERT (SCM_CONSP (ls),
table, SCM_ARG1, s_scm_hash_fold);
handle = SCM_CAR (ls);
- SCM_ASSERT (SCM_NIMP (handle) && SCM_CONSP (handle),
+ SCM_ASSERT (SCM_CONSP (handle),
table, SCM_ARG1, s_scm_hash_fold);
result = fn (closure, SCM_CAR (handle), SCM_CDR (handle), result);
ls = SCM_CDR (ls);
diff --git a/libguile/ioext.c b/libguile/ioext.c
index 1ac7eed7c..14e06a80e 100644
--- a/libguile/ioext.c
+++ b/libguile/ioext.c
@@ -437,7 +437,7 @@ non-file device, otherwise @code{#f}.")
port = SCM_COERCE_OUTPORT (port);
- if (!(SCM_NIMP (port) && SCM_OPFPORTP (port)))
+ if (!SCM_OPFPORTP (port))
return SCM_BOOL_F;
rv = isatty (SCM_FPORT_FDES (port));
diff --git a/libguile/keywords.c b/libguile/keywords.c
index c389bde13..bd4a0247f 100644
--- a/libguile/keywords.c
+++ b/libguile/keywords.c
@@ -113,7 +113,7 @@ GUILE_PROC(scm_keyword_p, "keyword?", 1, 0, 0,
it returns @code{#f} otherwise.")
#define FUNC_NAME s_scm_keyword_p
{
- return SCM_BOOL(SCM_NIMP(obj) && SCM_KEYWORDP (obj));
+ return SCM_BOOL(SCM_KEYWORDP (obj));
}
#undef FUNC_NAME
diff --git a/libguile/list.c b/libguile/list.c
index 038311b94..556dbf7ab 100644
--- a/libguile/list.c
+++ b/libguile/list.c
@@ -341,11 +341,11 @@ GUILE_PROC(scm_list_ref, "list-ref", 2, 0, 0,
register long i;
SCM_VALIDATE_INT_MIN_COPY(2,k,0,i);
while (i-- > 0) {
- SCM_ASRTGO(SCM_NIMP(lst) && SCM_CONSP(lst), erout);
+ SCM_ASRTGO(SCM_CONSP(lst), erout);
lst = SCM_CDR(lst);
}
erout:
- SCM_ASSERT(SCM_NIMP(lst) && SCM_CONSP(lst),
+ SCM_ASSERT(SCM_CONSP(lst),
SCM_NULLP(lst)?k:lst, SCM_NULLP(lst)?SCM_OUTOFRANGE:SCM_ARG1, FUNC_NAME);
return SCM_CAR(lst);
}
@@ -359,11 +359,11 @@ GUILE_PROC(scm_list_set_x, "list-set!", 3, 0, 0,
register long i;
SCM_VALIDATE_INT_MIN_COPY(2,k,0,i);
while (i-- > 0) {
- SCM_ASRTGO(SCM_NIMP(lst) && SCM_CONSP(lst), erout);
+ SCM_ASRTGO(SCM_CONSP(lst), erout);
lst = SCM_CDR(lst);
}
erout:
- SCM_ASSERT(SCM_NIMP(lst) && SCM_CONSP(lst),
+ SCM_ASSERT(SCM_CONSP(lst),
SCM_NULLP(lst)?k:lst, SCM_NULLP(lst)?SCM_OUTOFRANGE:SCM_ARG1, FUNC_NAME);
SCM_SETCAR (lst, val);
return val;
@@ -402,11 +402,11 @@ GUILE_PROC(scm_list_cdr_set_x, "list-cdr-set!", 3, 0, 0,
register long i;
SCM_VALIDATE_INT_MIN_COPY(2,k,0,i);
while (i-- > 0) {
- SCM_ASRTGO(SCM_NIMP(lst) && SCM_CONSP(lst), erout);
+ SCM_ASRTGO(SCM_CONSP(lst), erout);
lst = SCM_CDR(lst);
}
erout:
- SCM_ASSERT(SCM_NIMP(lst) && SCM_CONSP(lst),
+ SCM_ASSERT(SCM_CONSP(lst),
SCM_NULLP(lst)?k:lst, SCM_NULLP(lst)?SCM_OUTOFRANGE:SCM_ARG1, FUNC_NAME);
SCM_SETCDR (lst, val);
return val;
@@ -455,7 +455,7 @@ GUILE_PROC (scm_list_copy, "list-copy", 1, 0, 0,
fill_here = &newlst;
from_here = lst;
- while (SCM_NIMP (from_here) && SCM_CONSP (from_here))
+ while (SCM_CONSP (from_here))
{
SCM c;
c = scm_cons (SCM_CAR (from_here), SCM_CDR (from_here));
@@ -480,7 +480,7 @@ not perform any type or error checking. Their use is recommended only
in writing Guile internals, not for high-level Scheme programs.")
#define FUNC_NAME s_scm_sloppy_memq
{
- for(; SCM_NIMP(lst) && SCM_CONSP (lst); lst = SCM_CDR(lst))
+ for(; SCM_CONSP (lst); lst = SCM_CDR(lst))
{
if (SCM_CAR(lst)==x)
return lst;
@@ -495,7 +495,7 @@ GUILE_PROC (scm_sloppy_memv, "sloppy-memv", 2, 0, 0,
"")
#define FUNC_NAME s_scm_sloppy_memv
{
- for(; SCM_NIMP(lst) && SCM_CONSP (lst); lst = SCM_CDR(lst))
+ for(; SCM_CONSP (lst); lst = SCM_CDR(lst))
{
if (SCM_BOOL_F != scm_eqv_p (SCM_CAR(lst), x))
return lst;
@@ -510,7 +510,7 @@ GUILE_PROC (scm_sloppy_member, "sloppy-member", 2, 0, 0,
"")
#define FUNC_NAME s_scm_sloppy_member
{
- for(; SCM_NIMP(lst) && SCM_CONSP (lst); lst = SCM_CDR(lst))
+ for(; SCM_CONSP (lst); lst = SCM_CDR(lst))
{
if (SCM_BOOL_F != scm_equal_p (SCM_CAR(lst), x))
return lst;
@@ -580,7 +580,7 @@ destructive list functions, these functions cannot modify the binding of
SCM *prev;
for (prev = &lst, walk = lst;
- SCM_NIMP (walk) && SCM_CONSP (walk);
+ SCM_CONSP (walk);
walk = SCM_CDR (walk))
{
if (SCM_CAR (walk) == item)
@@ -603,7 +603,7 @@ GUILE_PROC(scm_delv_x, "delv!", 2, 0, 0,
SCM *prev;
for (prev = &lst, walk = lst;
- SCM_NIMP (walk) && SCM_CONSP (walk);
+ SCM_CONSP (walk);
walk = SCM_CDR (walk))
{
if (SCM_BOOL_F != scm_eqv_p (SCM_CAR (walk), item))
@@ -627,7 +627,7 @@ GUILE_PROC(scm_delete_x, "delete!", 2, 0, 0,
SCM *prev;
for (prev = &lst, walk = lst;
- SCM_NIMP (walk) && SCM_CONSP (walk);
+ SCM_CONSP (walk);
walk = SCM_CDR (walk))
{
if (SCM_BOOL_F != scm_equal_p (SCM_CAR (walk), item))
@@ -689,7 +689,7 @@ GUILE_PROC(scm_delq1_x, "delq1!", 2, 0, 0,
SCM *prev;
for (prev = &lst, walk = lst;
- SCM_NIMP (walk) && SCM_CONSP (walk);
+ SCM_CONSP (walk);
walk = SCM_CDR (walk))
{
if (SCM_CAR (walk) == item)
@@ -715,7 +715,7 @@ GUILE_PROC(scm_delv1_x, "delv1!", 2, 0, 0,
SCM *prev;
for (prev = &lst, walk = lst;
- SCM_NIMP (walk) && SCM_CONSP (walk);
+ SCM_CONSP (walk);
walk = SCM_CDR (walk))
{
if (SCM_BOOL_F != scm_eqv_p (SCM_CAR (walk), item))
@@ -741,7 +741,7 @@ GUILE_PROC(scm_delete1_x, "delete1!", 2, 0, 0,
SCM *prev;
for (prev = &lst, walk = lst;
- SCM_NIMP (walk) && SCM_CONSP (walk);
+ SCM_CONSP (walk);
walk = SCM_CDR (walk))
{
if (SCM_BOOL_F != scm_equal_p (SCM_CAR (walk), item))
diff --git a/libguile/load.c b/libguile/load.c
index 47ddcb333..689cbe8c9 100644
--- a/libguile/load.c
+++ b/libguile/load.c
@@ -216,7 +216,7 @@ GUILE_PROC (scm_parse_path, "parse-path", 1, 1, 0,
"")
#define FUNC_NAME s_scm_parse_path
{
- SCM_ASSERT (SCM_FALSEP (path) || (SCM_NIMP (path) && SCM_ROSTRINGP (path)),
+ SCM_ASSERT (SCM_FALSEP (path) || (SCM_ROSTRINGP (path)),
path,
SCM_ARG1, FUNC_NAME);
if (SCM_UNBNDP (tail))
@@ -288,7 +288,7 @@ GUILE_PROC(scm_search_path, "search-path", 2, 1, 0,
for (walk = path; SCM_NIMP (walk); walk = SCM_CDR (walk))
{
SCM elt = SCM_CAR (walk);
- SCM_ASSERT (SCM_NIMP (elt) && SCM_ROSTRINGP (elt), elt,
+ SCM_ASSERT (SCM_ROSTRINGP (elt), elt,
"path is not a list of strings",
FUNC_NAME);
if (SCM_ROLENGTH (elt) > max_path_len)
@@ -327,7 +327,7 @@ GUILE_PROC(scm_search_path, "search-path", 2, 1, 0,
for (walk = extensions; SCM_NIMP (walk); walk = SCM_CDR (walk))
{
SCM elt = SCM_CAR (walk);
- SCM_ASSERT (SCM_NIMP (elt) && SCM_ROSTRINGP (elt), elt,
+ SCM_ASSERT (SCM_ROSTRINGP (elt), elt,
"extension list is not a list of strings",
FUNC_NAME);
if (SCM_ROLENGTH (elt) > max_ext_len)
diff --git a/libguile/mit-pthreads.c b/libguile/mit-pthreads.c
index 7fb787a2e..a365561e5 100644
--- a/libguile/mit-pthreads.c
+++ b/libguile/mit-pthreads.c
@@ -419,7 +419,7 @@ scm_lock_mutex (m)
SCM m;
#endif
{
- SCM_ASSERT (SCM_NIMP (m) && SCM_MUTEXP (m), m, SCM_ARG1, s_lock_mutex);
+ SCM_ASSERT (SCM_MUTEXP (m), m, SCM_ARG1, s_lock_mutex);
pthread_mutex_lock (SCM_MUTEX_DATA (m));
return SCM_BOOL_T;
}
@@ -433,7 +433,7 @@ scm_unlock_mutex (m)
SCM m;
#endif
{
- SCM_ASSERT (SCM_NIMP (m) && SCM_MUTEXP (m), m, SCM_ARG1, s_unlock_mutex);
+ SCM_ASSERT (SCM_MUTEXP (m), m, SCM_ARG1, s_unlock_mutex);
pthread_mutex_unlock (SCM_MUTEX_DATA (m));
return SCM_BOOL_T;
}
@@ -463,11 +463,11 @@ scm_wait_condition_variable (c, m)
SCM m;
#endif
{
- SCM_ASSERT (SCM_NIMP (c) && SCM_CONDVARP (c),
+ SCM_ASSERT (SCM_CONDVARP (c),
c,
SCM_ARG1,
s_wait_condition_variable);
- SCM_ASSERT (SCM_NIMP (m) && SCM_MUTEXP (m),
+ SCM_ASSERT (SCM_MUTEXP (m),
m,
SCM_ARG2,
s_wait_condition_variable);
@@ -484,7 +484,7 @@ scm_signal_condition_variable (c)
SCM c;
#endif
{
- SCM_ASSERT (SCM_NIMP (c) && SCM_CONDVARP (c),
+ SCM_ASSERT (SCM_CONDVARP (c),
c,
SCM_ARG1,
s_signal_condition_variable);
diff --git a/libguile/net_db.c b/libguile/net_db.c
index 86b883c5f..1815e0e61 100644
--- a/libguile/net_db.c
+++ b/libguile/net_db.c
@@ -274,7 +274,7 @@ Unusual conditions may result in errors thrown to the
return SCM_BOOL_F;
}
}
- else if (SCM_NIMP (name) && SCM_ROSTRINGP (name))
+ else if (SCM_ROSTRINGP (name))
{
SCM_COERCE_SUBSTR (name);
entry = gethostbyname (SCM_ROCHARS (name));
@@ -348,7 +348,7 @@ given.")
return SCM_BOOL_F;
}
}
- else if (SCM_NIMP (name) && SCM_ROSTRINGP (name))
+ else if (SCM_ROSTRINGP (name))
{
SCM_COERCE_SUBSTR (name);
entry = getnetbyname (SCM_ROCHARS (name));
@@ -400,7 +400,7 @@ argument. @code{getproto} will accept either type, behaving like
return SCM_BOOL_F;
}
}
- else if (SCM_NIMP (name) && SCM_ROSTRINGP (name))
+ else if (SCM_ROSTRINGP (name))
{
SCM_COERCE_SUBSTR (name);
entry = getprotobyname (SCM_ROCHARS (name));
@@ -468,7 +468,7 @@ as its first argument; if given no arguments, it behaves like
}
SCM_VALIDATE_ROSTRING(2,proto);
SCM_COERCE_SUBSTR (proto);
- if (SCM_NIMP (name) && SCM_ROSTRINGP (name))
+ if (SCM_ROSTRINGP (name))
{
SCM_COERCE_SUBSTR (name);
entry = getservbyname (SCM_ROCHARS (name), SCM_ROCHARS (proto));
diff --git a/libguile/numbers.c b/libguile/numbers.c
index 4a5acb31c..46a205cbc 100644
--- a/libguile/numbers.c
+++ b/libguile/numbers.c
@@ -103,7 +103,7 @@ GUILE_PROC (scm_exact_p, "exact?", 1, 0, 0,
if (SCM_INUMP (x))
return SCM_BOOL_T;
#ifdef SCM_BIGDIG
- if (SCM_NIMP (x) && SCM_BIGP (x))
+ if (SCM_BIGP (x))
return SCM_BOOL_T;
#endif
return SCM_BOOL_F;
@@ -154,7 +154,7 @@ scm_abs (SCM x)
#ifdef SCM_BIGDIG
if (SCM_NINUMP (x))
{
- SCM_GASSERT1 (SCM_NIMP (x) && SCM_BIGP (x), g_abs, x, SCM_ARG1, s_abs);
+ SCM_GASSERT1 (SCM_BIGP (x), g_abs, x, SCM_ARG1, s_abs);
if (SCM_TYP16 (x) == scm_tc16_bigpos)
return x;
return scm_copybig (x, 0);
@@ -184,11 +184,11 @@ scm_quotient (SCM x, SCM y)
if (SCM_NINUMP (x))
{
long w;
- SCM_GASSERT2 (SCM_NIMP (x) && SCM_BIGP (x),
+ SCM_GASSERT2 (SCM_BIGP (x),
g_quotient, x, y, SCM_ARG1, s_quotient);
if (SCM_NINUMP (y))
{
- SCM_ASRTGO (SCM_NIMP (y) && SCM_BIGP (y), bady);
+ SCM_ASRTGO (SCM_BIGP (y), bady);
return scm_divbigbig (SCM_BDIGITS (x), SCM_NUMDIGS (x),
SCM_BDIGITS (y), SCM_NUMDIGS (y),
SCM_BIGSIGN (x) ^ SCM_BIGSIGN (y), 2);
@@ -222,7 +222,7 @@ scm_quotient (SCM x, SCM y)
}
if (SCM_NINUMP (y))
{
- if (!(SCM_NIMP (y) && SCM_BIGP (y)))
+ if (!SCM_BIGP (y))
{
bady:
SCM_WTA_DISPATCH_2 (g_quotient, x, y, SCM_ARG2, s_quotient);
@@ -273,11 +273,11 @@ scm_remainder (SCM x, SCM y)
#ifdef SCM_BIGDIG
if (SCM_NINUMP (x))
{
- SCM_GASSERT2 (SCM_NIMP (x) && SCM_BIGP (x),
+ SCM_GASSERT2 (SCM_BIGP (x),
g_remainder, x, y, SCM_ARG1, s_remainder);
if (SCM_NINUMP (y))
{
- SCM_ASRTGO (SCM_NIMP (y) && SCM_BIGP (y), bady);
+ SCM_ASRTGO (SCM_BIGP (y), bady);
return scm_divbigbig (SCM_BDIGITS (x), SCM_NUMDIGS (x),
SCM_BDIGITS (y), SCM_NUMDIGS (y),
SCM_BIGSIGN (x), 0);
@@ -288,7 +288,7 @@ scm_remainder (SCM x, SCM y)
}
if (SCM_NINUMP (y))
{
- if (!(SCM_NIMP (y) && SCM_BIGP (y)))
+ if (!SCM_BIGP (y))
{
bady:
SCM_WTA_DISPATCH_2 (g_remainder, x, y, SCM_ARG2, s_remainder);
@@ -330,11 +330,11 @@ scm_modulo (SCM x, SCM y)
#ifdef SCM_BIGDIG
if (SCM_NINUMP (x))
{
- SCM_GASSERT2 (SCM_NIMP (x) && SCM_BIGP (x),
+ SCM_GASSERT2 (SCM_BIGP (x),
g_modulo, x, y, SCM_ARG1, s_modulo);
if (SCM_NINUMP (y))
{
- SCM_ASRTGO (SCM_NIMP (y) && SCM_BIGP (y), bady);
+ SCM_ASRTGO (SCM_BIGP (y), bady);
return scm_divbigbig (SCM_BDIGITS (x), SCM_NUMDIGS (x),
SCM_BDIGITS (y), SCM_NUMDIGS (y),
SCM_BIGSIGN (y),
@@ -347,7 +347,7 @@ scm_modulo (SCM x, SCM y)
}
if (SCM_NINUMP (y))
{
- if (!(SCM_NIMP (y) && SCM_BIGP (y)))
+ if (!SCM_BIGP (y))
{
bady:
SCM_WTA_DISPATCH_2 (g_modulo, x, y, SCM_ARG2, s_modulo);
@@ -385,14 +385,14 @@ scm_gcd (SCM x, SCM y)
if (SCM_NINUMP (x))
{
big_gcd:
- SCM_GASSERT2 (SCM_NIMP (x) && SCM_BIGP (x),
+ SCM_GASSERT2 (SCM_BIGP (x),
g_gcd, x, y, SCM_ARG1, s_gcd);
if (SCM_BIGSIGN (x))
x = scm_copybig (x, 0);
newy:
if (SCM_NINUMP (y))
{
- SCM_GASSERT2 (SCM_NIMP (y) && SCM_BIGP (y),
+ SCM_GASSERT2 (SCM_BIGP (y),
g_gcd, x, y, SCM_ARGn, s_gcd);
if (SCM_BIGSIGN (y))
y = scm_copybig (y, 0);
@@ -483,11 +483,11 @@ scm_lcm (SCM n1, SCM n2)
#else
SCM_GASSERT2 (SCM_INUMP (n1)
|| SCM_UNBNDP (n1)
- || (SCM_NIMP (n1) && SCM_BIGP (n1)),
+ || (SCM_BIGP (n1)),
g_lcm, n1, n2, SCM_ARG1, s_lcm);
SCM_GASSERT2 (SCM_INUMP (n2)
|| SCM_UNBNDP (n2)
- || (SCM_NIMP (n2) && SCM_BIGP (n2)),
+ || (SCM_BIGP (n2)),
g_lcm, n1, n2, SCM_ARGn, s_lcm);
#endif
if (SCM_UNBNDP (n2))
@@ -1872,14 +1872,14 @@ GUILE_PROC (scm_number_to_string, "number->string", 1, 1, 0,
if (SCM_BIGP (x))
return big2str (x, (unsigned int) base);
#ifndef SCM_RECKLESS
- if (!(SCM_INEXP (x)))
+ if (!SCM_INEXP (x))
{
badx:
scm_wta (x, (char *) SCM_ARG1, FUNC_NAME);
}
#endif
#else
- SCM_ASSERT (SCM_NIMP (x) && SCM_INEXP (x),
+ SCM_ASSERT (SCM_INEXP (x),
x, SCM_ARG1, s_number_to_string);
#endif
return scm_makfromstr (num_buf, iflo2str (x, num_buf), 0);
@@ -1888,7 +1888,7 @@ GUILE_PROC (scm_number_to_string, "number->string", 1, 1, 0,
#ifdef SCM_BIGDIG
if (SCM_NINUMP (x))
{
- SCM_ASSERT (SCM_NIMP (x) && SCM_BIGP (x),
+ SCM_ASSERT (SCM_BIGP (x),
x, SCM_ARG1, s_number_to_string);
return big2str (x, (unsigned int) base);
}
@@ -2355,7 +2355,7 @@ scm_istr2flo (char *str, long len, long radix)
{ /* polar input for complex number */
/* get a `real' for scm_angle */
second = scm_istr2flo (&str[i], (long) (len - i), radix);
- if (!(SCM_NIMP (second) && SCM_INEXP (second)))
+ if (!SCM_INEXP (second))
return SCM_BOOL_F; /* not `real' */
if (SCM_CPLXP (second))
return SCM_BOOL_F; /* not `real' */
@@ -2374,7 +2374,7 @@ scm_istr2flo (char *str, long len, long radix)
return scm_makdbl (res, lead_sgn);
/* get a `ureal' for complex part */
second = scm_istr2flo (&str[i], (long) ((len - i) - 1), radix);
- if (! (SCM_NIMP (second) && SCM_INEXP (second)))
+ if (!SCM_INEXP (second))
return SCM_BOOL_F; /* not `ureal' */
if (SCM_CPLXP (second))
return SCM_BOOL_F; /* not `ureal' */
@@ -2550,11 +2550,11 @@ GUILE_PROC (scm_number_p, "complex?", 1, 0, 0,
if (SCM_INUMP (x))
return SCM_BOOL_T;
#ifdef SCM_FLOATS
- if (SCM_NIMP (x) && SCM_NUMP (x))
+ if (SCM_NUMP (x))
return SCM_BOOL_T;
#else
#ifdef SCM_BIGDIG
- if (SCM_NIMP (x) && SCM_NUMP (x))
+ if (SCM_NUMP (x))
return SCM_BOOL_T;
#endif
#endif
@@ -2624,7 +2624,7 @@ GUILE_PROC (scm_inexact_p, "inexact?", 1, 0, 0,
#define FUNC_NAME s_scm_inexact_p
{
#ifdef SCM_FLOATS
- if (SCM_NIMP (x) && SCM_INEXP (x))
+ if (SCM_INEXP (x))
return SCM_BOOL_T;
#endif
return SCM_BOOL_F;
@@ -2644,7 +2644,7 @@ scm_num_eq_p (SCM x, SCM y)
if (SCM_NINUMP (x))
{
#ifdef SCM_BIGDIG
- if (!(SCM_NIMP (x)))
+ if (!SCM_NIMP (x))
{
badx:
SCM_WTA_DISPATCH_2 (g_eq_p, x, y, SCM_ARG1, s_eq_p);
@@ -2664,7 +2664,7 @@ scm_num_eq_p (SCM x, SCM y)
}
SCM_ASRTGO (SCM_INEXP (x), badx);
#else
- SCM_GASSERT2 (SCM_NIMP (x) && SCM_INEXP (x),
+ SCM_GASSERT2 (SCM_INEXP (x),
g_eq_p, x, y, SCM_ARG1, s_eq_p);
#endif
if (SCM_INUMP (y))
@@ -2685,7 +2685,7 @@ scm_num_eq_p (SCM x, SCM y)
}
SCM_ASRTGO (SCM_INEXP (y), bady);
#else
- SCM_ASRTGO (SCM_NIMP (y) && SCM_INEXP (y), bady);
+ SCM_ASRTGO (SCM_INEXP (y), bady);
#endif
if (SCM_REALPART (x) != SCM_REALPART (y))
return SCM_BOOL_F;
@@ -2701,13 +2701,13 @@ scm_num_eq_p (SCM x, SCM y)
SCM_ASRTGO (SCM_NIMP (y), bady);
if (SCM_BIGP (y))
return SCM_BOOL_F;
- if (!(SCM_INEXP (y)))
+ if (!SCM_INEXP (y))
{
bady:
SCM_WTA_DISPATCH_2 (g_eq_p, x, y, SCM_ARGn, s_eq_p);
}
#else
- if (!(SCM_NIMP (y) && SCM_INEXP (y)))
+ if (!SCM_INEXP (y))
{
bady:
SCM_WTA_DISPATCH_2 (g_eq_p, x, y, SCM_ARGn, s_eq_p);
@@ -2722,16 +2722,16 @@ scm_num_eq_p (SCM x, SCM y)
#ifdef SCM_BIGDIG
if (SCM_NINUMP (x))
{
- SCM_GASSERT2 (SCM_NIMP (x) && SCM_BIGP (x),
+ SCM_GASSERT2 (SCM_BIGP (x),
g_eq_p, x, y, SCM_ARG1, s_eq_p);
if (SCM_INUMP (y))
return SCM_BOOL_F;
- SCM_ASRTGO (SCM_NIMP (y) && SCM_BIGP (y), bady);
+ SCM_ASRTGO (SCM_BIGP (y), bady);
return SCM_BOOL(0 == scm_bigcomp (x, y));
}
if (SCM_NINUMP (y))
{
- if (!(SCM_NIMP (y) && SCM_BIGP (y)))
+ if (!SCM_BIGP (y))
{
bady:
SCM_WTA_DISPATCH_2 (g_eq_p, x, y, SCM_ARGn, s_eq_p);
@@ -2757,7 +2757,7 @@ scm_less_p (SCM x, SCM y)
if (SCM_NINUMP (x))
{
#ifdef SCM_BIGDIG
- if (!(SCM_NIMP (x)))
+ if (!SCM_NIMP (x))
{
badx:
SCM_WTA_DISPATCH_2 (g_less_p, x, y, SCM_ARG1, s_less_p);
@@ -2776,7 +2776,7 @@ scm_less_p (SCM x, SCM y)
}
SCM_ASRTGO (SCM_REALP (x), badx);
#else
- SCM_GASSERT2 (SCM_NIMP (x) && SCM_REALP (x),
+ SCM_GASSERT2 (SCM_REALP (x),
g_less_p, x, y, SCM_ARG1, s_less_p);
#endif
if (SCM_INUMP (y))
@@ -2789,7 +2789,7 @@ scm_less_p (SCM x, SCM y)
return SCM_BOOL(SCM_REALPART (x) < scm_big2dbl (y));
SCM_ASRTGO (SCM_REALP (y), bady);
#else
- SCM_ASRTGO (SCM_NIMP (y) && SCM_REALP (y), bady);
+ SCM_ASRTGO (SCM_REALP (y), bady);
#endif
return SCM_BOOL(SCM_REALPART (x) < SCM_REALPART (y));
}
@@ -2799,13 +2799,13 @@ scm_less_p (SCM x, SCM y)
SCM_ASRTGO (SCM_NIMP (y), bady);
if (SCM_BIGP (y))
return SCM_NEGATE_BOOL(SCM_BIGSIGN (y));
- if (!(SCM_REALP (y)))
+ if (!SCM_REALP (y))
{
bady:
SCM_WTA_DISPATCH_2 (g_less_p, x, y, SCM_ARGn, s_less_p);
}
#else
- if (!(SCM_NIMP (y) && SCM_REALP (y)))
+ if (!SCM_REALP (y))
{
bady:
SCM_WTA_DISPATCH_2 (g_less_p, x, y, SCM_ARGn, s_less_p);
@@ -2819,16 +2819,16 @@ scm_less_p (SCM x, SCM y)
#ifdef SCM_BIGDIG
if (SCM_NINUMP (x))
{
- SCM_GASSERT2 (SCM_NIMP (x) && SCM_BIGP (x),
+ SCM_GASSERT2 (SCM_BIGP (x),
g_less_p, x, y, SCM_ARG1, s_less_p);
if (SCM_INUMP (y))
return SCM_BOOL(SCM_BIGSIGN (x));
- SCM_ASRTGO (SCM_NIMP (y) && SCM_BIGP (y), bady);
+ SCM_ASRTGO (SCM_BIGP (y), bady);
return SCM_BOOL(1 == scm_bigcomp (x, y));
}
if (SCM_NINUMP (y))
{
- if (!(SCM_NIMP (y) && SCM_BIGP (y)))
+ if (!SCM_BIGP (y))
{
bady:
SCM_WTA_DISPATCH_2 (g_less_p, x, y, SCM_ARGn, s_less_p);
@@ -2889,13 +2889,13 @@ scm_zero_p (SCM z)
SCM_ASRTGO (SCM_NIMP (z), badz);
if (SCM_BIGP (z))
return SCM_BOOL_F;
- if (!(SCM_INEXP (z)))
+ if (!SCM_INEXP (z))
{
badz:
SCM_WTA_DISPATCH_1 (g_zero_p, z, SCM_ARG1, s_zero_p);
}
#else
- SCM_GASSERT1 (SCM_NIMP (z) && SCM_INEXP (z),
+ SCM_GASSERT1 (SCM_INEXP (z),
g_zero_p, z, SCM_ARG1, s_zero_p);
#endif
return SCM_BOOL(z == scm_flo0);
@@ -2904,7 +2904,7 @@ scm_zero_p (SCM z)
#ifdef SCM_BIGDIG
if (SCM_NINUMP (z))
{
- SCM_GASSERT1 (SCM_NIMP (z) && SCM_BIGP (z),
+ SCM_GASSERT1 (SCM_BIGP (z),
g_zero_p, z, SCM_ARG1, s_zero_p);
return SCM_BOOL_F;
}
@@ -2929,13 +2929,13 @@ scm_positive_p (SCM x)
SCM_ASRTGO (SCM_NIMP (x), badx);
if (SCM_BIGP (x))
return SCM_BOOL(SCM_TYP16 (x) == scm_tc16_bigpos);
- if (!(SCM_REALP (x)))
+ if (!SCM_REALP (x))
{
badx:
SCM_WTA_DISPATCH_1 (g_positive_p, x, SCM_ARG1, s_positive_p);
}
#else
- SCM_GASSERT1 (SCM_NIMP (x) && SCM_REALP (x),
+ SCM_GASSERT1 (SCM_REALP (x),
g_positive_p, x, SCM_ARG1, s_positive_p);
#endif
return SCM_BOOL(SCM_REALPART (x) > 0.0);
@@ -2944,7 +2944,7 @@ scm_positive_p (SCM x)
#ifdef SCM_BIGDIG
if (SCM_NINUMP (x))
{
- SCM_GASSERT1 (SCM_NIMP (x) && SCM_BIGP (x),
+ SCM_GASSERT1 (SCM_BIGP (x),
g_positive_p, x, SCM_ARG1, s_positive_p);
return SCM_BOOL(SCM_TYP16 (x) == scm_tc16_bigpos);
}
@@ -2975,7 +2975,7 @@ scm_negative_p (SCM x)
SCM_WTA_DISPATCH_1 (g_negative_p, x, SCM_ARG1, s_negative_p);
}
#else
- SCM_GASSERT1 (SCM_NIMP (x) && SCM_REALP (x),
+ SCM_GASSERT1 (SCM_REALP (x),
g_negative_p, x, SCM_ARG1, s_negative_p);
#endif
return SCM_BOOL(SCM_REALPART (x) < 0.0);
@@ -2984,7 +2984,7 @@ scm_negative_p (SCM x)
#ifdef SCM_BIGDIG
if (SCM_NINUMP (x))
{
- SCM_GASSERT1 (SCM_NIMP (x) && SCM_BIGP (x),
+ SCM_GASSERT1 (SCM_BIGP (x),
g_negative_p, x, SCM_ARG1, s_negative_p);
return SCM_BOOL(SCM_TYP16 (x) == scm_tc16_bigneg);
}
@@ -3033,7 +3033,7 @@ scm_max (SCM x, SCM y)
}
SCM_ASRTGO (SCM_REALP (x), badx2);
#else
- SCM_GASSERT2 (SCM_NIMP (x) && SCM_REALP (x),
+ SCM_GASSERT2 (SCM_REALP (x),
g_max, x, y, SCM_ARG1, s_max);
#endif
if (SCM_INUMP (y))
@@ -3048,7 +3048,7 @@ scm_max (SCM x, SCM y)
: x);
SCM_ASRTGO (SCM_REALP (y), bady);
#else
- SCM_ASRTGO (SCM_NIMP (y) && SCM_REALP (y), bady);
+ SCM_ASRTGO (SCM_REALP (y), bady);
#endif
return (SCM_REALPART (x) < SCM_REALPART (y)) ? y : x;
}
@@ -3064,7 +3064,7 @@ scm_max (SCM x, SCM y)
SCM_WTA_DISPATCH_2 (g_max, x, y, SCM_ARGn, s_max);
}
#else
- if (!(SCM_NIMP (y) && SCM_REALP (y)))
+ if (!SCM_REALP (y))
{
bady:
SCM_WTA_DISPATCH_2 (g_max, x, y, SCM_ARGn, s_max);
@@ -3078,16 +3078,16 @@ scm_max (SCM x, SCM y)
#ifdef SCM_BIGDIG
if (SCM_NINUMP (x))
{
- SCM_GASSERT2 (SCM_NIMP (x) && SCM_BIGP (x),
+ SCM_GASSERT2 (SCM_BIGP (x),
g_max, x, y, SCM_ARG1, s_max);
if (SCM_INUMP (y))
return SCM_BIGSIGN (x) ? y : x;
- SCM_ASRTGO (SCM_NIMP (y) && SCM_BIGP (y), bady);
+ SCM_ASRTGO (SCM_BIGP (y), bady);
return (1 == scm_bigcomp (x, y)) ? y : x;
}
if (SCM_NINUMP (y))
{
- if (!(SCM_NIMP (y) && SCM_BIGP (y)))
+ if (!SCM_BIGP (y))
{
bady:
SCM_WTA_DISPATCH_2 (g_max, x, y, SCM_ARGn, s_max);
@@ -3124,7 +3124,7 @@ scm_min (SCM x, SCM y)
if (SCM_NINUMP (x))
{
#ifdef SCM_BIGDIG
- if (!(SCM_NIMP (x)))
+ if (!SCM_NIMP (x))
{
badx2:
SCM_WTA_DISPATCH_2 (g_min, x, y, SCM_ARG1, s_min);
@@ -3142,7 +3142,7 @@ scm_min (SCM x, SCM y)
}
SCM_ASRTGO (SCM_REALP (x), badx2);
#else
- SCM_GASSERT2 (SCM_NIMP (x) && SCM_REALP (x),
+ SCM_GASSERT2 (SCM_REALP (x),
g_min, x, y, SCM_ARG1, s_min);
#endif
if (SCM_INUMP (y))
@@ -3157,7 +3157,7 @@ scm_min (SCM x, SCM y)
: x);
SCM_ASRTGO (SCM_REALP (y), bady);
#else
- SCM_ASRTGO (SCM_NIMP (y) && SCM_REALP (y), bady);
+ SCM_ASRTGO (SCM_REALP (y), bady);
#endif
return (SCM_REALPART (x) > SCM_REALPART (y)) ? y : x;
}
@@ -3173,7 +3173,7 @@ scm_min (SCM x, SCM y)
SCM_WTA_DISPATCH_2 (g_min, x, y, SCM_ARGn, s_min);
}
#else
- if (!(SCM_NIMP (y) && SCM_REALP (y)))
+ if (!SCM_REALP (y))
{
bady:
SCM_WTA_DISPATCH_2 (g_min, x, y, SCM_ARGn, s_min);
@@ -3187,16 +3187,16 @@ scm_min (SCM x, SCM y)
#ifdef SCM_BIGDIG
if (SCM_NINUMP (x))
{
- SCM_GASSERT2 (SCM_NIMP (x) && SCM_BIGP (x),
+ SCM_GASSERT2 (SCM_BIGP (x),
g_min, x, y, SCM_ARG1, s_min);
if (SCM_INUMP (y))
return SCM_BIGSIGN (x) ? x : y;
- SCM_ASRTGO (SCM_NIMP (y) && SCM_BIGP (y), bady);
+ SCM_ASRTGO (SCM_BIGP (y), bady);
return (-1 == scm_bigcomp (x, y)) ? y : x;
}
if (SCM_NINUMP (y))
{
- if (!(SCM_NIMP (y) && SCM_BIGP (y)))
+ if (!SCM_BIGP (y))
{
bady:
SCM_WTA_DISPATCH_2 (g_min, x, y, SCM_ARGn, s_min);
@@ -3265,7 +3265,7 @@ scm_sum (SCM x, SCM y)
}
SCM_ASRTGO (SCM_INEXP (x), badx2);
#else
- SCM_ASRTGO (SCM_NIMP (x) && SCM_INEXP (x), badx2);
+ SCM_ASRTGO (SCM_INEXP (x), badx2);
#endif
if (SCM_INUMP (y))
{
@@ -3283,13 +3283,13 @@ scm_sum (SCM x, SCM y)
y = t;
goto bigreal;
}
- else if (!(SCM_INEXP (y)))
+ else if (!SCM_INEXP (y))
{
bady:
SCM_WTA_DISPATCH_2 (g_sum, x, y, SCM_ARGn, s_sum);
}
#else
- if (!(SCM_NIMP (y) && SCM_INEXP (y)))
+ if (!SCM_INEXP (y))
{
bady:
SCM_WTA_DISPATCH_2 (g_sum, x, y, SCM_ARGn, s_sum);
@@ -3328,7 +3328,7 @@ scm_sum (SCM x, SCM y)
}
SCM_ASRTGO (SCM_INEXP (y), bady);
#else
- SCM_ASRTGO (SCM_NIMP (y) && SCM_INEXP (y), bady);
+ SCM_ASRTGO (SCM_INEXP (y), bady);
#endif
intreal:
return scm_makdbl (SCM_INUM (x) + SCM_REALPART (y),
@@ -3339,7 +3339,7 @@ scm_sum (SCM x, SCM y)
if (SCM_NINUMP (x))
{
SCM t;
- SCM_ASRTGO (SCM_NIMP (x) && SCM_BIGP (x), badx2);
+ SCM_ASRTGO (SCM_BIGP (x), badx2);
if (SCM_INUMP (y))
{
t = x;
@@ -3347,7 +3347,7 @@ scm_sum (SCM x, SCM y)
y = t;
goto intbig;
}
- SCM_ASRTGO (SCM_NIMP (y) && SCM_BIGP (y), bady);
+ SCM_ASRTGO (SCM_BIGP (y), bady);
if (SCM_NUMDIGS (x) > SCM_NUMDIGS (y))
{
t = x;
@@ -3359,7 +3359,7 @@ scm_sum (SCM x, SCM y)
}
if (SCM_NINUMP (y))
{
- if (!(SCM_NIMP (y) && SCM_BIGP (y)))
+ if (!SCM_BIGP (y))
{
bady:
SCM_WTA_DISPATCH_2 (g_sum, x, y, SCM_ARGn, s_sum);
@@ -3463,7 +3463,7 @@ scm_difference (SCM x, SCM y)
SCM_ASRTGO (SCM_INEXP (y), bady);
#else
SCM_ASRTGO (SCM_INEXP (x), badx2);
- SCM_ASRTGO (SCM_NIMP (y) && SCM_INEXP (y), bady);
+ SCM_ASRTGO (SCM_INEXP (y), bady);
#endif
if (SCM_CPLXP (x))
{
@@ -3499,13 +3499,13 @@ scm_difference (SCM x, SCM y)
y, 0x0100);
#endif
}
- if (!(SCM_INEXP (y)))
+ if (!SCM_INEXP (y))
{
bady:
SCM_WTA_DISPATCH_2 (g_difference, x, y, SCM_ARGn, s_difference);
}
#else
- if (!(SCM_NIMP (y) && SCM_INEXP (y)))
+ if (!SCM_INEXP (y))
{
bady:
SCM_WTA_DISPATCH_2 (g_difference, x, y, SCM_ARGn, s_difference);
@@ -3518,7 +3518,7 @@ scm_difference (SCM x, SCM y)
#ifdef SCM_BIGDIG
if (SCM_NINUMP (x))
{
- SCM_GASSERT2 (SCM_NIMP (x) && SCM_BIGP (x),
+ SCM_GASSERT2 (SCM_BIGP (x),
g_difference, x, y, SCM_ARG1, s_difference);
if (SCM_UNBNDP (y))
{
@@ -3540,7 +3540,7 @@ scm_difference (SCM x, SCM y)
x, 0);
#endif
}
- SCM_ASRTGO (SCM_NIMP (y) && SCM_BIGP (y), bady);
+ SCM_ASRTGO (SCM_BIGP (y), bady);
return (SCM_NUMDIGS (x) < SCM_NUMDIGS (y)) ?
scm_addbig (SCM_BDIGITS (x), SCM_NUMDIGS (x), SCM_BIGSIGN (x),
y, 0x0100) :
@@ -3554,7 +3554,7 @@ scm_difference (SCM x, SCM y)
}
if (SCM_NINUMP (y))
{
- if (!(SCM_NIMP (y) && SCM_BIGP (y)))
+ if (!SCM_BIGP (y))
{
bady:
SCM_WTA_DISPATCH_2 (g_difference, x, y, SCM_ARGn, s_difference);
@@ -3647,7 +3647,7 @@ scm_product (SCM x, SCM y)
}
SCM_ASRTGO (SCM_INEXP (x), badx2);
#else
- SCM_ASRTGO (SCM_NIMP (x) && SCM_INEXP (x), badx2);
+ SCM_ASRTGO (SCM_INEXP (x), badx2);
#endif
if (SCM_INUMP (y))
{
@@ -3671,7 +3671,7 @@ scm_product (SCM x, SCM y)
SCM_WTA_DISPATCH_2 (g_product, x, y, SCM_ARGn, s_product);
}
#else
- if (!(SCM_NIMP (y) && SCM_INEXP (y)))
+ if (!SCM_INEXP (y))
{
bady:
SCM_WTA_DISPATCH_2 (g_product, x, y, SCM_ARGn, s_product);
@@ -3721,7 +3721,7 @@ scm_product (SCM x, SCM y)
}
SCM_ASRTGO (SCM_INEXP (y), bady);
#else
- SCM_ASRTGO (SCM_NIMP (y) && SCM_INEXP (y), bady);
+ SCM_ASRTGO (SCM_INEXP (y), bady);
#endif
intreal:
return scm_makdbl (SCM_INUM (x) * SCM_REALPART (y),
@@ -3731,7 +3731,7 @@ scm_product (SCM x, SCM y)
#ifdef SCM_BIGDIG
if (SCM_NINUMP (x))
{
- SCM_ASRTGO (SCM_NIMP (x) && SCM_BIGP (x), badx2);
+ SCM_ASRTGO (SCM_BIGP (x), badx2);
if (SCM_INUMP (y))
{
SCM t = x;
@@ -3739,14 +3739,14 @@ scm_product (SCM x, SCM y)
y = t;
goto intbig;
}
- SCM_ASRTGO (SCM_NIMP (y) && SCM_BIGP (y), bady);
+ SCM_ASRTGO (SCM_BIGP (y), bady);
return scm_mulbig (SCM_BDIGITS (x), SCM_NUMDIGS (x),
SCM_BDIGITS (y), SCM_NUMDIGS (y),
SCM_BIGSIGN (x) ^ SCM_BIGSIGN (y));
}
if (SCM_NINUMP (y))
{
- if (!(SCM_NIMP (y) && SCM_BIGP (y)))
+ if (!SCM_BIGP (y))
{
bady:
SCM_WTA_DISPATCH_2 (g_product, x, y, SCM_ARGn, s_product);
@@ -3942,7 +3942,7 @@ scm_divide (SCM x, SCM y)
}
SCM_ASRTGO (SCM_INEXP (y), bady);
#else
- SCM_ASRTGO (SCM_NIMP (y) && SCM_INEXP (y), bady);
+ SCM_ASRTGO (SCM_INEXP (y), bady);
#endif
if (SCM_REALP (y))
{
@@ -3978,7 +3978,7 @@ scm_divide (SCM x, SCM y)
SCM_WTA_DISPATCH_2 (g_divide, x, y, SCM_ARGn, s_divide);
}
#else
- if (!(SCM_NIMP (y) && SCM_INEXP (y)))
+ if (!SCM_INEXP (y))
{
bady:
SCM_WTA_DISPATCH_2 (g_divide, x, y, SCM_ARGn, s_divide);
@@ -3998,7 +3998,7 @@ scm_divide (SCM x, SCM y)
if (SCM_NINUMP (x))
{
SCM z;
- SCM_GASSERT2 (SCM_NIMP (x) && SCM_BIGP (x),
+ SCM_GASSERT2 (SCM_BIGP (x),
g_divide, x, y, SCM_ARG1, s_divide);
if (SCM_UNBNDP (y))
goto ov;
@@ -4036,7 +4036,7 @@ scm_divide (SCM x, SCM y)
}
else
{
- SCM_ASRTGO (SCM_NIMP (y) && SCM_BIGP (y), bady);
+ SCM_ASRTGO (SCM_BIGP (y), bady);
z = scm_divbigbig (SCM_BDIGITS (x), SCM_NUMDIGS (x),
SCM_BDIGITS (y), SCM_NUMDIGS (y),
SCM_BIGSIGN (x) ^ SCM_BIGSIGN (y), 3);
@@ -4053,7 +4053,7 @@ scm_divide (SCM x, SCM y)
}
if (SCM_NINUMP (y))
{
- if (!(SCM_NIMP (y) && SCM_BIGP (y)))
+ if (!SCM_BIGP (y))
{
bady:
SCM_WTA_DISPATCH_2 (g_divide, x, y, SCM_ARGn, s_divide);
@@ -4204,14 +4204,14 @@ scm_two_doubles (SCM z1, SCM z2, const char *sstring, struct dpair *xy)
else
{
#ifndef SCM_RECKLESS
- if (!(SCM_REALP (z1)))
+ if (!SCM_REALP (z1))
badz1:scm_wta (z1, (char *) SCM_ARG1, sstring);
#endif
xy->x = SCM_REALPART (z1);
}
#else
{
- SCM_ASSERT (SCM_NIMP (z1) && SCM_REALP (z1), z1, SCM_ARG1, sstring);
+ SCM_ASSERT (SCM_REALP (z1), z1, SCM_ARG1, sstring);
xy->x = SCM_REALPART (z1);
}
#endif
@@ -4234,7 +4234,7 @@ scm_two_doubles (SCM z1, SCM z2, const char *sstring, struct dpair *xy)
}
#else
{
- SCM_ASSERT (SCM_NIMP (z2) && SCM_REALP (z2), z2, SCM_ARG2, sstring);
+ SCM_ASSERT (SCM_REALP (z2), z2, SCM_ARG2, sstring);
xy->y = SCM_REALPART (z2);
}
#endif
@@ -4314,7 +4314,7 @@ scm_real_part (SCM z)
SCM_WTA_DISPATCH_1 (g_real_part, z, SCM_ARG1, s_real_part);
}
#else
- SCM_GASSERT1 (SCM_NIMP (z) && SCM_INEXP (z),
+ SCM_GASSERT1 (SCM_INEXP (z),
g_real_part, z, SCM_ARG1, s_real_part);
#endif
if (SCM_CPLXP (z))
@@ -4342,7 +4342,7 @@ scm_imag_part (SCM z)
SCM_WTA_DISPATCH_1 (g_imag_part, z, SCM_ARG1, s_imag_part);
}
#else
- SCM_GASSERT1 (SCM_NIMP (z) && SCM_INEXP (z),
+ SCM_GASSERT1 (SCM_INEXP (z),
g_imag_part, z, SCM_ARG1, s_imag_part);
#endif
if (SCM_CPLXP (z))
@@ -4369,7 +4369,7 @@ scm_magnitude (SCM z)
SCM_WTA_DISPATCH_1 (g_magnitude, z, SCM_ARG1, s_magnitude);
}
#else
- SCM_GASSERT1 (SCM_NIMP (z) && SCM_INEXP (z),
+ SCM_GASSERT1 (SCM_INEXP (z),
g_magnitude, z, SCM_ARG1, s_magnitude);
#endif
if (SCM_CPLXP (z))
@@ -4407,7 +4407,7 @@ scm_angle (SCM z)
SCM_WTA_DISPATCH_1 (g_angle, z, SCM_ARG1, s_angle);
}
#else
- SCM_GASSERT1 (SCM_NIMP (z) && SCM_INEXP (z), g_angle, z, SCM_ARG1, s_angle);
+ SCM_GASSERT1 (SCM_INEXP (z), g_angle, z, SCM_ARG1, s_angle);
#endif
if (SCM_REALP (z))
{
diff --git a/libguile/objects.c b/libguile/objects.c
index b6b9e0d9d..80478facf 100644
--- a/libguile/objects.c
+++ b/libguile/objects.c
@@ -364,7 +364,7 @@ GUILE_PROC (scm_entity_p, "entity?", 1, 0, 0,
"")
#define FUNC_NAME s_scm_entity_p
{
- return SCM_BOOL(SCM_NIMP (obj) && SCM_STRUCTP (obj) && SCM_I_ENTITYP (obj));
+ return SCM_BOOL(SCM_STRUCTP (obj) && SCM_I_ENTITYP (obj));
}
#undef FUNC_NAME
@@ -385,7 +385,7 @@ GUILE_PROC (scm_set_object_procedure_x, "set-object-procedure!", 2, 0, 0,
"")
#define FUNC_NAME s_scm_set_object_procedure_x
{
- SCM_ASSERT (SCM_NIMP (obj) && SCM_STRUCTP (obj)
+ SCM_ASSERT (SCM_STRUCTP (obj)
&& ((SCM_CLASS_FLAGS (obj) & SCM_CLASSF_OPERATOR)
|| (SCM_I_ENTITYP (obj)
&& !(SCM_OBJ_CLASS_FLAGS (obj)
@@ -408,7 +408,7 @@ GUILE_PROC (scm_object_procedure, "object-procedure", 1, 0, 0,
"")
#define FUNC_NAME s_scm_object_procedure
{
- SCM_ASSERT (SCM_NIMP (obj) && SCM_STRUCTP (obj)
+ SCM_ASSERT (SCM_STRUCTP (obj)
&& ((SCM_CLASS_FLAGS (obj) & SCM_CLASSF_OPERATOR)
|| SCM_I_ENTITYP (obj)),
obj, SCM_ARG1, FUNC_NAME);
diff --git a/libguile/options.c b/libguile/options.c
index 975c6d1c1..64143cb4b 100644
--- a/libguile/options.c
+++ b/libguile/options.c
@@ -164,7 +164,7 @@ scm_options (SCM arg, scm_option options[], int n, const char *s)
flags[i] = (unsigned long) options[i].val;
while (SCM_NNULLP (new_mode))
{
- SCM_ASSERT (SCM_NIMP (new_mode) && SCM_CONSP (new_mode),
+ SCM_ASSERT (SCM_CONSP (new_mode),
new_mode,
SCM_ARG1,
s);
diff --git a/libguile/ports.c b/libguile/ports.c
index 6e6be8b10..dd092a444 100644
--- a/libguile/ports.c
+++ b/libguile/ports.c
@@ -1043,7 +1043,7 @@ the current position of a port can be obtained using:
SCM_VALIDATE_INT_COPY(3,whence,how);
if (how != SEEK_SET && how != SEEK_CUR && how != SEEK_END)
SCM_OUT_OF_RANGE (3, whence);
- if (SCM_NIMP (object) && SCM_OPPORTP (object))
+ if (SCM_OPPORTP (object))
{
scm_ptob_descriptor *ptob = scm_ptobs + SCM_PTOBNUM (object);
@@ -1083,7 +1083,7 @@ The return value is unspecified.")
if (SCM_UNBNDP (length))
{
/* must supply length if object is a filename. */
- if (SCM_NIMP (object) && SCM_ROSTRINGP (object))
+ if (SCM_ROSTRINGP (object))
scm_wrong_num_args (SCM_FUNC_NAME);
length = scm_seek (object, SCM_INUM0, SCM_MAKINUM (SEEK_CUR));
@@ -1097,7 +1097,7 @@ The return value is unspecified.")
{
SCM_SYSCALL (rv = ftruncate (SCM_INUM (object), c_length));
}
- else if (SCM_NIMP (object) && SCM_OPOUTPORTP (object))
+ else if (SCM_OPOUTPORTP (object))
{
scm_port *pt = SCM_PTAB_ENTRY (object);
scm_ptob_descriptor *ptob = scm_ptobs + SCM_PTOBNUM (object);
diff --git a/libguile/posix.c b/libguile/posix.c
index b8354de06..aa0f6b2b7 100644
--- a/libguile/posix.c
+++ b/libguile/posix.c
@@ -845,7 +845,7 @@ scm_convert_exec_args (SCM args, int pos, const char *subr)
int i;
SCM_ASSERT (SCM_NULLP (args)
- || (SCM_NIMP (args) && SCM_CONSP (args)),
+ || (SCM_CONSP (args)),
args, pos, subr);
num_args = scm_ilength (args);
execargv = (char **)
@@ -855,7 +855,7 @@ scm_convert_exec_args (SCM args, int pos, const char *subr)
scm_sizet len;
char *dst;
char *src;
- SCM_ASSERT (SCM_NIMP (SCM_CAR (args)) && SCM_ROSTRINGP (SCM_CAR (args)),
+ SCM_ASSERT (SCM_ROSTRINGP (SCM_CAR (args)),
SCM_CAR (args), SCM_ARGn, subr);
len = 1 + SCM_ROLENGTH (SCM_CAR (args));
dst = (char *) scm_must_malloc ((long) len, subr);
@@ -923,8 +923,7 @@ environ_list_to_c (SCM envlist, int arg, const char *proc)
char **result;
int i = 0;
- SCM_ASSERT (SCM_NULLP (envlist)
- || (SCM_NIMP (envlist) && SCM_CONSP (envlist)),
+ SCM_ASSERT (SCM_NULLP (envlist) || SCM_CONSP (envlist),
envlist, arg, proc);
num_strings = scm_ilength (envlist);
result = (char **) malloc ((num_strings + 1) * sizeof (char *));
diff --git a/libguile/print.c b/libguile/print.c
index c96853c25..31f719328 100644
--- a/libguile/print.c
+++ b/libguile/print.c
@@ -417,7 +417,7 @@ taloop:
env = SCM_ENV (exp);
scm_puts ("#<procedure", port);
}
- if (SCM_NIMP (name) && SCM_ROSTRINGP (name))
+ if (SCM_ROSTRINGP (name))
{
scm_putc (' ', port);
scm_puts (SCM_ROCHARS (name), port);
@@ -708,7 +708,7 @@ scm_prin1 (SCM exp, SCM port, int writingp)
/* If PORT is a print-state/port pair, use that. Else create a new
print-state. */
- if (SCM_NIMP (port) && SCM_PORT_WITH_PS_P (port))
+ if (SCM_PORT_WITH_PS_P (port))
{
pstate_scm = SCM_PORT_WITH_PS_PS (port);
port = SCM_PORT_WITH_PS_PORT (port);
@@ -794,7 +794,7 @@ scm_iprlist (char *hdr,SCM exp,int tlr,SCM port,scm_print_state *pstate)
O(depth * N) instead of O(N^2). */
hare = SCM_CDR (exp);
tortoise = exp;
- while (SCM_NIMP (hare) && SCM_ECONSP (hare))
+ while (SCM_ECONSP (hare))
{
if (hare == tortoise)
goto fancy_printing;
diff --git a/libguile/procprop.c b/libguile/procprop.c
index fd5242c64..e18acdc15 100644
--- a/libguile/procprop.c
+++ b/libguile/procprop.c
@@ -116,7 +116,7 @@ scm_i_procedure_arity (SCM proc)
proc = SCM_CAR (SCM_CODE (proc));
if (SCM_IMP (proc))
break;
- while (SCM_NIMP (proc) && SCM_CONSP (proc))
+ while (SCM_CONSP (proc))
{
++a;
proc = SCM_CDR (proc);
@@ -169,7 +169,7 @@ GUILE_PROC(scm_procedure_properties, "procedure-properties", 1, 0, 0,
{
SCM_VALIDATE_PROC(1,proc);
return scm_acons (scm_sym_arity, scm_i_procedure_arity (proc),
- SCM_PROCPROPS (SCM_NIMP (proc) && SCM_CLOSUREP (proc)
+ SCM_PROCPROPS (SCM_CLOSUREP (proc)
? proc
: scm_stand_in_scm_proc (proc)));
}
@@ -180,7 +180,7 @@ GUILE_PROC(scm_set_procedure_properties_x, "set-procedure-properties!", 2, 0, 0,
"Set @var{obj}'s property list to @var{alist}.")
#define FUNC_NAME s_scm_set_procedure_properties_x
{
- if (!(SCM_NIMP (proc) && SCM_CLOSUREP (proc)))
+ if (!SCM_CLOSUREP (proc))
proc = scm_stand_in_scm_proc(proc);
SCM_VALIDATE_CLOSURE(1,proc);
SCM_SETPROCPROPS (proc, new_val);
@@ -203,7 +203,7 @@ GUILE_PROC(scm_procedure_property, "procedure-property", 2, 0, 0,
}
SCM_VALIDATE_PROC(1,p);
assoc = scm_sloppy_assq (k,
- SCM_PROCPROPS (SCM_NIMP (p) && SCM_CLOSUREP (p)
+ SCM_PROCPROPS (SCM_CLOSUREP (p)
? p
: scm_stand_in_scm_proc (p)));
return (SCM_NIMP (assoc) ? SCM_CDR (assoc) : SCM_BOOL_F);
@@ -217,7 +217,7 @@ GUILE_PROC(scm_set_procedure_property_x, "set-procedure-property!", 3, 0, 0,
#define FUNC_NAME s_scm_set_procedure_property_x
{
SCM assoc;
- if (!(SCM_NIMP (p) && SCM_CLOSUREP (p)))
+ if (!SCM_CLOSUREP (p))
p = scm_stand_in_scm_proc(p);
SCM_VALIDATE_CLOSURE(1,p);
if (k == scm_sym_arity)
diff --git a/libguile/procs.c b/libguile/procs.c
index d3b539c36..9fa52d366 100644
--- a/libguile/procs.c
+++ b/libguile/procs.c
@@ -208,7 +208,7 @@ GUILE_PROC(scm_closure_p, "closure?", 1, 0, 0,
"")
#define FUNC_NAME s_scm_closure_p
{
- return SCM_BOOL(SCM_NIMP (obj) && SCM_CLOSUREP (obj));
+ return SCM_BOOL(SCM_CLOSUREP (obj));
}
#undef FUNC_NAME
@@ -303,7 +303,7 @@ GUILE_PROC (scm_procedure_with_setter_p, "procedure-with-setter?", 1, 0, 0,
"")
#define FUNC_NAME s_scm_procedure_with_setter_p
{
- return SCM_BOOL(SCM_NIMP (obj) && SCM_PROCEDURE_WITH_SETTER_P (obj));
+ return SCM_BOOL(SCM_PROCEDURE_WITH_SETTER_P (obj));
}
#undef FUNC_NAME
diff --git a/libguile/ramap.c b/libguile/ramap.c
index 3d54b918f..62b9b93ec 100644
--- a/libguile/ramap.c
+++ b/libguile/ramap.c
@@ -539,7 +539,7 @@ scm_array_fill_int (SCM ra, SCM fill, SCM ignore)
case scm_tc7_fvect:
{ /* scope */
float f, *ve = (float *) SCM_VELTS (ra);
- SCM_ASRTGO (SCM_NIMP (fill) && SCM_REALP (fill), badarg2);
+ SCM_ASRTGO (SCM_REALP (fill), badarg2);
f = SCM_REALPART (fill);
for (i = base; n--; i += inc)
ve[i] = f;
@@ -549,7 +549,7 @@ scm_array_fill_int (SCM ra, SCM fill, SCM ignore)
case scm_tc7_dvect:
{ /* scope */
double f, *ve = (double *) SCM_VELTS (ra);
- SCM_ASRTGO (SCM_NIMP (fill) && SCM_REALP (fill), badarg2);
+ SCM_ASRTGO (SCM_REALP (fill), badarg2);
f = SCM_REALPART (fill);
for (i = base; n--; i += inc)
ve[i] = f;
@@ -559,7 +559,7 @@ scm_array_fill_int (SCM ra, SCM fill, SCM ignore)
{ /* scope */
double fr, fi;
double (*ve)[2] = (double (*)[2]) SCM_VELTS (ra);
- SCM_ASRTGO (SCM_NIMP (fill) && SCM_INEXP (fill), badarg2);
+ SCM_ASRTGO (SCM_INEXP (fill), badarg2);
fr = SCM_REALPART (fill);
fi = (SCM_CPLXP (fill) ? SCM_IMAG (fill) : 0.0);
for (i = base; n--; i += inc)
@@ -1656,7 +1656,7 @@ unspecified. The order of application is unspecified.")
if (SCM_INUMP(fill))
{
prot = scm_array_prototype (ra0);
- if (SCM_NIMP (prot) && SCM_INEXP (prot))
+ if (SCM_INEXP (prot))
fill = scm_makdbl ((double) SCM_INUM (fill), 0.0);
}
@@ -1665,18 +1665,18 @@ unspecified. The order of application is unspecified.")
else
{
SCM tail, ra1 = SCM_CAR (lra);
- SCM v0 = (SCM_NIMP (ra0) && SCM_ARRAYP (ra0) ? SCM_ARRAY_V (ra0) : ra0);
+ SCM v0 = (SCM_ARRAYP (ra0) ? SCM_ARRAY_V (ra0) : ra0);
ra_iproc *p;
/* Check to see if order might matter.
This might be an argument for a separate
SERIAL-ARRAY-MAP! */
- if (v0 == ra1 || (SCM_NIMP (ra1) && SCM_ARRAYP (ra1) && v0 == SCM_ARRAY_V (ra1)))
+ if (v0 == ra1 || (SCM_ARRAYP (ra1) && v0 == SCM_ARRAY_V (ra1)))
if (ra0 != ra1 || (SCM_ARRAYP(ra0) && !SCM_ARRAY_CONTP(ra0)))
goto gencase;
for (tail = SCM_CDR (lra); SCM_NNULLP (tail); tail = SCM_CDR (tail))
{
ra1 = SCM_CAR (tail);
- if (v0 == ra1 || (SCM_NIMP (ra1) && SCM_ARRAYP (ra1) && v0 == SCM_ARRAY_V (ra1)))
+ if (v0 == ra1 || (SCM_ARRAYP (ra1) && v0 == SCM_ARRAY_V (ra1)))
goto gencase;
}
for (p = ra_asubrs; p->name; p++)
diff --git a/libguile/random.c b/libguile/random.c
index 16e834143..2c424c5d1 100644
--- a/libguile/random.c
+++ b/libguile/random.c
@@ -196,7 +196,7 @@ scm_rstate *
scm_c_default_rstate ()
{
SCM state = SCM_CDR (scm_var_random_state);
- SCM_ASSERT (SCM_NIMP (state) && SCM_RSTATEP (state),
+ SCM_ASSERT (SCM_RSTATEP (state),
state, "*random-state* contains bogus random state", 0);
return SCM_RSTATE (state);
}
diff --git a/libguile/read.c b/libguile/read.c
index fa74becbe..9fe22c784 100644
--- a/libguile/read.c
+++ b/libguile/read.c
@@ -197,7 +197,7 @@ recsexpr (SCM obj,int line,int column,SCM filename)
{
copy = scm_cons (recsexpr (SCM_CAR (obj), line, column, filename),
SCM_UNDEFINED);
- while (SCM_NIMP (tmp = SCM_CDR (tmp)) && SCM_CONSP (tmp))
+ while ((tmp = SCM_CDR (tmp)) && SCM_CONSP (tmp))
{
SCM_SETCDR (copy, scm_cons (recsexpr (SCM_CAR (tmp),
line,
@@ -211,7 +211,7 @@ recsexpr (SCM obj,int line,int column,SCM filename)
else
{
recsexpr (SCM_CAR (obj), line, column, filename);
- while (SCM_NIMP (tmp = SCM_CDR (tmp)) && SCM_CONSP (tmp))
+ while ((tmp = SCM_CDR (tmp)) && SCM_CONSP (tmp))
recsexpr (SCM_CAR (tmp), line, column, filename);
copy = SCM_UNDEFINED;
}
@@ -657,7 +657,7 @@ scm_lreadrecparen (SCM *tok_buf, SCM port, char *name, SCM *copy)
/* Build the head of the list structure. */
ans = tl = scm_cons (tmp, SCM_EOL);
if (SCM_COPY_SOURCE_P)
- ans2 = tl2 = scm_cons (SCM_NIMP (tmp) && SCM_CONSP (tmp)
+ ans2 = tl2 = scm_cons (SCM_CONSP (tmp)
? *copy
: tmp,
SCM_EOL);
@@ -668,7 +668,7 @@ scm_lreadrecparen (SCM *tok_buf, SCM port, char *name, SCM *copy)
{
SCM_SETCDR (tl, tmp = scm_lreadr (tok_buf, port, copy));
if (SCM_COPY_SOURCE_P)
- SCM_SETCDR (tl2, scm_cons (SCM_NIMP (tmp) && SCM_CONSP (tmp)
+ SCM_SETCDR (tl2, scm_cons (SCM_CONSP (tmp)
? *copy
: tmp,
SCM_EOL));
@@ -678,7 +678,7 @@ scm_lreadrecparen (SCM *tok_buf, SCM port, char *name, SCM *copy)
}
tl = SCM_SETCDR (tl, scm_cons (tmp, SCM_EOL));
if (SCM_COPY_SOURCE_P)
- tl2 = SCM_SETCDR (tl2, scm_cons (SCM_NIMP (tmp) && SCM_CONSP (tmp)
+ tl2 = SCM_SETCDR (tl2, scm_cons (SCM_CONSP (tmp)
? *copy
: tmp,
SCM_EOL));
diff --git a/libguile/regex-posix.c b/libguile/regex-posix.c
index ea4d6bad5..3fb2ba61a 100644
--- a/libguile/regex-posix.c
+++ b/libguile/regex-posix.c
@@ -139,7 +139,7 @@ GUILE_PROC (scm_regexp_p, "regexp?", 1, 0, 0,
@code{#f} otherwise.")
#define FUNC_NAME s_scm_regexp_p
{
- return SCM_BOOL(SCM_NIMP (x) && SCM_RGXP (x));
+ return SCM_BOOL(SCM_RGXP (x));
}
#undef FUNC_NAME
diff --git a/libguile/root.c b/libguile/root.c
index 023990194..59ecacda5 100644
--- a/libguile/root.c
+++ b/libguile/root.c
@@ -119,7 +119,7 @@ scm_make_root (SCM parent)
root_state = (scm_root_state *) scm_must_malloc (sizeof (scm_root_state),
"scm_make_root");
- if (SCM_NIMP (parent) && SCM_ROOTP (parent))
+ if (SCM_ROOTP (parent))
{
memcpy (root_state, SCM_ROOT_STATE (parent), sizeof (scm_root_state));
scm_copy_fluids (root_state);
diff --git a/libguile/scm_validate.h b/libguile/scm_validate.h
index 807a016b4..d47392125 100644
--- a/libguile/scm_validate.h
+++ b/libguile/scm_validate.h
@@ -1,4 +1,4 @@
-/* $Id: scm_validate.h,v 1.6 1999-12-13 00:52:43 gjb Exp $ */
+/* $Id: scm_validate.h,v 1.7 1999-12-16 20:48:04 gjb Exp $ */
/* Copyright (C) 1999 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
@@ -223,6 +223,9 @@
do { SCM_ASSERT (SCM_NIMP (a) && SCM_ASYNCP (a), a, pos, FUNC_NAME); \
cvar = SCM_ASYNC(a); } while (0)
+#define SCM_VALIDATE_THREAD(pos,a) \
+ do { SCM_ASSERT (SCM_NIMP (a) && SCM_THREADP (a), a, pos, FUNC_NAME); } while (0)
+
#define SCM_VALIDATE_THUNK(pos,thunk) \
do { SCM_ASSERT (SCM_NFALSEP (scm_thunk_p (thunk)), thunk, pos, FUNC_NAME); } while (0)
diff --git a/libguile/socket.c b/libguile/socket.c
index 8732d9103..22a601255 100644
--- a/libguile/socket.c
+++ b/libguile/socket.c
@@ -309,7 +309,7 @@ The return value is unspecified.")
{
#ifdef HAVE_STRUCT_LINGER
struct linger ling;
- SCM_ASSERT (SCM_NIMP (value) && SCM_CONSP (value)
+ SCM_ASSERT (SCM_CONSP (value)
&& SCM_INUMP (SCM_CAR (value))
&& SCM_INUMP (SCM_CDR (value)),
value, SCM_ARG4, FUNC_NAME);
@@ -319,7 +319,7 @@ The return value is unspecified.")
memcpy (optval, (void *) &ling, optlen);
#else
scm_sizet ling;
- SCM_ASSERT (SCM_NIMP (value) && SCM_CONSP (value)
+ SCM_ASSERT (SCM_CONSP (value)
&& SCM_INUMP (SCM_CAR (value))
&& SCM_INUMP (SCM_CDR (value)),
value, SCM_ARG4, FUNC_NAME);
@@ -416,7 +416,7 @@ scm_fill_sockaddr (int fam,SCM address,SCM *args,int which_arg,const char *proc,
soka->sin_family = AF_INET;
soka->sin_addr.s_addr =
htonl (scm_num2ulong (address, (char *) which_arg, proc));
- SCM_ASSERT (SCM_NIMP (*args) && SCM_CONSP (*args), *args,
+ SCM_ASSERT (SCM_CONSP (*args), *args,
which_arg + 1, proc);
isport = SCM_CAR (*args);
*args = SCM_CDR (*args);
@@ -434,7 +434,7 @@ scm_fill_sockaddr (int fam,SCM address,SCM *args,int which_arg,const char *proc,
scm_must_malloc (sizeof (struct sockaddr_un), proc);
memset (soka, 0, sizeof (struct sockaddr_un));
soka->sun_family = AF_UNIX;
- SCM_ASSERT (SCM_NIMP (address) && SCM_ROSTRINGP (address), address,
+ SCM_ASSERT (SCM_ROSTRINGP (address), address,
which_arg, proc);
memcpy (soka->sun_path, SCM_ROCHARS (address),
1 + SCM_ROLENGTH (address));
diff --git a/libguile/srcprop.c b/libguile/srcprop.c
index 7cd37ad39..a21acc049 100644
--- a/libguile/srcprop.c
+++ b/libguile/srcprop.c
@@ -261,7 +261,7 @@ GUILE_PROC (scm_set_source_property_x, "set-source-property!", 3, 0, 0,
if (scm_sym_breakpoint == key)
{
if (SCM_FALSEP (datum))
- CLEARSRCPROPBRK (SCM_NIMP (p) && SRCPROPSP (p)
+ CLEARSRCPROPBRK (SRCPROPSP (p)
? p
: SCM_WHASHSET (scm_source_whash, h,
scm_make_srcprops (0,
@@ -270,7 +270,7 @@ GUILE_PROC (scm_set_source_property_x, "set-source-property!", 3, 0, 0,
SCM_UNDEFINED,
p)));
else
- SETSRCPROPBRK (SCM_NIMP (p) && SRCPROPSP (p)
+ SETSRCPROPBRK (SRCPROPSP (p)
? p
: SCM_WHASHSET (scm_source_whash, h,
scm_make_srcprops (0,
@@ -282,7 +282,7 @@ GUILE_PROC (scm_set_source_property_x, "set-source-property!", 3, 0, 0,
else if (scm_sym_line == key)
{
SCM_VALIDATE_INT(3,datum);
- if (SCM_NIMP (p) && SRCPROPSP (p))
+ if (SRCPROPSP (p))
SETSRCPROPLINE (p, SCM_INUM (datum));
else
SCM_WHASHSET (scm_source_whash, h,
@@ -292,7 +292,7 @@ GUILE_PROC (scm_set_source_property_x, "set-source-property!", 3, 0, 0,
else if (scm_sym_column == key)
{
SCM_VALIDATE_INT(3,datum);
- if (SCM_NIMP (p) && SRCPROPSP (p))
+ if (SRCPROPSP (p))
SETSRCPROPCOL (p, SCM_INUM (datum));
else
SCM_WHASHSET (scm_source_whash, h,
@@ -301,14 +301,14 @@ GUILE_PROC (scm_set_source_property_x, "set-source-property!", 3, 0, 0,
}
else if (scm_sym_filename == key)
{
- if (SCM_NIMP (p) && SRCPROPSP (p))
+ if (SRCPROPSP (p))
SRCPROPFNAME (p) = datum;
else
SCM_WHASHSET (scm_source_whash, h, scm_make_srcprops (0, 0, datum, SCM_UNDEFINED, p));
}
else if (scm_sym_filename == key)
{
- if (SCM_NIMP (p) && SRCPROPSP (p))
+ if (SRCPROPSP (p))
SRCPROPCOPY (p) = datum;
else
SCM_WHASHSET (scm_source_whash, h, scm_make_srcprops (0, 0, SCM_UNDEFINED, datum, p));
diff --git a/libguile/stacks.c b/libguile/stacks.c
index 2f56ea662..7cf4d55c9 100644
--- a/libguile/stacks.c
+++ b/libguile/stacks.c
@@ -226,7 +226,7 @@ static SCM
get_applybody ()
{
SCM proc = SCM_CDR (scm_sym2vcell (scm_sym_apply, SCM_BOOL_F, SCM_BOOL_F));
- if (SCM_NIMP (proc) && SCM_CLOSUREP (proc))
+ if (SCM_CLOSUREP (proc))
return SCM_CADR (SCM_CODE (proc));
else
return SCM_UNDEFINED;
@@ -415,7 +415,7 @@ GUILE_PROC (scm_stack_p, "stack?", 1, 0, 0,
"Return @code{#t} if @var{obj} is a calling stack.")
#define FUNC_NAME s_scm_stack_p
{
- return SCM_BOOL(SCM_NIMP (obj) && SCM_STACKP (obj));
+ return SCM_BOOL(SCM_STACKP (obj));
}
#undef FUNC_NAME
@@ -431,7 +431,7 @@ GUILE_PROC (scm_make_stack, "make-stack", 0, 0, 1,
SCM stack, id;
SCM obj, inner_cut, outer_cut;
- SCM_ASSERT (SCM_NIMP (args) && SCM_CONSP (args),
+ SCM_ASSERT (SCM_CONSP (args),
SCM_FUNC_NAME, SCM_WNA, NULL);
obj = SCM_CAR (args);
args = SCM_CDR (args);
@@ -480,11 +480,11 @@ GUILE_PROC (scm_make_stack, "make-stack", 0, 0, 1,
SCM_STACK (stack) -> length = n;
/* Narrow the stack according to the arguments given to scm_make_stack. */
- while (n > 0 && SCM_NIMP (args) && SCM_CONSP (args))
+ while (n > 0 && SCM_CONSP (args))
{
inner_cut = SCM_CAR (args);
args = SCM_CDR (args);
- if (SCM_NIMP (args) && SCM_CONSP (args))
+ if (SCM_CONSP (args))
{
outer_cut = SCM_CAR (args);
args = SCM_CDR (args);
@@ -580,7 +580,7 @@ GUILE_PROC (scm_frame_p, "frame?", 1, 0, 0,
"")
#define FUNC_NAME s_scm_frame_p
{
- return SCM_BOOL(SCM_NIMP (obj) && SCM_FRAMEP (obj));
+ return SCM_BOOL(SCM_FRAMEP (obj));
}
#undef FUNC_NAME
diff --git a/libguile/stime.c b/libguile/stime.c
index e266d03eb..f3a0438c7 100644
--- a/libguile/stime.c
+++ b/libguile/stime.c
@@ -311,7 +311,7 @@ setzone (SCM zone, int pos, const char *subr)
char *buf;
/* if zone was supplied, set the environment temporarily. */
- SCM_ASSERT (SCM_NIMP (zone) && SCM_ROSTRINGP (zone), zone, pos, subr);
+ SCM_ASSERT (SCM_ROSTRINGP (zone), zone, pos, subr);
SCM_COERCE_SUBSTR (zone);
buf = scm_must_malloc (SCM_LENGTH (zone) + sizeof (tzvar) + 1,
subr);
@@ -436,7 +436,7 @@ bdtime2c (SCM sbd_time, struct tm *lt, int pos, const char *subr)
SCM *velts;
int i;
- SCM_ASSERT (SCM_NIMP (sbd_time) && SCM_VECTORP (sbd_time)
+ SCM_ASSERT (SCM_VECTORP (sbd_time)
&& SCM_LENGTH (sbd_time) == 11,
sbd_time, pos, subr);
velts = SCM_VELTS (sbd_time);
@@ -444,8 +444,7 @@ bdtime2c (SCM sbd_time, struct tm *lt, int pos, const char *subr)
{
SCM_ASSERT (SCM_INUMP (velts[i]), sbd_time, pos, subr);
}
- SCM_ASSERT (SCM_FALSEP (velts[10])
- || (SCM_NIMP (velts[10]) && SCM_STRINGP (velts[10])),
+ SCM_ASSERT (SCM_FALSEP (velts[10]) || SCM_STRINGP (velts[10]),
sbd_time, pos, subr);
lt->tm_sec = SCM_INUM (velts[0]);
diff --git a/libguile/strings.c b/libguile/strings.c
index 2a02fcb3d..1a155b059 100644
--- a/libguile/strings.c
+++ b/libguile/strings.c
@@ -114,7 +114,7 @@ GUILE_PROC(scm_string, "string", 0, 0, 1,
for (len = 0, s = chrs; s != SCM_EOL; s = SCM_CDR (s))
if (SCM_ICHRP (SCM_CAR (s)))
len += 1;
- else if (SCM_NIMP (SCM_CAR (s)) && SCM_ROSTRINGP (SCM_CAR (s)))
+ else if (SCM_ROSTRINGP (SCM_CAR (s)))
len += SCM_ROLENGTH (SCM_CAR (s));
else
{
diff --git a/libguile/strop.c b/libguile/strop.c
index 2aecdecbb..c240b1ca1 100644
--- a/libguile/strop.c
+++ b/libguile/strop.c
@@ -44,7 +44,7 @@ scm_i_index (SCM *str, SCM chr, int direction, SCM sub_start,
int upper;
int ch;
- SCM_ASSERT (SCM_NIMP (*str) && SCM_ROSTRINGP (*str), *str, SCM_ARG1, why);
+ SCM_ASSERT (SCM_ROSTRINGP (*str), *str, SCM_ARG1, why);
SCM_ASSERT (SCM_ICHRP (chr), chr, SCM_ARG2, why);
if (sub_start == SCM_BOOL_F)
diff --git a/libguile/strports.c b/libguile/strports.c
index 40677cb10..ea19523e1 100644
--- a/libguile/strports.c
+++ b/libguile/strports.c
@@ -258,7 +258,7 @@ scm_mkstrport (SCM pos, SCM str, long modes, const char *caller)
int str_len;
SCM_ASSERT (SCM_INUMP(pos) && SCM_INUM(pos) >= 0, pos, SCM_ARG1, caller);
- SCM_ASSERT (SCM_NIMP(str) && SCM_ROSTRINGP(str), str, SCM_ARG1, caller);
+ SCM_ASSERT (SCM_ROSTRINGP(str), str, SCM_ARG1, caller);
str_len = SCM_ROLENGTH (str);
if (SCM_INUM (pos) > str_len)
scm_out_of_range (caller, pos);
diff --git a/libguile/struct.c b/libguile/struct.c
index f3c50509a..1c039f1d5 100644
--- a/libguile/struct.c
+++ b/libguile/struct.c
@@ -245,7 +245,7 @@ GUILE_PROC (scm_struct_p, "struct?", 1, 0, 0,
"Return #t iff @var{obj} is a structure object, else #f.")
#define FUNC_NAME s_scm_struct_p
{
- return SCM_BOOL(SCM_NIMP (x) && SCM_STRUCTP (x));
+ return SCM_BOOL(SCM_STRUCTP (x));
}
#undef FUNC_NAME
diff --git a/libguile/symbols.c b/libguile/symbols.c
index ee39fca1e..cd43b625d 100644
--- a/libguile/symbols.c
+++ b/libguile/symbols.c
@@ -480,7 +480,7 @@ table; instead, simply return @code{#f}.")
SCM_VALIDATE_ROSTRING(2,s);
SCM_ASSERT((o == SCM_BOOL_F)
|| (o == SCM_BOOL_T)
- || (SCM_NIMP(o) && SCM_VECTORP(o)),
+ || (SCM_VECTORP(o)),
o, SCM_ARG1, FUNC_NAME);
softness = ((softp != SCM_UNDEFINED) && (softp != SCM_BOOL_F));
diff --git a/libguile/throw.c b/libguile/throw.c
index 59e4ad9d6..8b0c3676d 100644
--- a/libguile/throw.c
+++ b/libguile/throw.c
@@ -551,7 +551,7 @@ this call to @code{catch}.")
{
struct scm_body_thunk_data c;
- SCM_ASSERT ((SCM_NIMP(tag) && SCM_SYMBOLP(tag)) || tag == SCM_BOOL_T,
+ SCM_ASSERT (SCM_SYMBOLP(tag) || tag == SCM_BOOL_T,
tag, SCM_ARG1, FUNC_NAME);
c.tag = tag;
@@ -576,8 +576,7 @@ GUILE_PROC(scm_lazy_catch, "lazy-catch", 3, 0, 0,
{
struct scm_body_thunk_data c;
- SCM_ASSERT ((SCM_NIMP(tag) && SCM_SYMBOLP(tag))
- || (tag == SCM_BOOL_T),
+ SCM_ASSERT (SCM_SYMBOLP(tag) || (tag == SCM_BOOL_T),
tag, SCM_ARG1, FUNC_NAME);
c.tag = tag;
@@ -634,7 +633,7 @@ scm_ithrow (SCM key, SCM args, int noreturn)
abort ();
dynpair = SCM_CAR (winds);
- if (SCM_NIMP (dynpair) && SCM_CONSP (dynpair))
+ if (SCM_CONSP (dynpair))
{
SCM this_key = SCM_CAR (dynpair);
diff --git a/libguile/unif.c b/libguile/unif.c
index b595e6297..f49e6aa1d 100644
--- a/libguile/unif.c
+++ b/libguile/unif.c
@@ -179,7 +179,7 @@ scm_make_uve (long k, SCM prot)
else
type = scm_tc7_ivect;
}
- else if (SCM_NIMP (prot) && SCM_SYMBOLP (prot) && (1 == SCM_LENGTH (prot)))
+ else if (SCM_SYMBOLP (prot) && (1 == SCM_LENGTH (prot)))
{
char s;
@@ -320,12 +320,12 @@ loop:
# ifdef SCM_FLOATS
# ifdef SCM_SINGLES
case scm_tc7_fvect:
- return nprot || SCM_BOOL(SCM_NIMP(prot) && SCM_SINGP(prot));
+ return nprot || SCM_BOOL(SCM_SINGP(prot));
# endif
case scm_tc7_dvect:
- return nprot || SCM_BOOL(SCM_NIMP(prot) && SCM_REALP(prot));
+ return nprot || SCM_BOOL(SCM_REALP(prot));
case scm_tc7_cvect:
- return nprot || SCM_BOOL(SCM_NIMP(prot) && SCM_CPLXP(prot));
+ return nprot || SCM_BOOL(SCM_CPLXP(prot));
# endif
case scm_tc7_vector:
case scm_tc7_wvect:
@@ -500,7 +500,7 @@ scm_shap2ra (SCM args, const char *what)
s_bad_spec, what);
s->lbnd = SCM_INUM (SCM_CAR (spec));
sp = SCM_CDR (spec);
- SCM_ASSERT (SCM_NIMP (sp) && SCM_CONSP (sp)
+ SCM_ASSERT (SCM_CONSP (sp)
&& SCM_INUMP (SCM_CAR (sp)) && SCM_NULLP (SCM_CDR (sp)),
spec, s_bad_spec, what);
s->ubnd = SCM_INUM (SCM_CAR (sp));
@@ -531,7 +531,7 @@ Creates and returns a uniform array or vector of type corresponding to
if (!SCM_UNBNDP (fill))
scm_array_fill_x (answer, fill);
- else if (SCM_NIMP (prot) && SCM_SYMBOLP (prot))
+ else if (SCM_SYMBOLP (prot))
scm_array_fill_x (answer, SCM_MAKINUM (0));
else
scm_array_fill_x (answer, prot);
@@ -540,8 +540,8 @@ Creates and returns a uniform array or vector of type corresponding to
else
dims = scm_cons (dims, SCM_EOL);
}
- SCM_ASSERT (SCM_NULLP (dims) || (SCM_NIMP (dims) && SCM_CONSP (dims)),
- dims, SCM_ARG1, FUNC_NAME);
+ SCM_ASSERT (SCM_NULLP (dims) || SCM_CONSP (dims),
+ dims, SCM_ARG1, FUNC_NAME);
ra = scm_shap2ra (dims, FUNC_NAME);
SCM_SETOR_CAR (ra, SCM_ARRAY_CONTIGUOUS);
s = SCM_ARRAY_DIMS (ra);
@@ -587,7 +587,7 @@ Creates and returns a uniform array or vector of type corresponding to
{
scm_array_fill_x (ra, fill);
}
- else if (SCM_NIMP (prot) && SCM_SYMBOLP (prot))
+ else if (SCM_SYMBOLP (prot))
scm_array_fill_x (ra, SCM_MAKINUM (0));
else
scm_array_fill_x (ra, prot);
@@ -1327,7 +1327,7 @@ GUILE_PROC(scm_array_set_x, "array-set!", 2, 0, 1,
((double *) SCM_CDR (v))[pos] = scm_num2dbl(obj, FUNC_NAME); break;
break;
case scm_tc7_cvect:
- SCM_ASRTGO (SCM_NIMP (obj) && SCM_INEXP (obj), badobj);
+ SCM_ASRTGO (SCM_INEXP (obj), badobj);
((double *) SCM_CDR (v))[2 * pos] = SCM_REALPART (obj);
((double *) SCM_CDR (v))[2 * pos + 1] = SCM_CPLXP (obj) ? SCM_IMAG (obj) : 0.0;
break;
@@ -1481,7 +1481,7 @@ returned by @code{(current-input-port)}.")
port_or_fd = scm_cur_inp;
else
SCM_ASSERT (SCM_INUMP (port_or_fd)
- || (SCM_NIMP (port_or_fd) && SCM_OPINPORTP (port_or_fd)),
+ || (SCM_OPINPORTP (port_or_fd)),
port_or_fd, SCM_ARG2, FUNC_NAME);
vlen = SCM_LENGTH (v);
@@ -1639,7 +1639,7 @@ omitted, in which case it defaults to the value returned by
port_or_fd = scm_cur_outp;
else
SCM_ASSERT (SCM_INUMP (port_or_fd)
- || (SCM_NIMP (port_or_fd) && SCM_OPOUTPORTP (port_or_fd)),
+ || (SCM_OPOUTPORTP (port_or_fd)),
port_or_fd, SCM_ARG2, FUNC_NAME);
vlen = SCM_LENGTH (v);
diff --git a/libguile/variable.c b/libguile/variable.c
index db831f569..e0b3643ad 100644
--- a/libguile/variable.c
+++ b/libguile/variable.c
@@ -144,7 +144,7 @@ GUILE_PROC(scm_variable_p, "variable?", 1, 0, 0,
"")
#define FUNC_NAME s_scm_variable_p
{
- return SCM_BOOL(SCM_NIMP(obj) && SCM_VARIABLEP (obj));
+ return SCM_BOOL(SCM_VARIABLEP (obj));
}
#undef FUNC_NAME
diff --git a/libguile/vectors.c b/libguile/vectors.c
index 96dad819b..8b0f8b522 100644
--- a/libguile/vectors.c
+++ b/libguile/vectors.c
@@ -137,7 +137,7 @@ SCM_GPROC(s_vector_length, "vector-length", 1, 0, 0, scm_vector_length, g_vector
SCM
scm_vector_length(SCM v)
{
- SCM_GASSERT1(SCM_NIMP(v) && SCM_VECTORP(v),
+ SCM_GASSERT1(SCM_VECTORP(v),
g_vector_length, v, SCM_ARG1, s_vector_length);
return SCM_MAKINUM(SCM_LENGTH(v));
}
@@ -166,7 +166,7 @@ SCM_GPROC(s_vector_ref, "vector-ref", 2, 0, 0, scm_vector_ref, g_vector_ref);
SCM
scm_vector_ref (SCM v, SCM k)
{
- SCM_GASSERT2 (SCM_NIMP (v) && SCM_VECTORP (v),
+ SCM_GASSERT2 (SCM_VECTORP (v),
g_vector_ref, v, k, SCM_ARG1, s_vector_ref);
SCM_GASSERT2 (SCM_INUMP (k),
g_vector_ref, v, k, SCM_ARG2, s_vector_ref);
@@ -180,7 +180,7 @@ SCM_GPROC(s_vector_set_x, "vector-set!", 3, 0, 0, scm_vector_set_x, g_vector_set
SCM
scm_vector_set_x(SCM v, SCM k, SCM obj)
{
- SCM_GASSERTn (SCM_NIMP(v) && SCM_VECTORP(v),
+ SCM_GASSERTn (SCM_VECTORP(v),
g_vector_set_x, SCM_LIST3 (v, k, obj),
SCM_ARG1, s_vector_set_x);
SCM_GASSERTn (SCM_INUMP(k),
diff --git a/libguile/weaks.c b/libguile/weaks.c
index 4f5b68e45..0b5d0198d 100644
--- a/libguile/weaks.c
+++ b/libguile/weaks.c
@@ -95,7 +95,7 @@ its arguments while @code{list->weak-vector} uses its only argument
res = scm_make_weak_vector (SCM_MAKINUM (i), SCM_UNSPECIFIED);
data = SCM_VELTS (res);
for (;
- i && SCM_NIMP (l) && SCM_CONSP (l);
+ i && SCM_CONSP (l);
--i, l = SCM_CDR (l))
*data++ = SCM_CAR (l);
return res;
@@ -109,7 +109,7 @@ GUILE_PROC(scm_weak_vector_p, "weak-vector?", 1, 0, 0,
hashes are also weak vectors.")
#define FUNC_NAME s_scm_weak_vector_p
{
- return SCM_BOOL(SCM_NIMP (x) && SCM_WVECTP (x) && !SCM_IS_WHVEC (x));
+ return SCM_BOOL(SCM_WVECTP (x) && !SCM_IS_WHVEC (x));
}
#undef FUNC_NAME
@@ -182,7 +182,7 @@ that a doubly weak hash table is neither a weak key nor a weak value
hash table.")
#define FUNC_NAME s_scm_weak_key_hash_table_p
{
- return SCM_BOOL(SCM_NIMP (x) && SCM_WVECTP (x) && SCM_IS_WHVEC(x));
+ return SCM_BOOL(SCM_WVECTP (x) && SCM_IS_WHVEC(x));
}
#undef FUNC_NAME
@@ -192,7 +192,7 @@ GUILE_PROC (scm_weak_value_hash_table_p, "weak-value-hash-table?", 1, 0, 0,
"")
#define FUNC_NAME s_scm_weak_value_hash_table_p
{
- return SCM_BOOL(SCM_NIMP (x) && SCM_WVECTP (x) && SCM_IS_WHVEC_V(x));
+ return SCM_BOOL(SCM_WVECTP (x) && SCM_IS_WHVEC_V(x));
}
#undef FUNC_NAME
@@ -202,7 +202,7 @@ GUILE_PROC (scm_doubly_weak_hash_table_p, "doubly-weak-hash-table?", 1, 0, 0,
"")
#define FUNC_NAME s_scm_doubly_weak_hash_table_p
{
- return SCM_BOOL(SCM_NIMP (x) && SCM_WVECTP (x) && SCM_IS_WHVEC_B (x));
+ return SCM_BOOL(SCM_WVECTP (x) && SCM_IS_WHVEC_B (x));
}
#undef FUNC_NAME