* *.c, snarf.h: Replace GUILE_PROC1 with SCM_DEFINE1 throughout.

This commit is contained in:
Greg J. Badros 2000-01-06 19:51:45 +00:00
commit c3ee75204c
7 changed files with 38 additions and 38 deletions

View file

@ -61,7 +61,7 @@ SCM_DEFINE (scm_char_p, "char?", 1, 0, 0,
} }
#undef FUNC_NAME #undef FUNC_NAME
GUILE_PROC1 (scm_char_eq_p, "char=?", scm_tc7_rpsubr, SCM_DEFINE1 (scm_char_eq_p, "char=?", scm_tc7_rpsubr,
(SCM x, SCM y), (SCM x, SCM y),
"Return #t iff X is the same character as Y, else #f.") "Return #t iff X is the same character as Y, else #f.")
#define FUNC_NAME s_scm_char_eq_p #define FUNC_NAME s_scm_char_eq_p
@ -73,7 +73,7 @@ GUILE_PROC1 (scm_char_eq_p, "char=?", scm_tc7_rpsubr,
#undef FUNC_NAME #undef FUNC_NAME
GUILE_PROC1 (scm_char_less_p, "char<?", scm_tc7_rpsubr, SCM_DEFINE1 (scm_char_less_p, "char<?", scm_tc7_rpsubr,
(SCM x, SCM y), (SCM x, SCM y),
"Return #t iff X is less than Y in the Ascii sequence, else #f.") "Return #t iff X is less than Y in the Ascii sequence, else #f.")
#define FUNC_NAME s_scm_char_less_p #define FUNC_NAME s_scm_char_less_p
@ -84,7 +84,7 @@ GUILE_PROC1 (scm_char_less_p, "char<?", scm_tc7_rpsubr,
} }
#undef FUNC_NAME #undef FUNC_NAME
GUILE_PROC1 (scm_char_leq_p, "char<=?", scm_tc7_rpsubr, SCM_DEFINE1 (scm_char_leq_p, "char<=?", scm_tc7_rpsubr,
(SCM x, SCM y), (SCM x, SCM y),
"Return #t iff X is less than or equal to Y in the Ascii sequence, else #f.") "Return #t iff X is less than or equal to Y in the Ascii sequence, else #f.")
#define FUNC_NAME s_scm_char_leq_p #define FUNC_NAME s_scm_char_leq_p
@ -95,7 +95,7 @@ GUILE_PROC1 (scm_char_leq_p, "char<=?", scm_tc7_rpsubr,
} }
#undef FUNC_NAME #undef FUNC_NAME
GUILE_PROC1 (scm_char_gr_p, "char>?", scm_tc7_rpsubr, SCM_DEFINE1 (scm_char_gr_p, "char>?", scm_tc7_rpsubr,
(SCM x, SCM y), (SCM x, SCM y),
"Return #t iff X is greater than Y in the Ascii sequence, else #f.") "Return #t iff X is greater than Y in the Ascii sequence, else #f.")
#define FUNC_NAME s_scm_char_gr_p #define FUNC_NAME s_scm_char_gr_p
@ -106,7 +106,7 @@ GUILE_PROC1 (scm_char_gr_p, "char>?", scm_tc7_rpsubr,
} }
#undef FUNC_NAME #undef FUNC_NAME
GUILE_PROC1 (scm_char_geq_p, "char>=?", scm_tc7_rpsubr, SCM_DEFINE1 (scm_char_geq_p, "char>=?", scm_tc7_rpsubr,
(SCM x, SCM y), (SCM x, SCM y),
"Return #t iff X is greater than or equal to Y in the Ascii sequence, else #f.") "Return #t iff X is greater than or equal to Y in the Ascii sequence, else #f.")
#define FUNC_NAME s_scm_char_geq_p #define FUNC_NAME s_scm_char_geq_p
@ -117,7 +117,7 @@ GUILE_PROC1 (scm_char_geq_p, "char>=?", scm_tc7_rpsubr,
} }
#undef FUNC_NAME #undef FUNC_NAME
GUILE_PROC1 (scm_char_ci_eq_p, "char-ci=?", scm_tc7_rpsubr, SCM_DEFINE1 (scm_char_ci_eq_p, "char-ci=?", scm_tc7_rpsubr,
(SCM x, SCM y), (SCM x, SCM y),
"Return #t iff X is the same character as Y ignoring case, else #f.") "Return #t iff X is the same character as Y ignoring case, else #f.")
#define FUNC_NAME s_scm_char_ci_eq_p #define FUNC_NAME s_scm_char_ci_eq_p
@ -128,7 +128,7 @@ GUILE_PROC1 (scm_char_ci_eq_p, "char-ci=?", scm_tc7_rpsubr,
} }
#undef FUNC_NAME #undef FUNC_NAME
GUILE_PROC1 (scm_char_ci_less_p, "char-ci<?", scm_tc7_rpsubr, SCM_DEFINE1 (scm_char_ci_less_p, "char-ci<?", scm_tc7_rpsubr,
(SCM x, SCM y), (SCM x, SCM y),
"Return #t iff X is less than Y in the Ascii sequence ignoring case, else #f.") "Return #t iff X is less than Y in the Ascii sequence ignoring case, else #f.")
#define FUNC_NAME s_scm_char_ci_less_p #define FUNC_NAME s_scm_char_ci_less_p
@ -139,7 +139,7 @@ GUILE_PROC1 (scm_char_ci_less_p, "char-ci<?", scm_tc7_rpsubr,
} }
#undef FUNC_NAME #undef FUNC_NAME
GUILE_PROC1 (scm_char_ci_leq_p, "char-ci<=?", scm_tc7_rpsubr, SCM_DEFINE1 (scm_char_ci_leq_p, "char-ci<=?", scm_tc7_rpsubr,
(SCM x, SCM y), (SCM x, SCM y),
"Return #t iff X is less than or equal to Y in the Ascii sequence ignoring case, else #f.") "Return #t iff X is less than or equal to Y in the Ascii sequence ignoring case, else #f.")
#define FUNC_NAME s_scm_char_ci_leq_p #define FUNC_NAME s_scm_char_ci_leq_p
@ -150,7 +150,7 @@ GUILE_PROC1 (scm_char_ci_leq_p, "char-ci<=?", scm_tc7_rpsubr,
} }
#undef FUNC_NAME #undef FUNC_NAME
GUILE_PROC1 (scm_char_ci_gr_p, "char-ci>?", scm_tc7_rpsubr, SCM_DEFINE1 (scm_char_ci_gr_p, "char-ci>?", scm_tc7_rpsubr,
(SCM x, SCM y), (SCM x, SCM y),
"Return #t iff X is greater than Y in the Ascii sequence ignoring case, else #f.") "Return #t iff X is greater than Y in the Ascii sequence ignoring case, else #f.")
#define FUNC_NAME s_scm_char_ci_gr_p #define FUNC_NAME s_scm_char_ci_gr_p
@ -161,7 +161,7 @@ GUILE_PROC1 (scm_char_ci_gr_p, "char-ci>?", scm_tc7_rpsubr,
} }
#undef FUNC_NAME #undef FUNC_NAME
GUILE_PROC1 (scm_char_ci_geq_p, "char-ci>=?", scm_tc7_rpsubr, SCM_DEFINE1 (scm_char_ci_geq_p, "char-ci>=?", scm_tc7_rpsubr,
(SCM x, SCM y), (SCM x, SCM y),
"Return #t iff X is greater than or equal to Y in the Ascii sequence ignoring case, else #f.") "Return #t iff X is greater than or equal to Y in the Ascii sequence ignoring case, else #f.")
#define FUNC_NAME s_scm_char_ci_geq_p #define FUNC_NAME s_scm_char_ci_geq_p

View file

@ -54,7 +54,7 @@
#include "scm_validate.h" #include "scm_validate.h"
#include "eq.h" #include "eq.h"
GUILE_PROC1 (scm_eq_p, "eq?", scm_tc7_rpsubr, SCM_DEFINE1 (scm_eq_p, "eq?", scm_tc7_rpsubr,
(SCM x, SCM y), (SCM x, SCM y),
"") "")
#define FUNC_NAME s_scm_eq_p #define FUNC_NAME s_scm_eq_p
@ -64,7 +64,7 @@ GUILE_PROC1 (scm_eq_p, "eq?", scm_tc7_rpsubr,
#undef FUNC_NAME #undef FUNC_NAME
GUILE_PROC1 (scm_eqv_p, "eqv?", scm_tc7_rpsubr, SCM_DEFINE1 (scm_eqv_p, "eqv?", scm_tc7_rpsubr,
(SCM x, SCM y), (SCM x, SCM y),
"") "")
#define FUNC_NAME s_scm_eqv_p #define FUNC_NAME s_scm_eqv_p
@ -89,7 +89,7 @@ GUILE_PROC1 (scm_eqv_p, "eqv?", scm_tc7_rpsubr,
#undef FUNC_NAME #undef FUNC_NAME
GUILE_PROC1 (scm_equal_p, "equal?", scm_tc7_rpsubr, SCM_DEFINE1 (scm_equal_p, "equal?", scm_tc7_rpsubr,
(SCM x, SCM y), (SCM x, SCM y),
"") "")
#define FUNC_NAME s_scm_equal_p #define FUNC_NAME s_scm_equal_p

View file

@ -131,7 +131,7 @@ scm_m_while (SCM exp, SCM env)
/* GJB:FIXME:: why does this return scm_nil instead of SCM_BOOL_F? /* GJB:FIXME:: why does this return scm_nil instead of SCM_BOOL_F?
Could use SCM_BOOL, below, otherwise */ Could use SCM_BOOL, below, otherwise */
GUILE_PROC1 (scm_nil_eq, "nil-eq", scm_tc7_rpsubr, SCM_DEFINE1 (scm_nil_eq, "nil-eq", scm_tc7_rpsubr,
(SCM x, SCM y), (SCM x, SCM y),
"") "")
#define FUNC_NAME s_scm_nil_eq #define FUNC_NAME s_scm_nil_eq

View file

@ -510,7 +510,7 @@ scm_lcm (SCM n1, SCM n2)
#endif #endif
#ifndef scm_long2num #ifndef scm_long2num
GUILE_PROC1 (scm_logand, "logand", scm_tc7_asubr, SCM_DEFINE1 (scm_logand, "logand", scm_tc7_asubr,
(SCM n1, SCM n2), (SCM n1, SCM n2),
"Returns the integer which is the bit-wise AND of the two integer "Returns the integer which is the bit-wise AND of the two integer
arguments. arguments.
@ -534,7 +534,7 @@ Example:
} }
#undef FUNC_NAME #undef FUNC_NAME
GUILE_PROC1 (scm_logior, "logior", scm_tc7_asubr, SCM_DEFINE1 (scm_logior, "logior", scm_tc7_asubr,
(SCM n1, SCM n2), (SCM n1, SCM n2),
"Returns the integer which is the bit-wise OR of the two integer "Returns the integer which is the bit-wise OR of the two integer
arguments. arguments.
@ -559,7 +559,7 @@ Example:
} }
#undef FUNC_NAME #undef FUNC_NAME
GUILE_PROC1 (scm_logxor, "logxor", scm_tc7_asubr, SCM_DEFINE1 (scm_logxor, "logxor", scm_tc7_asubr,
(SCM n1, SCM n2), (SCM n1, SCM n2),
"Returns the integer which is the bit-wise XOR of the two integer "Returns the integer which is the bit-wise XOR of the two integer
arguments. arguments.
@ -611,7 +611,7 @@ SCM_DEFINE (scm_logbit_p, "logbit?", 2, 0, 0,
#else #else
GUILE_PROC1 (scm_logand, "logand", scm_tc7_asubr, SCM_DEFINE1 (scm_logand, "logand", scm_tc7_asubr,
(SCM n1, SCM n2), (SCM n1, SCM n2),
"") "")
#define FUNC_NAME s_scm_logand #define FUNC_NAME s_scm_logand
@ -629,7 +629,7 @@ GUILE_PROC1 (scm_logand, "logand", scm_tc7_asubr,
} }
#undef FUNC_NAME #undef FUNC_NAME
GUILE_PROC1 (scm_logior, "logior", scm_tc7_asubr, SCM_DEFINE1 (scm_logior, "logior", scm_tc7_asubr,
(SCM n1, SCM n2), (SCM n1, SCM n2),
"") "")
#define FUNC_NAME s_scm_logior #define FUNC_NAME s_scm_logior
@ -647,7 +647,7 @@ GUILE_PROC1 (scm_logior, "logior", scm_tc7_asubr,
} }
#undef FUNC_NAME #undef FUNC_NAME
GUILE_PROC1 (scm_logxor, "logxor", scm_tc7_asubr, SCM_DEFINE1 (scm_logxor, "logxor", scm_tc7_asubr,
(SCM n1, SCM n2), (SCM n1, SCM n2),
"") "")
#define FUNC_NAME s_scm_logxor #define FUNC_NAME s_scm_logxor
@ -2844,7 +2844,7 @@ scm_less_p (SCM x, SCM y)
} }
GUILE_PROC1 (scm_gr_p, ">", scm_tc7_rpsubr, SCM_DEFINE1 (scm_gr_p, ">", scm_tc7_rpsubr,
(SCM x, SCM y), (SCM x, SCM y),
"") "")
#define FUNC_NAME s_scm_gr_p #define FUNC_NAME s_scm_gr_p
@ -2855,7 +2855,7 @@ GUILE_PROC1 (scm_gr_p, ">", scm_tc7_rpsubr,
GUILE_PROC1 (scm_leq_p, "<=", scm_tc7_rpsubr, SCM_DEFINE1 (scm_leq_p, "<=", scm_tc7_rpsubr,
(SCM x, SCM y), (SCM x, SCM y),
"") "")
#define FUNC_NAME s_scm_leq_p #define FUNC_NAME s_scm_leq_p
@ -2866,7 +2866,7 @@ GUILE_PROC1 (scm_leq_p, "<=", scm_tc7_rpsubr,
GUILE_PROC1 (scm_geq_p, ">=", scm_tc7_rpsubr, SCM_DEFINE1 (scm_geq_p, ">=", scm_tc7_rpsubr,
(SCM x, SCM y), (SCM x, SCM y),
"") "")
#define FUNC_NAME s_scm_geq_p #define FUNC_NAME s_scm_geq_p

View file

@ -2041,8 +2041,8 @@ scm_raequal (SCM ra0, SCM ra1)
} }
#if 0 #if 0
/* GJB:FIXME:: Why not use GUILE_PROC1 for array-equal? */ /* GJB:FIXME:: Why not use SCM_DEFINE1 for array-equal? */
GUILE_PROC1(scm_array_equal_p, "array-equal?", scm_tc7_rpsubr, SCM_DEFINE1 (scm_array_equal_p, "array-equal?", scm_tc7_rpsubr,
(SCM ra0, SCM ra1), (SCM ra0, SCM ra1),
"Returns @code{#t} iff all arguments are arrays with the same shape, the "Returns @code{#t} iff all arguments are arrays with the same shape, the
same type, and have corresponding elements which are either same type, and have corresponding elements which are either

View file

@ -56,7 +56,7 @@
#define SCM_DEFINE(FNAME, PRIMNAME, REQ, OPT, VAR, ARGLIST, DOCSTRING) \ #define SCM_DEFINE(FNAME, PRIMNAME, REQ, OPT, VAR, ARGLIST, DOCSTRING) \
static const char s_ ## FNAME [] = PRIMNAME; \ static const char s_ ## FNAME [] = PRIMNAME; \
SCM FNAME ARGLIST SCM FNAME ARGLIST
#define GUILE_PROC1(FNAME, PRIMNAME, TYPE, ARGLIST, DOCSTRING) \ #define SCM_DEFINE1(FNAME, PRIMNAME, TYPE, ARGLIST, DOCSTRING) \
static const char s_ ## FNAME [] = PRIMNAME; \ static const char s_ ## FNAME [] = PRIMNAME; \
SCM FNAME ARGLIST SCM FNAME ARGLIST
@ -87,7 +87,7 @@ SCM FNAME ARGLIST
%%% scm_make_gsubr (s_ ## FNAME, REQ, OPT, VAR, (SCM (*)(...)) FNAME); \ %%% scm_make_gsubr (s_ ## FNAME, REQ, OPT, VAR, (SCM (*)(...)) FNAME); \
$$$P PRIMNAME #ARGLIST | REQ | OPT | VAR | __FILE__:__LINE__ | @@@ DOCSTRING @!!! $$$P PRIMNAME #ARGLIST | REQ | OPT | VAR | __FILE__:__LINE__ | @@@ DOCSTRING @!!!
#define GUILE_PROC1(FNAME, PRIMNAME, TYPE, ARGLIST, DOCSTRING) \ #define SCM_DEFINE1(FNAME, PRIMNAME, TYPE, ARGLIST, DOCSTRING) \
%%% scm_make_subr (s_ ## FNAME, TYPE, FNAME); \ %%% scm_make_subr (s_ ## FNAME, TYPE, FNAME); \
$$$1 PRIMNAME #ARGLIST | 2 | 0 | 0 | __FILE__:__LINE__ | @@@ DOCSTRING @!!! $$$1 PRIMNAME #ARGLIST | 2 | 0 | 0 | __FILE__:__LINE__ | @@@ DOCSTRING @!!!
@ -117,7 +117,7 @@ $$$R STR | REQ | OPT | VAR | __FILE__:__LINE__ | @@@ CFN @!!!
%%% scm_make_gsubr (s_ ## FNAME, REQ, OPT, VAR, (SCM (*)()) FNAME); \ %%% scm_make_gsubr (s_ ## FNAME, REQ, OPT, VAR, (SCM (*)()) FNAME); \
$$$P PRIMNAME #ARGLIST | REQ | OPT | VAR | __FILE__:__LINE__ | @@@ DOCSTRING @!!! $$$P PRIMNAME #ARGLIST | REQ | OPT | VAR | __FILE__:__LINE__ | @@@ DOCSTRING @!!!
#define GUILE_PROC1(FNAME, PRIMNAME, TYPE, ARGLIST, DOCSTRING) \ #define SCM_DEFINE1(FNAME, PRIMNAME, TYPE, ARGLIST, DOCSTRING) \
%%% scm_make_subr (s_ ## FNAME, TYPE, FNAME); \ %%% scm_make_subr (s_ ## FNAME, TYPE, FNAME); \
$$$1 PRIMNAME #ARGLIST | 2 | 0 | 0 | __FILE__:__LINE__ | @@@ DOCSTRING @!!! $$$1 PRIMNAME #ARGLIST | 2 | 0 | 0 | __FILE__:__LINE__ | @@@ DOCSTRING @!!!

View file

@ -51,7 +51,7 @@
#include "strorder.h" #include "strorder.h"
GUILE_PROC1 (scm_string_equal_p, "string=?", scm_tc7_rpsubr, SCM_DEFINE1 (scm_string_equal_p, "string=?", scm_tc7_rpsubr,
(SCM s1, SCM s2), (SCM s1, SCM s2),
"") "")
#define FUNC_NAME s_scm_string_equal_p #define FUNC_NAME s_scm_string_equal_p
@ -75,7 +75,7 @@ GUILE_PROC1 (scm_string_equal_p, "string=?", scm_tc7_rpsubr,
} }
#undef FUNC_NAME #undef FUNC_NAME
GUILE_PROC1 (scm_string_ci_equal_p, "string-ci=?", scm_tc7_rpsubr, SCM_DEFINE1 (scm_string_ci_equal_p, "string-ci=?", scm_tc7_rpsubr,
(SCM s1, SCM s2), (SCM s1, SCM s2),
"") "")
#define FUNC_NAME s_scm_string_ci_equal_p #define FUNC_NAME s_scm_string_ci_equal_p
@ -99,7 +99,7 @@ GUILE_PROC1 (scm_string_ci_equal_p, "string-ci=?", scm_tc7_rpsubr,
} }
#undef FUNC_NAME #undef FUNC_NAME
GUILE_PROC1 (scm_string_less_p, "string<?", scm_tc7_rpsubr, SCM_DEFINE1 (scm_string_less_p, "string<?", scm_tc7_rpsubr,
(SCM s1, SCM s2), (SCM s1, SCM s2),
"") "")
#define FUNC_NAME s_scm_string_less_p #define FUNC_NAME s_scm_string_less_p
@ -131,7 +131,7 @@ GUILE_PROC1 (scm_string_less_p, "string<?", scm_tc7_rpsubr,
} }
#undef FUNC_NAME #undef FUNC_NAME
GUILE_PROC1 (scm_string_leq_p, "string<=?", scm_tc7_rpsubr, SCM_DEFINE1 (scm_string_leq_p, "string<=?", scm_tc7_rpsubr,
(SCM s1, SCM s2), (SCM s1, SCM s2),
"") "")
#define FUNC_NAME s_scm_string_leq_p #define FUNC_NAME s_scm_string_leq_p
@ -140,7 +140,7 @@ GUILE_PROC1 (scm_string_leq_p, "string<=?", scm_tc7_rpsubr,
} }
#undef FUNC_NAME #undef FUNC_NAME
GUILE_PROC1 (scm_string_gr_p, "string>?", scm_tc7_rpsubr, SCM_DEFINE1 (scm_string_gr_p, "string>?", scm_tc7_rpsubr,
(SCM s1, SCM s2), (SCM s1, SCM s2),
"") "")
#define FUNC_NAME s_scm_string_gr_p #define FUNC_NAME s_scm_string_gr_p
@ -149,7 +149,7 @@ GUILE_PROC1 (scm_string_gr_p, "string>?", scm_tc7_rpsubr,
} }
#undef FUNC_NAME #undef FUNC_NAME
GUILE_PROC1 (scm_string_geq_p, "string>=?", scm_tc7_rpsubr, SCM_DEFINE1 (scm_string_geq_p, "string>=?", scm_tc7_rpsubr,
(SCM s1, SCM s2), (SCM s1, SCM s2),
"") "")
#define FUNC_NAME s_scm_string_geq_p #define FUNC_NAME s_scm_string_geq_p
@ -158,7 +158,7 @@ GUILE_PROC1 (scm_string_geq_p, "string>=?", scm_tc7_rpsubr,
} }
#undef FUNC_NAME #undef FUNC_NAME
GUILE_PROC1 (scm_string_ci_less_p, "string-ci<?", scm_tc7_rpsubr, SCM_DEFINE1 (scm_string_ci_less_p, "string-ci<?", scm_tc7_rpsubr,
(SCM s1, SCM s2), (SCM s1, SCM s2),
"") "")
#define FUNC_NAME s_scm_string_ci_less_p #define FUNC_NAME s_scm_string_ci_less_p
@ -182,7 +182,7 @@ GUILE_PROC1 (scm_string_ci_less_p, "string-ci<?", scm_tc7_rpsubr,
} }
#undef FUNC_NAME #undef FUNC_NAME
GUILE_PROC1 (scm_string_ci_leq_p, "string-ci<=?", scm_tc7_rpsubr, SCM_DEFINE1 (scm_string_ci_leq_p, "string-ci<=?", scm_tc7_rpsubr,
(SCM s1, SCM s2), (SCM s1, SCM s2),
"") "")
#define FUNC_NAME s_scm_string_ci_leq_p #define FUNC_NAME s_scm_string_ci_leq_p
@ -191,7 +191,7 @@ GUILE_PROC1 (scm_string_ci_leq_p, "string-ci<=?", scm_tc7_rpsubr,
} }
#undef FUNC_NAME #undef FUNC_NAME
GUILE_PROC1 (scm_string_ci_gr_p, "string-ci>?", scm_tc7_rpsubr, SCM_DEFINE1 (scm_string_ci_gr_p, "string-ci>?", scm_tc7_rpsubr,
(SCM s1, SCM s2), (SCM s1, SCM s2),
"") "")
#define FUNC_NAME s_scm_string_ci_gr_p #define FUNC_NAME s_scm_string_ci_gr_p
@ -200,7 +200,7 @@ GUILE_PROC1 (scm_string_ci_gr_p, "string-ci>?", scm_tc7_rpsubr,
} }
#undef FUNC_NAME #undef FUNC_NAME
GUILE_PROC1 (scm_string_ci_geq_p, "string-ci>=?", scm_tc7_rpsubr, SCM_DEFINE1 (scm_string_ci_geq_p, "string-ci>=?", scm_tc7_rpsubr,
(SCM s1, SCM s2), (SCM s1, SCM s2),
"") "")
#define FUNC_NAME s_scm_string_ci_geq_p #define FUNC_NAME s_scm_string_ci_geq_p