diff options
author | Greg J. Badros <gjb@cs.washington.edu> | 2000-01-05 19:05:23 +0000 |
---|---|---|
committer | Greg J. Badros <gjb@cs.washington.edu> | 2000-01-05 19:05:23 +0000 |
commit | a1ec69163dd2e55e5d2b03a164513aa4a0d5943c (patch) | |
tree | 99489194c03fa41397c77e84b3f8660ffef1ed30 | |
parent | fb764465068f84e3ab047c45792ffc3026e5505a (diff) | |
download | guile-a1ec69163dd2e55e5d2b03a164513aa4a0d5943c.tar.gz |
*.[ch]: Replace GUILE_PROC w/ SCM_DEFINE.
63 files changed, 582 insertions, 582 deletions
diff --git a/libguile/alist.c b/libguile/alist.c index 88595323b..ce90f1806 100644 --- a/libguile/alist.c +++ b/libguile/alist.c @@ -53,7 +53,7 @@ -GUILE_PROC(scm_acons, "acons", 3, 0, 0, +SCM_DEFINE(scm_acons, "acons", 3, 0, 0, (SCM key, SCM value, SCM alist), "Adds a new key-value pair to @var{alist}. A new pair is created whose car is @var{key} and whose cdr is @var{value}, and the @@ -78,7 +78,7 @@ function is @emph{not} destructive; @var{alist} is not modified.") -GUILE_PROC (scm_sloppy_assq, "sloppy-assq", 2, 0, 0, +SCM_DEFINE (scm_sloppy_assq, "sloppy-assq", 2, 0, 0, (SCM key, SCM alist), "Behaves like @code{assq} but does not do any error checking. Recommended only for use in Guile internals.") @@ -96,7 +96,7 @@ Recommended only for use in Guile internals.") -GUILE_PROC (scm_sloppy_assv, "sloppy-assv", 2, 0, 0, +SCM_DEFINE (scm_sloppy_assv, "sloppy-assv", 2, 0, 0, (SCM key, SCM alist), "Behaves like @code{assv} but does not do any error checking. Recommended only for use in Guile internals.") @@ -114,7 +114,7 @@ Recommended only for use in Guile internals.") #undef FUNC_NAME -GUILE_PROC (scm_sloppy_assoc, "sloppy-assoc", 2, 0, 0, +SCM_DEFINE (scm_sloppy_assoc, "sloppy-assoc", 2, 0, 0, (SCM key, SCM alist), "Behaves like @code{assoc} but does not do any error checking. Recommended only for use in Guile internals.") @@ -134,7 +134,7 @@ Recommended only for use in Guile internals.") -GUILE_PROC(scm_assq, "assq", 2, 0, 0, +SCM_DEFINE(scm_assq, "assq", 2, 0, 0, (SCM key, SCM alist), "@deffnx primitive assv key alist @deffnx primitive assoc key alist @@ -158,7 +158,7 @@ return the entire alist entry found (i.e. both the key and the value).") #undef FUNC_NAME -GUILE_PROC(scm_assv, "assv", 2, 0, 0, +SCM_DEFINE(scm_assv, "assv", 2, 0, 0, (SCM key, SCM alist), "Behaves like @code{assq} but uses @code{eqv?} for key comparison.") #define FUNC_NAME s_scm_assv @@ -179,7 +179,7 @@ GUILE_PROC(scm_assv, "assv", 2, 0, 0, #undef FUNC_NAME -GUILE_PROC(scm_assoc, "assoc", 2, 0, 0, +SCM_DEFINE(scm_assoc, "assoc", 2, 0, 0, (SCM key, SCM alist), "Behaves like @code{assq} but uses @code{equal?} for key comparison.") #define FUNC_NAME s_scm_assoc @@ -197,7 +197,7 @@ GUILE_PROC(scm_assoc, "assoc", 2, 0, 0, -GUILE_PROC (scm_assq_ref, "assq-ref", 2, 0, 0, +SCM_DEFINE (scm_assq_ref, "assq-ref", 2, 0, 0, (SCM alist, SCM key), "@deffnx primitive assv-ref alist key @deffnx primitive assoc-ref alist key @@ -225,7 +225,7 @@ where @var{associator} is one of @code{assq}, @code{assv} or @code{assoc}.") #undef FUNC_NAME -GUILE_PROC (scm_assv_ref, "assv-ref", 2, 0, 0, +SCM_DEFINE (scm_assv_ref, "assv-ref", 2, 0, 0, (SCM alist, SCM key), "Behaves like @code{assq-ref} but uses @code{eqv?} for key comparison.") #define FUNC_NAME s_scm_assv_ref @@ -242,7 +242,7 @@ GUILE_PROC (scm_assv_ref, "assv-ref", 2, 0, 0, #undef FUNC_NAME -GUILE_PROC (scm_assoc_ref, "assoc-ref", 2, 0, 0, +SCM_DEFINE (scm_assoc_ref, "assoc-ref", 2, 0, 0, (SCM alist, SCM key), "Behaves like @code{assq-ref} but uses @code{equal?} for key comparison.") #define FUNC_NAME s_scm_assoc_ref @@ -263,7 +263,7 @@ GUILE_PROC (scm_assoc_ref, "assoc-ref", 2, 0, 0, -GUILE_PROC (scm_assq_set_x, "assq-set!", 3, 0, 0, +SCM_DEFINE (scm_assq_set_x, "assq-set!", 3, 0, 0, (SCM alist, SCM key, SCM val), "@deffnx primitive assv-set! alist key value @deffnx primitive assoc-set! alist key value @@ -290,7 +290,7 @@ association list.") } #undef FUNC_NAME -GUILE_PROC (scm_assv_set_x, "assv-set!", 3, 0, 0, +SCM_DEFINE (scm_assv_set_x, "assv-set!", 3, 0, 0, (SCM alist, SCM key, SCM val), "Behaves like @code{assq-set!} but uses @code{eqv?} for key comparison.") #define FUNC_NAME s_scm_assv_set_x @@ -308,7 +308,7 @@ GUILE_PROC (scm_assv_set_x, "assv-set!", 3, 0, 0, } #undef FUNC_NAME -GUILE_PROC (scm_assoc_set_x, "assoc-set!", 3, 0, 0, +SCM_DEFINE (scm_assoc_set_x, "assoc-set!", 3, 0, 0, (SCM alist, SCM key, SCM val), "Behaves like @code{assq-set!} but uses @code{equal?} for key comparison.") #define FUNC_NAME s_scm_assoc_set_x @@ -329,7 +329,7 @@ GUILE_PROC (scm_assoc_set_x, "assoc-set!", 3, 0, 0, -GUILE_PROC (scm_assq_remove_x, "assq-remove!", 2, 0, 0, +SCM_DEFINE (scm_assq_remove_x, "assq-remove!", 2, 0, 0, (SCM alist, SCM key), "@deffnx primitive assv-remove! alist key @deffnx primitive assoc-remove! alist key @@ -350,7 +350,7 @@ the resulting alist.") #undef FUNC_NAME -GUILE_PROC (scm_assv_remove_x, "assv-remove!", 2, 0, 0, +SCM_DEFINE (scm_assv_remove_x, "assv-remove!", 2, 0, 0, (SCM alist, SCM key), "Behaves like @code{assq-remove!} but uses @code{eqv?} for key comparison.") #define FUNC_NAME s_scm_assv_remove_x @@ -368,7 +368,7 @@ GUILE_PROC (scm_assv_remove_x, "assv-remove!", 2, 0, 0, #undef FUNC_NAME -GUILE_PROC (scm_assoc_remove_x, "assoc-remove!", 2, 0, 0, +SCM_DEFINE (scm_assoc_remove_x, "assoc-remove!", 2, 0, 0, (SCM alist, SCM key), "Behaves like @code{assq-remove!} but uses @code{equal?} for key comparison.") #define FUNC_NAME s_scm_assoc_remove_x diff --git a/libguile/arbiters.c b/libguile/arbiters.c index df1e34929..77aba9840 100644 --- a/libguile/arbiters.c +++ b/libguile/arbiters.c @@ -74,7 +74,7 @@ prinarb (SCM exp, SCM port, scm_print_state *pstate) return !0; } -GUILE_PROC(scm_make_arbiter, "make-arbiter", 1, 0, 0, +SCM_DEFINE(scm_make_arbiter, "make-arbiter", 1, 0, 0, (SCM name), "") #define FUNC_NAME s_scm_make_arbiter @@ -83,7 +83,7 @@ GUILE_PROC(scm_make_arbiter, "make-arbiter", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC(scm_try_arbiter, "try-arbiter", 1, 0, 0, +SCM_DEFINE(scm_try_arbiter, "try-arbiter", 1, 0, 0, (SCM arb), "") #define FUNC_NAME s_scm_try_arbiter @@ -103,7 +103,7 @@ GUILE_PROC(scm_try_arbiter, "try-arbiter", 1, 0, 0, #undef FUNC_NAME -GUILE_PROC(scm_release_arbiter, "release-arbiter", 1, 0, 0, +SCM_DEFINE(scm_release_arbiter, "release-arbiter", 1, 0, 0, (SCM arb), "") #define FUNC_NAME s_scm_release_arbiter diff --git a/libguile/async.c b/libguile/async.c index 3aa31325c..f77435092 100644 --- a/libguile/async.c +++ b/libguile/async.c @@ -277,7 +277,7 @@ mark_async (SCM obj) -GUILE_PROC(scm_async, "async", 1, 0, 0, +SCM_DEFINE(scm_async, "async", 1, 0, 0, (SCM thunk), "") #define FUNC_NAME s_scm_async @@ -290,7 +290,7 @@ GUILE_PROC(scm_async, "async", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC(scm_system_async, "system-async", 1, 0, 0, +SCM_DEFINE(scm_system_async, "system-async", 1, 0, 0, (SCM thunk), "") #define FUNC_NAME s_scm_system_async @@ -305,7 +305,7 @@ GUILE_PROC(scm_system_async, "system-async", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC(scm_async_mark, "async-mark", 1, 0, 0, +SCM_DEFINE(scm_async_mark, "async-mark", 1, 0, 0, (SCM a), "") #define FUNC_NAME s_scm_async_mark @@ -318,7 +318,7 @@ GUILE_PROC(scm_async_mark, "async-mark", 1, 0, 0, #undef FUNC_NAME -GUILE_PROC(scm_system_async_mark, "system-async-mark", 1, 0, 0, +SCM_DEFINE(scm_system_async_mark, "system-async-mark", 1, 0, 0, (SCM a), "") #define FUNC_NAME s_scm_system_async_mark @@ -335,7 +335,7 @@ GUILE_PROC(scm_system_async_mark, "system-async-mark", 1, 0, 0, #undef FUNC_NAME -GUILE_PROC(scm_run_asyncs, "run-asyncs", 1, 0, 0, +SCM_DEFINE(scm_run_asyncs, "run-asyncs", 1, 0, 0, (SCM list_of_a), "") #define FUNC_NAME s_scm_run_asyncs @@ -366,7 +366,7 @@ GUILE_PROC(scm_run_asyncs, "run-asyncs", 1, 0, 0, -GUILE_PROC(scm_noop, "noop", 0, 0, 1, +SCM_DEFINE(scm_noop, "noop", 0, 0, 1, (SCM args), "") #define FUNC_NAME s_scm_noop @@ -380,7 +380,7 @@ GUILE_PROC(scm_noop, "noop", 0, 0, 1, -GUILE_PROC(scm_set_tick_rate, "set-tick-rate", 1, 0, 0, +SCM_DEFINE(scm_set_tick_rate, "set-tick-rate", 1, 0, 0, (SCM n), "") #define FUNC_NAME s_scm_set_tick_rate @@ -398,7 +398,7 @@ GUILE_PROC(scm_set_tick_rate, "set-tick-rate", 1, 0, 0, -GUILE_PROC(scm_set_switch_rate, "set-switch-rate", 1, 0, 0, +SCM_DEFINE(scm_set_switch_rate, "set-switch-rate", 1, 0, 0, (SCM n), "") #define FUNC_NAME s_scm_set_switch_rate @@ -438,7 +438,7 @@ scm_sys_gc_async_thunk (void) -GUILE_PROC(scm_unmask_signals, "unmask-signals", 0, 0, 0, +SCM_DEFINE(scm_unmask_signals, "unmask-signals", 0, 0, 0, (), "") #define FUNC_NAME s_scm_unmask_signals @@ -449,7 +449,7 @@ GUILE_PROC(scm_unmask_signals, "unmask-signals", 0, 0, 0, #undef FUNC_NAME -GUILE_PROC(scm_mask_signals, "mask-signals", 0, 0, 0, +SCM_DEFINE(scm_mask_signals, "mask-signals", 0, 0, 0, (), "") #define FUNC_NAME s_scm_mask_signals diff --git a/libguile/backtrace.c b/libguile/backtrace.c index 9e6a5092f..7819bed31 100644 --- a/libguile/backtrace.c +++ b/libguile/backtrace.c @@ -246,7 +246,7 @@ display_error_handler (struct display_error_handler_data *data, return SCM_UNSPECIFIED; } -GUILE_PROC(scm_display_error, "display-error", 6, 0, 0, +SCM_DEFINE(scm_display_error, "display-error", 6, 0, 0, (SCM stack, SCM port, SCM subr, SCM message, SCM args, SCM rest), "") #define FUNC_NAME s_scm_display_error @@ -283,7 +283,7 @@ static print_params_t default_print_params[] = { static print_params_t *print_params = default_print_params; #ifdef GUILE_DEBUG -GUILE_PROC(scm_set_print_params_x, "set-print-params!", 1, 0, 0, +SCM_DEFINE(scm_set_print_params_x, "set-print-params!", 1, 0, 0, (SCM params), "") #define FUNC_NAME s_scm_set_print_params_x @@ -385,7 +385,7 @@ display_application (SCM frame,int indentation,SCM sport,SCM port,scm_print_stat pstate); } -GUILE_PROC(scm_display_application, "display-application", 1, 2, 0, +SCM_DEFINE(scm_display_application, "display-application", 1, 2, 0, (SCM frame, SCM port, SCM indent), "") #define FUNC_NAME s_scm_display_application @@ -599,7 +599,7 @@ display_backtrace_body(struct display_backtrace_args *a) } #undef FUNC_NAME -GUILE_PROC(scm_display_backtrace, "display-backtrace", 2, 2, 0, +SCM_DEFINE(scm_display_backtrace, "display-backtrace", 2, 2, 0, (SCM stack, SCM port, SCM first, SCM depth), "") #define FUNC_NAME s_scm_display_backtrace @@ -621,7 +621,7 @@ GUILE_PROC(scm_display_backtrace, "display-backtrace", 2, 2, 0, SCM_VCELL (scm_has_shown_backtrace_hint_p_var, "has-shown-backtrace-hint?"); -GUILE_PROC(scm_backtrace, "backtrace", 0, 0, 0, +SCM_DEFINE(scm_backtrace, "backtrace", 0, 0, 0, (), "") #define FUNC_NAME s_scm_backtrace diff --git a/libguile/boolean.c b/libguile/boolean.c index e0bfd70ad..d2cc1442c 100644 --- a/libguile/boolean.c +++ b/libguile/boolean.c @@ -52,7 +52,7 @@ -GUILE_PROC(scm_not, "not", 1, 0, 0, +SCM_DEFINE(scm_not, "not", 1, 0, 0, (SCM x), "") #define FUNC_NAME s_scm_not @@ -62,7 +62,7 @@ GUILE_PROC(scm_not, "not", 1, 0, 0, #undef FUNC_NAME -GUILE_PROC(scm_boolean_p, "boolean?", 1, 0, 0, +SCM_DEFINE(scm_boolean_p, "boolean?", 1, 0, 0, (SCM obj), "") #define FUNC_NAME s_scm_boolean_p diff --git a/libguile/chars.c b/libguile/chars.c index 2c970b693..9ea2714a4 100644 --- a/libguile/chars.c +++ b/libguile/chars.c @@ -52,7 +52,7 @@ #include "chars.h" -GUILE_PROC (scm_char_p, "char?", 1, 0, 0, +SCM_DEFINE (scm_char_p, "char?", 1, 0, 0, (SCM x), "Return #t iff X is a character, else #f.") #define FUNC_NAME s_scm_char_p @@ -173,7 +173,7 @@ GUILE_PROC1 (scm_char_ci_geq_p, "char-ci>=?", scm_tc7_rpsubr, #undef FUNC_NAME -GUILE_PROC(scm_char_alphabetic_p, "char-alphabetic?", 1, 0, 0, +SCM_DEFINE(scm_char_alphabetic_p, "char-alphabetic?", 1, 0, 0, (SCM chr), "Return #t iff CHR is alphabetic, else #f. Alphabetic means the same thing as the isalpha C library function.") @@ -184,7 +184,7 @@ Alphabetic means the same thing as the isalpha C library function.") } #undef FUNC_NAME -GUILE_PROC(scm_char_numeric_p, "char-numeric?", 1, 0, 0, +SCM_DEFINE(scm_char_numeric_p, "char-numeric?", 1, 0, 0, (SCM chr), "Return #t iff CHR is numeric, else #f. Numeric means the same thing as the isdigit C library function.") @@ -195,7 +195,7 @@ Numeric means the same thing as the isdigit C library function.") } #undef FUNC_NAME -GUILE_PROC(scm_char_whitespace_p, "char-whitespace?", 1, 0, 0, +SCM_DEFINE(scm_char_whitespace_p, "char-whitespace?", 1, 0, 0, (SCM chr), "Return #t iff CHR is whitespace, else #f. Whitespace means the same thing as the isspace C library function.") @@ -208,7 +208,7 @@ Whitespace means the same thing as the isspace C library function.") -GUILE_PROC(scm_char_upper_case_p, "char-upper-case?", 1, 0, 0, +SCM_DEFINE(scm_char_upper_case_p, "char-upper-case?", 1, 0, 0, (SCM chr), "Return #t iff CHR is uppercase, else #f. Uppercase means the same thing as the isupper C library function.") @@ -220,7 +220,7 @@ Uppercase means the same thing as the isupper C library function.") #undef FUNC_NAME -GUILE_PROC(scm_char_lower_case_p, "char-lower-case?", 1, 0, 0, +SCM_DEFINE(scm_char_lower_case_p, "char-lower-case?", 1, 0, 0, (SCM chr), "Return #t iff CHR is lowercase, else #f. Lowercase means the same thing as the islower C library function.") @@ -233,7 +233,7 @@ Lowercase means the same thing as the islower C library function.") -GUILE_PROC (scm_char_is_both_p, "char-is-both?", 1, 0, 0, +SCM_DEFINE (scm_char_is_both_p, "char-is-both?", 1, 0, 0, (SCM chr), "Return #t iff CHR is either uppercase or lowercase, else #f. Uppercase and lowercase are as defined by the isupper and islower @@ -248,7 +248,7 @@ C library functions.") -GUILE_PROC (scm_char_to_integer, "char->integer", 1, 0, 0, +SCM_DEFINE (scm_char_to_integer, "char->integer", 1, 0, 0, (SCM chr), "Return the number corresponding to ordinal position of CHR in the Ascii sequence.") #define FUNC_NAME s_scm_char_to_integer @@ -260,7 +260,7 @@ GUILE_PROC (scm_char_to_integer, "char->integer", 1, 0, 0, -GUILE_PROC(scm_integer_to_char, "integer->char", 1, 0, 0, +SCM_DEFINE(scm_integer_to_char, "integer->char", 1, 0, 0, (SCM n), "Return the character at position N in the Ascii sequence.") #define FUNC_NAME s_scm_integer_to_char @@ -271,7 +271,7 @@ GUILE_PROC(scm_integer_to_char, "integer->char", 1, 0, 0, #undef FUNC_NAME -GUILE_PROC(scm_char_upcase, "char-upcase", 1, 0, 0, +SCM_DEFINE(scm_char_upcase, "char-upcase", 1, 0, 0, (SCM chr), "Return the uppercase character version of CHR.") #define FUNC_NAME s_scm_char_upcase @@ -282,7 +282,7 @@ GUILE_PROC(scm_char_upcase, "char-upcase", 1, 0, 0, #undef FUNC_NAME -GUILE_PROC(scm_char_downcase, "char-downcase", 1, 0, 0, +SCM_DEFINE(scm_char_downcase, "char-downcase", 1, 0, 0, (SCM chr), "Return the lowercase character version of CHR.") #define FUNC_NAME s_scm_char_downcase diff --git a/libguile/debug.c b/libguile/debug.c index bb49509b6..51a5ce409 100644 --- a/libguile/debug.c +++ b/libguile/debug.c @@ -72,7 +72,7 @@ /* {Run time control of the debugging evaluator} */ -GUILE_PROC (scm_debug_options, "debug-options-interface", 0, 1, 0, +SCM_DEFINE (scm_debug_options, "debug-options-interface", 0, 1, 0, (SCM setting), "") #define FUNC_NAME s_scm_debug_options @@ -120,7 +120,7 @@ with_traps_inner (void *data) return scm_apply (thunk, SCM_EOL, SCM_EOL); } -GUILE_PROC (scm_with_traps, "with-traps", 1, 0, 0, +SCM_DEFINE (scm_with_traps, "with-traps", 1, 0, 0, (SCM thunk), "") #define FUNC_NAME s_scm_with_traps @@ -161,7 +161,7 @@ prinmemoized (SCM obj,SCM port,scm_print_state *pstate) return 1; } -GUILE_PROC (scm_memoized_p, "memoized?", 1, 0, 0, +SCM_DEFINE (scm_memoized_p, "memoized?", 1, 0, 0, (SCM obj), "") #define FUNC_NAME s_scm_memoized_p @@ -250,7 +250,7 @@ scm_make_memoized (SCM exp, SCM env) #include "variable.h" #include "procs.h" -GUILE_PROC (scm_make_gloc, "make-gloc", 1, 1, 0, +SCM_DEFINE (scm_make_gloc, "make-gloc", 1, 1, 0, (SCM var, SCM env), "") #define FUNC_NAME s_scm_make_gloc @@ -269,7 +269,7 @@ GUILE_PROC (scm_make_gloc, "make-gloc", 1, 1, 0, } #undef FUNC_NAME -GUILE_PROC (scm_gloc_p, "gloc?", 1, 0, 0, +SCM_DEFINE (scm_gloc_p, "gloc?", 1, 0, 0, (SCM obj), "") #define FUNC_NAME s_scm_gloc_p @@ -279,7 +279,7 @@ GUILE_PROC (scm_gloc_p, "gloc?", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC (scm_make_iloc, "make-iloc", 3, 0, 0, +SCM_DEFINE (scm_make_iloc, "make-iloc", 3, 0, 0, (SCM frame, SCM binding, SCM cdrp), "") #define FUNC_NAME s_scm_make_iloc @@ -293,7 +293,7 @@ GUILE_PROC (scm_make_iloc, "make-iloc", 3, 0, 0, } #undef FUNC_NAME -GUILE_PROC (scm_iloc_p, "iloc?", 1, 0, 0, +SCM_DEFINE (scm_iloc_p, "iloc?", 1, 0, 0, (SCM obj), "") #define FUNC_NAME s_scm_iGUILE_p @@ -302,7 +302,7 @@ GUILE_PROC (scm_iloc_p, "iloc?", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC (scm_memcons, "memcons", 2, 1, 0, +SCM_DEFINE (scm_memcons, "memcons", 2, 1, 0, (SCM car, SCM cdr, SCM env), "") #define FUNC_NAME s_scm_memcons @@ -334,7 +334,7 @@ GUILE_PROC (scm_memcons, "memcons", 2, 1, 0, } #undef FUNC_NAME -GUILE_PROC (scm_mem_to_proc, "mem->proc", 1, 0, 0, +SCM_DEFINE (scm_mem_to_proc, "mem->proc", 1, 0, 0, (SCM obj), "") #define FUNC_NAME s_scm_mem_to_proc @@ -350,7 +350,7 @@ GUILE_PROC (scm_mem_to_proc, "mem->proc", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC (scm_proc_to_mem, "proc->mem", 1, 0, 0, +SCM_DEFINE (scm_proc_to_mem, "proc->mem", 1, 0, 0, (SCM obj), "") #define FUNC_NAME s_scm_proc_to_mem @@ -363,7 +363,7 @@ GUILE_PROC (scm_proc_to_mem, "proc->mem", 1, 0, 0, #endif /* GUILE_DEBUG */ -GUILE_PROC (scm_unmemoize, "unmemoize", 1, 0, 0, +SCM_DEFINE (scm_unmemoize, "unmemoize", 1, 0, 0, (SCM m), "") #define FUNC_NAME s_scm_unmemoize @@ -373,7 +373,7 @@ GUILE_PROC (scm_unmemoize, "unmemoize", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC (scm_memoized_environment, "memoized-environment", 1, 0, 0, +SCM_DEFINE (scm_memoized_environment, "memoized-environment", 1, 0, 0, (SCM m), "") #define FUNC_NAME s_scm_memoized_environment @@ -383,7 +383,7 @@ GUILE_PROC (scm_memoized_environment, "memoized-environment", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC (scm_procedure_name, "procedure-name", 1, 0, 0, +SCM_DEFINE (scm_procedure_name, "procedure-name", 1, 0, 0, (SCM proc), "") #define FUNC_NAME s_scm_procedure_name @@ -409,7 +409,7 @@ GUILE_PROC (scm_procedure_name, "procedure-name", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC (scm_procedure_source, "procedure-source", 1, 0, 0, +SCM_DEFINE (scm_procedure_source, "procedure-source", 1, 0, 0, (SCM proc), "") #define FUNC_NAME s_scm_procedure_source @@ -444,7 +444,7 @@ GUILE_PROC (scm_procedure_source, "procedure-source", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC (scm_procedure_environment, "procedure-environment", 1, 0, 0, +SCM_DEFINE (scm_procedure_environment, "procedure-environment", 1, 0, 0, (SCM proc), "") #define FUNC_NAME s_scm_procedure_environment @@ -474,7 +474,7 @@ GUILE_PROC (scm_procedure_environment, "procedure-environment", 1, 0, 0, * the code before evaluating. One solution would be to have eval.c * generate yet another evaluator. They are not very big actually. */ -GUILE_PROC (scm_local_eval, "local-eval", 1, 1, 0, +SCM_DEFINE (scm_local_eval, "local-eval", 1, 1, 0, (SCM exp, SCM env), "Evaluate @var{exp} in its environment. If @var{env} is supplied, it is the environment in which to evaluate @var{exp}. Otherwise, @@ -564,7 +564,7 @@ prindebugobj (SCM obj,SCM port,scm_print_state *pstate) return 1; } -GUILE_PROC (scm_debug_object_p, "debug-object?", 1, 0, 0, +SCM_DEFINE (scm_debug_object_p, "debug-object?", 1, 0, 0, (SCM obj), "") #define FUNC_NAME s_scm_debug_object_p @@ -590,7 +590,7 @@ scm_make_debugobj (scm_debug_frame *frame) /* Undocumented debugging procedure */ #ifdef GUILE_DEBUG -GUILE_PROC (scm_debug_hang, "debug-hang", 0, 1, 0, +SCM_DEFINE (scm_debug_hang, "debug-hang", 0, 1, 0, (SCM obj), "") #define FUNC_NAME s_scm_debug_hang diff --git a/libguile/dynl.c b/libguile/dynl.c index 4333b4ced..88556a1a6 100644 --- a/libguile/dynl.c +++ b/libguile/dynl.c @@ -173,7 +173,7 @@ scm_register_module_xxx (char *module_name, void *init_func) registered_mods = md; } -GUILE_PROC (scm_registered_modules, "c-registered-modules", 0, 0, 0, +SCM_DEFINE (scm_registered_modules, "c-registered-modules", 0, 0, 0, (), "Return a list of the object code modules that have been imported into the current Guile process. Each element of the list is a pair whose @@ -194,7 +194,7 @@ for that module's initializer function.") } #undef FUNC_NAME -GUILE_PROC (scm_clear_registered_modules, "c-clear-registered-modules", 0, 0, 0, +SCM_DEFINE (scm_clear_registered_modules, "c-clear-registered-modules", 0, 0, 0, (), "Destroy the list of modules registered with the current Guile process. The return value is unspecified. @strong{Warning:} this function does @@ -319,7 +319,7 @@ print_dynl_obj (SCM exp,SCM port,scm_print_state *pstate) static SCM kw_global; SCM_SYMBOL (sym_global, "-global"); -GUILE_PROC (scm_dynamic_link, "dynamic-link", 1, 0, 1, +SCM_DEFINE (scm_dynamic_link, "dynamic-link", 1, 0, 1, (SCM fname, SCM rest), "Open the dynamic library @var{library-file}. A library handle representing the opened library is returned; this handle should be used @@ -385,7 +385,7 @@ get_dynl_obj (SCM dobj,const char *subr,int argn) return d; } -GUILE_PROC (scm_dynamic_object_p, "dynamic-object?", 1, 0, 0, +SCM_DEFINE (scm_dynamic_object_p, "dynamic-object?", 1, 0, 0, (SCM obj), "Return @code{#t} if @var{obj} is a dynamic library handle, or @code{#f} otherwise.") @@ -395,7 +395,7 @@ otherwise.") } #undef FUNC_NAME -GUILE_PROC (scm_dynamic_unlink, "dynamic-unlink", 1, 0, 0, +SCM_DEFINE (scm_dynamic_unlink, "dynamic-unlink", 1, 0, 0, (SCM dobj), "Unlink the library represented by @var{library-handle}, and remove any imported symbols from the address space. @@ -417,7 +417,7 @@ below and you will get type mismatch errors when you try to. } #undef FUNC_NAME -GUILE_PROC (scm_dynamic_func, "dynamic-func", 2, 0, 0, +SCM_DEFINE (scm_dynamic_func, "dynamic-func", 2, 0, 0, (SCM symb, SCM dobj), "Import the symbol @var{func} from @var{lib} (a dynamic library handle). A @dfn{function handle} representing the imported function is returned. @@ -451,7 +451,7 @@ needed or not and will add it when necessary. } #undef FUNC_NAME -GUILE_PROC (scm_dynamic_call, "dynamic-call", 2, 0, 0, +SCM_DEFINE (scm_dynamic_call, "dynamic-call", 2, 0, 0, (SCM func, SCM dobj), "Call @var{lib-thunk}, a procedure of no arguments. If @var{lib-thunk} is a string, it is assumed to be a symbol found in the dynamic library @@ -486,7 +486,7 @@ Interrupts are deferred while the C function is executing (with } #undef FUNC_NAME -GUILE_PROC (scm_dynamic_args_call, "dynamic-args-call", 3, 0, 0, +SCM_DEFINE (scm_dynamic_args_call, "dynamic-args-call", 3, 0, 0, (SCM func, SCM dobj, SCM args), "Call @var{proc}, a dynamically loaded function, passing it the argument list @var{args} (a list of strings). As with @code{dynamic-call}, diff --git a/libguile/dynwind.c b/libguile/dynwind.c index be2084af7..335e5d91e 100644 --- a/libguile/dynwind.c +++ b/libguile/dynwind.c @@ -70,7 +70,7 @@ -GUILE_PROC(scm_dynamic_wind, "dynamic-wind", 3, 0, 0, +SCM_DEFINE(scm_dynamic_wind, "dynamic-wind", 3, 0, 0, (SCM thunk1, SCM thunk2, SCM thunk3), "All three arguments must be 0-argument procedures. @@ -199,7 +199,7 @@ scm_internal_dynamic_wind (scm_guard_t before, } #ifdef GUILE_DEBUG -GUILE_PROC (scm_wind_chain, "wind-chain", 0, 0, 0, +SCM_DEFINE (scm_wind_chain, "wind-chain", 0, 0, 0, (), "") #define FUNC_NAME s_scm_wind_chain diff --git a/libguile/error.c b/libguile/error.c index c0d97fe6f..937c8c7cc 100644 --- a/libguile/error.c +++ b/libguile/error.c @@ -87,7 +87,7 @@ scm_error (SCM key, const char *subr, const char *message, SCM args, SCM rest) } /* Scheme interface to scm_error. */ -GUILE_PROC(scm_error_scm, "scm-error", 5, 0, 0, +SCM_DEFINE(scm_error_scm, "scm-error", 5, 0, 0, (SCM key, SCM subr, SCM message, SCM args, SCM rest), "Raise an error with key @var{key}. @var{subr} can be a string naming the procedure associated with the error, or @code{#f}. @var{message} @@ -114,7 +114,7 @@ will usually be @code{#f}.") } #undef FUNC_NAME -GUILE_PROC (scm_strerror, "strerror", 1, 0, 0, +SCM_DEFINE (scm_strerror, "strerror", 1, 0, 0, (SCM err), "Returns the Unix error message corresponding to @var{errno}, an integer.") #define FUNC_NAME s_scm_strerror diff --git a/libguile/eval.c b/libguile/eval.c index a6b816241..9e10e9ec1 100644 --- a/libguile/eval.c +++ b/libguile/eval.c @@ -1698,7 +1698,7 @@ scm_option scm_evaluator_trap_table[] = { { SCM_OPTION_BOOLEAN, "exit-frame", 0, "Trap when exiting eval or apply." } }; -GUILE_PROC (scm_eval_options_interface, "eval-options-interface", 0, 1, 0, +SCM_DEFINE (scm_eval_options_interface, "eval-options-interface", 0, 1, 0, (SCM setting), "") #define FUNC_NAME s_scm_eval_options_interface @@ -1715,7 +1715,7 @@ GUILE_PROC (scm_eval_options_interface, "eval-options-interface", 0, 1, 0, } #undef FUNC_NAME -GUILE_PROC (scm_evaluator_traps, "evaluator-traps-interface", 0, 1, 0, +SCM_DEFINE (scm_evaluator_traps, "evaluator-traps-interface", 0, 1, 0, (SCM setting), "") #define FUNC_NAME s_scm_evaluator_traps @@ -3179,7 +3179,7 @@ ret: you if you do (scm_apply scm_apply '( ... ))" If you know what they're referring to, send me a patch to this comment. */ -GUILE_PROC(scm_nconc2last, "apply:nconc2last", 1, 0, 0, +SCM_DEFINE(scm_nconc2last, "apply:nconc2last", 1, 0, 0, (SCM lst), "") #define FUNC_NAME s_scm_nconc2last @@ -3698,7 +3698,7 @@ prinprom (SCM exp,SCM port,scm_print_state *pstate) } -GUILE_PROC(scm_force, "force", 1, 0, 0, +SCM_DEFINE(scm_force, "force", 1, 0, 0, (SCM x), "") #define FUNC_NAME s_scm_force @@ -3719,7 +3719,7 @@ GUILE_PROC(scm_force, "force", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC (scm_promise_p, "promise?", 1, 0, 0, +SCM_DEFINE (scm_promise_p, "promise?", 1, 0, 0, (SCM x), "Return true if @var{obj} is a promise, i.e. a delayed computation (@pxref{Delayed evaluation,,,r4rs.info,The Revised^4 Report on Scheme}).") @@ -3729,7 +3729,7 @@ GUILE_PROC (scm_promise_p, "promise?", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC (scm_cons_source, "cons-source", 3, 0, 0, +SCM_DEFINE (scm_cons_source, "cons-source", 3, 0, 0, (SCM xorig, SCM x, SCM y), "") #define FUNC_NAME s_scm_cons_source @@ -3746,7 +3746,7 @@ GUILE_PROC (scm_cons_source, "cons-source", 3, 0, 0, } #undef FUNC_NAME -GUILE_PROC (scm_copy_tree, "copy-tree", 1, 0, 0, +SCM_DEFINE (scm_copy_tree, "copy-tree", 1, 0, 0, (SCM obj), "Recursively copy the data tree that is bound to @var{obj}, and return a pointer to the new data structure. @code{copy-tree} recurses down the @@ -3794,7 +3794,7 @@ scm_eval_3 (SCM obj, int copyp, SCM env) return SCM_XEVAL (obj, env); } -GUILE_PROC(scm_eval2, "eval2", 2, 0, 0, +SCM_DEFINE(scm_eval2, "eval2", 2, 0, 0, (SCM obj, SCM env_thunk), "Evaluate @var{exp}, a Scheme expression, in the environment designated by @var{lookup}, a symbol-lookup function. @code{(eval exp)} is @@ -3805,7 +3805,7 @@ equivalent to @code{(eval2 exp *top-level-lookup-closure*)}.") } #undef FUNC_NAME -GUILE_PROC(scm_eval, "eval", 1, 0, 0, +SCM_DEFINE(scm_eval, "eval", 1, 0, 0, (SCM obj), "Evaluate @var{exp}, a list representing a Scheme expression, in the top-level environment.") diff --git a/libguile/evalext.c b/libguile/evalext.c index bf8000a61..37af92e0e 100644 --- a/libguile/evalext.c +++ b/libguile/evalext.c @@ -67,7 +67,7 @@ scm_m_generalized_set_x (SCM xorig, SCM env) return scm_wta (xorig, scm_s_variable, scm_s_set_x); } -GUILE_PROC (scm_definedp, "defined?", 1, 1, 0, +SCM_DEFINE (scm_definedp, "defined?", 1, 1, 0, (SCM sym, SCM env), "Return @code{#t} if @var{sym} is defined in the top-level environment.") #define FUNC_NAME s_scm_definedp diff --git a/libguile/feature.c b/libguile/feature.c index 6e20bd93d..f55c855f9 100644 --- a/libguile/feature.c +++ b/libguile/feature.c @@ -71,7 +71,7 @@ scm_add_feature (const char *str) -GUILE_PROC(scm_program_arguments, "program-arguments", 0, 0, 0, +SCM_DEFINE(scm_program_arguments, "program-arguments", 0, 0, 0, (), "") #define FUNC_NAME s_scm_program_arguments @@ -179,7 +179,7 @@ scm_make_named_hook (const char* name, int n_args) } -GUILE_PROC (scm_make_hook_with_name, "make-hook-with-name", 1, 1, 0, +SCM_DEFINE (scm_make_hook_with_name, "make-hook-with-name", 1, 1, 0, (SCM name, SCM n_args), "") #define FUNC_NAME s_scm_make_hook_with_name @@ -189,7 +189,7 @@ GUILE_PROC (scm_make_hook_with_name, "make-hook-with-name", 1, 1, 0, #undef FUNC_NAME -GUILE_PROC (scm_make_hook, "make-hook", 0, 1, 0, +SCM_DEFINE (scm_make_hook, "make-hook", 0, 1, 0, (SCM n_args), "") #define FUNC_NAME s_scm_make_hook @@ -199,7 +199,7 @@ GUILE_PROC (scm_make_hook, "make-hook", 0, 1, 0, #undef FUNC_NAME -GUILE_PROC (scm_hook_p, "hook?", 1, 0, 0, +SCM_DEFINE (scm_hook_p, "hook?", 1, 0, 0, (SCM x), "") #define FUNC_NAME s_scm_hook_p @@ -209,7 +209,7 @@ GUILE_PROC (scm_hook_p, "hook?", 1, 0, 0, #undef FUNC_NAME -GUILE_PROC (scm_hook_empty_p, "hook-empty?", 1, 0, 0, +SCM_DEFINE (scm_hook_empty_p, "hook-empty?", 1, 0, 0, (SCM hook), "") #define FUNC_NAME s_scm_hook_empty_p @@ -220,7 +220,7 @@ GUILE_PROC (scm_hook_empty_p, "hook-empty?", 1, 0, 0, #undef FUNC_NAME -GUILE_PROC (scm_add_hook_x, "add-hook!", 2, 1, 0, +SCM_DEFINE (scm_add_hook_x, "add-hook!", 2, 1, 0, (SCM hook, SCM proc, SCM append_p), "") #define FUNC_NAME s_scm_add_hook_x @@ -246,7 +246,7 @@ GUILE_PROC (scm_add_hook_x, "add-hook!", 2, 1, 0, #undef FUNC_NAME -GUILE_PROC (scm_remove_hook_x, "remove-hook!", 2, 0, 0, +SCM_DEFINE (scm_remove_hook_x, "remove-hook!", 2, 0, 0, (SCM hook, SCM proc), "") #define FUNC_NAME s_scm_remove_hook_x @@ -259,7 +259,7 @@ GUILE_PROC (scm_remove_hook_x, "remove-hook!", 2, 0, 0, #undef FUNC_NAME -GUILE_PROC (scm_reset_hook_x, "reset-hook!", 1, 0, 0, +SCM_DEFINE (scm_reset_hook_x, "reset-hook!", 1, 0, 0, (SCM hook), "") #define FUNC_NAME s_scm_reset_hook_x @@ -271,7 +271,7 @@ GUILE_PROC (scm_reset_hook_x, "reset-hook!", 1, 0, 0, #undef FUNC_NAME -GUILE_PROC (scm_run_hook, "run-hook", 1, 0, 1, +SCM_DEFINE (scm_run_hook, "run-hook", 1, 0, 1, (SCM hook, SCM args), "") #define FUNC_NAME s_scm_run_hook @@ -301,7 +301,7 @@ scm_c_run_hook (SCM hook, SCM args) } -GUILE_PROC (scm_hook_to_list, "hook->list", 1, 0, 0, +SCM_DEFINE (scm_hook_to_list, "hook->list", 1, 0, 0, (SCM hook), "") #define FUNC_NAME s_scm_hook_to_list diff --git a/libguile/filesys.c b/libguile/filesys.c index 950e3d4ea..d00616736 100644 --- a/libguile/filesys.c +++ b/libguile/filesys.c @@ -122,7 +122,7 @@ /* {Permissions} */ -GUILE_PROC (scm_chown, "chown", 3, 0, 0, +SCM_DEFINE (scm_chown, "chown", 3, 0, 0, (SCM object, SCM owner, SCM group), "Change the ownership and group of the file referred to by @var{obj} to the integer userid values @var{owner} and @var{group}. @var{obj} can be @@ -168,7 +168,7 @@ as @code{-1}, then that ID is not changed.") #undef FUNC_NAME -GUILE_PROC (scm_chmod, "chmod", 2, 0, 0, +SCM_DEFINE (scm_chmod, "chmod", 2, 0, 0, (SCM object, SCM mode), "Changes the permissions of the file referred to by @var{obj}. @var{obj} can be a string containing a file name or a port or integer file @@ -205,7 +205,7 @@ The return value is unspecified.") } #undef FUNC_NAME -GUILE_PROC (scm_umask, "umask", 0, 1, 0, +SCM_DEFINE (scm_umask, "umask", 0, 1, 0, (SCM mode), "If @var{mode} is omitted, retuns a decimal number representing the current file creation mask. Otherwise the file creation mask is set to @@ -231,7 +231,7 @@ E.g., @code{(umask #o022)} sets the mask to octal 22, decimal 18.") -GUILE_PROC (scm_open_fdes, "open-fdes", 2, 1, 0, +SCM_DEFINE (scm_open_fdes, "open-fdes", 2, 1, 0, (SCM path, SCM flags, SCM mode), "Similar to @code{open} but returns a file descriptor instead of a port.") @@ -252,7 +252,7 @@ port.") } #undef FUNC_NAME -GUILE_PROC (scm_open, "open", 2, 1, 0, +SCM_DEFINE (scm_open, "open", 2, 1, 0, (SCM path, SCM flags, SCM mode), "Open the file named by @var{path} for reading and/or writing. @var{flags} is an integer specifying how the file should be opened. @@ -312,7 +312,7 @@ for additional flags.") } #undef FUNC_NAME -GUILE_PROC (scm_close, "close", 1, 0, 0, +SCM_DEFINE (scm_close, "close", 1, 0, 0, (SCM fd_or_port), "Similar to close-port (@pxref{Generic Port Operations, close-port}), but also works on file descriptors. A side @@ -445,7 +445,7 @@ scm_stat2scm (struct stat *stat_temp) return ans; } -GUILE_PROC (scm_stat, "stat", 1, 0, 0, +SCM_DEFINE (scm_stat, "stat", 1, 0, 0, (SCM object), "Returns an object containing various information about the file determined by @var{obj}. @@ -543,7 +543,7 @@ An integer representing the access permission bits. /* {Modifying Directories} */ -GUILE_PROC (scm_link, "link", 2, 0, 0, +SCM_DEFINE (scm_link, "link", 2, 0, 0, (SCM oldpath, SCM newpath), "Creates a new name @var{path-to} in the file system for the file named by @var{path-from}. If @var{path-from} is a symbolic link, the @@ -569,7 +569,7 @@ link may or may not be followed depending on the system.") -GUILE_PROC (scm_rename, "rename-file", 2, 0, 0, +SCM_DEFINE (scm_rename, "rename-file", 2, 0, 0, (SCM oldname, SCM newname), "Renames the file specified by @var{path-from} to @var{path-to}. The return value is unspecified.") @@ -599,7 +599,7 @@ The return value is unspecified.") #undef FUNC_NAME -GUILE_PROC(scm_delete_file, "delete-file", 1, 0, 0, +SCM_DEFINE(scm_delete_file, "delete-file", 1, 0, 0, (SCM str), "Deletes (or \"unlinks\") the file specified by @var{path}.") #define FUNC_NAME s_scm_delete_file @@ -614,7 +614,7 @@ GUILE_PROC(scm_delete_file, "delete-file", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC (scm_mkdir, "mkdir", 1, 1, 0, +SCM_DEFINE (scm_mkdir, "mkdir", 1, 1, 0, (SCM path, SCM mode), "Create a new directory named by @var{path}. If @var{mode} is omitted then the permissions of the directory file are set using the current @@ -650,7 +650,7 @@ umask. Otherwise they are set to the decimal value specified with #undef FUNC_NAME -GUILE_PROC (scm_rmdir, "rmdir", 1, 0, 0, +SCM_DEFINE (scm_rmdir, "rmdir", 1, 0, 0, (SCM path), "Remove the existing directory named by @var{path}. The directory must be empty for this to succeed. The return value is unspecified.") @@ -679,7 +679,7 @@ be empty for this to succeed. The return value is unspecified.") long scm_tc16_dir; -GUILE_PROC (scm_directory_stream_p, "directory-stream?", 1, 0, 0, +SCM_DEFINE (scm_directory_stream_p, "directory-stream?", 1, 0, 0, (SCM obj), "Returns a boolean indicating whether @var{object} is a directory stream as returned by @code{opendir}.") @@ -689,7 +689,7 @@ as returned by @code{opendir}.") } #undef FUNC_NAME -GUILE_PROC (scm_opendir, "opendir", 1, 0, 0, +SCM_DEFINE (scm_opendir, "opendir", 1, 0, 0, (SCM dirname), "Open the directory specified by @var{path} and return a directory stream.") @@ -706,7 +706,7 @@ stream.") #undef FUNC_NAME -GUILE_PROC (scm_readdir, "readdir", 1, 0, 0, +SCM_DEFINE (scm_readdir, "readdir", 1, 0, 0, (SCM port), "Return (as a string) the next directory entry from the directory stream @var{stream}. If there is no remaining entry to be read then the @@ -726,7 +726,7 @@ end of file object is returned.") -GUILE_PROC (scm_rewinddir, "rewinddir", 1, 0, 0, +SCM_DEFINE (scm_rewinddir, "rewinddir", 1, 0, 0, (SCM port), "Reset the directory port @var{stream} so that the next call to @code{readdir} will return the first directory entry.") @@ -740,7 +740,7 @@ GUILE_PROC (scm_rewinddir, "rewinddir", 1, 0, 0, -GUILE_PROC (scm_closedir, "closedir", 1, 0, 0, +SCM_DEFINE (scm_closedir, "closedir", 1, 0, 0, (SCM port), "Close the directory stream @var{stream}. The return value is unspecified.") @@ -790,7 +790,7 @@ scm_dir_free (SCM p) */ -GUILE_PROC (scm_chdir, "chdir", 1, 0, 0, +SCM_DEFINE (scm_chdir, "chdir", 1, 0, 0, (SCM str), "Change the current working directory to @var{path}. The return value is unspecified.") @@ -809,7 +809,7 @@ The return value is unspecified.") -GUILE_PROC (scm_getcwd, "getcwd", 0, 0, 0, +SCM_DEFINE (scm_getcwd, "getcwd", 0, 0, 0, (), "Returns the name of the current working directory.") #define FUNC_NAME s_scm_getcwd @@ -936,7 +936,7 @@ retrieve_select_type (SELECT_TYPE *set, SCM list) } /* Static helper functions above refer to s_scm_select directly as s_select */ -GUILE_PROC (scm_select, "select", 3, 2, 0, +SCM_DEFINE (scm_select, "select", 3, 2, 0, (SCM reads, SCM writes, SCM excepts, SCM secs, SCM usecs), "@var{reads}, @var{writes} and @var{excepts} can be lists or vectors: it doesn't matter which, but the corresponding object returned will be @@ -1044,7 +1044,7 @@ values instead of a list and has an additional select! interface. -GUILE_PROC (scm_fcntl, "fcntl", 2, 0, 1, +SCM_DEFINE (scm_fcntl, "fcntl", 2, 0, 1, (SCM object, SCM cmd, SCM value), "Apply @var{command} to the specified file descriptor or the underlying file descriptor of the specified port. @var{value} is an optional @@ -1101,7 +1101,7 @@ The value used to indicate the "close on exec" flag with @code{F_GETFL} or } #undef FUNC_NAME -GUILE_PROC (scm_fsync, "fsync", 1, 0, 0, +SCM_DEFINE (scm_fsync, "fsync", 1, 0, 0, (SCM object), "Copies any unwritten data for the specified output file descriptor to disk. If @var{port/fd} is a port, its buffer is flushed before the underlying @@ -1129,7 +1129,7 @@ The return value is unspecified.") } #undef FUNC_NAME -GUILE_PROC (scm_symlink, "symlink", 2, 0, 0, +SCM_DEFINE (scm_symlink, "symlink", 2, 0, 0, (SCM oldpath, SCM newpath), "Create a symbolic link named @var{path-to} with the value (i.e., pointing to) @var{path-from}. The return value is unspecified.") @@ -1155,7 +1155,7 @@ GUILE_PROC (scm_symlink, "symlink", 2, 0, 0, #undef FUNC_NAME -GUILE_PROC (scm_readlink, "readlink", 1, 0, 0, +SCM_DEFINE (scm_readlink, "readlink", 1, 0, 0, (SCM path), "Returns the value of the symbolic link named by @var{path} (a string), i.e., the @@ -1190,7 +1190,7 @@ file that the link points to.") #undef FUNC_NAME -GUILE_PROC (scm_lstat, "lstat", 1, 0, 0, +SCM_DEFINE (scm_lstat, "lstat", 1, 0, 0, (SCM str), "Similar to @code{stat}, but does not follow symbolic links, i.e., it will return information about a symbolic link itself, not the @@ -1224,7 +1224,7 @@ file it points to. @var{path} must be a string.") #undef FUNC_NAME -GUILE_PROC (scm_copy_file, "copy-file", 2, 0, 0, +SCM_DEFINE (scm_copy_file, "copy-file", 2, 0, 0, (SCM oldfile, SCM newfile), "Copy the file specified by @var{path-from} to @var{path-to}. The return value is unspecified.") @@ -1272,7 +1272,7 @@ The return value is unspecified.") SCM scm_dot_string; -GUILE_PROC (scm_dirname, "dirname", 1, 0, 0, +SCM_DEFINE (scm_dirname, "dirname", 1, 0, 0, (SCM filename), "") #define FUNC_NAME s_scm_dirname @@ -1298,7 +1298,7 @@ GUILE_PROC (scm_dirname, "dirname", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC (scm_basename, "basename", 1, 1, 0, +SCM_DEFINE (scm_basename, "basename", 1, 1, 0, (SCM filename, SCM suffix), "") #define FUNC_NAME s_scm_basename diff --git a/libguile/fluids.c b/libguile/fluids.c index 9f040d37a..96e459de5 100644 --- a/libguile/fluids.c +++ b/libguile/fluids.c @@ -118,7 +118,7 @@ int next_fluid_num () return n; } -GUILE_PROC (scm_make_fluid, "make-fluid", 0, 0, 0, +SCM_DEFINE (scm_make_fluid, "make-fluid", 0, 0, 0, (), "") #define FUNC_NAME s_scm_make_fluid @@ -131,7 +131,7 @@ GUILE_PROC (scm_make_fluid, "make-fluid", 0, 0, 0, } #undef FUNC_NAME -GUILE_PROC (scm_fluid_p, "fluid?", 1, 0, 0, +SCM_DEFINE (scm_fluid_p, "fluid?", 1, 0, 0, (SCM fl), "") #define FUNC_NAME s_scm_fluid_p @@ -140,7 +140,7 @@ GUILE_PROC (scm_fluid_p, "fluid?", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC (scm_fluid_ref, "fluid-ref", 1, 0, 0, +SCM_DEFINE (scm_fluid_ref, "fluid-ref", 1, 0, 0, (SCM fl), "") #define FUNC_NAME s_scm_fluid_ref @@ -157,7 +157,7 @@ GUILE_PROC (scm_fluid_ref, "fluid-ref", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC (scm_fluid_set_x, "fluid-set!", 2, 0, 0, +SCM_DEFINE (scm_fluid_set_x, "fluid-set!", 2, 0, 0, (SCM fl, SCM val), "") #define FUNC_NAME s_scm_fluid_set_x @@ -213,7 +213,7 @@ apply_thunk (void *thunk) return scm_apply ((SCM) thunk, SCM_EOL, SCM_EOL); } -GUILE_PROC (scm_with_fluids, "with-fluids*", 3, 0, 0, +SCM_DEFINE (scm_with_fluids, "with-fluids*", 3, 0, 0, (SCM fluids, SCM vals, SCM thunk), "") #define FUNC_NAME s_scm_with_fluids diff --git a/libguile/fports.c b/libguile/fports.c index 6df715592..eaa297fe5 100644 --- a/libguile/fports.c +++ b/libguile/fports.c @@ -129,7 +129,7 @@ scm_fport_buffer_add (SCM port, int read_size, int write_size) SCM_SETCAR (port, (SCM_CAR (port) | SCM_BUF0)); } -GUILE_PROC (scm_setvbuf, "setvbuf", 2, 1, 0, +SCM_DEFINE (scm_setvbuf, "setvbuf", 2, 1, 0, (SCM port, SCM mode, SCM size), "Set the buffering mode for @var{port}. @var{mode} can be: @table @code @@ -255,7 +255,7 @@ scm_evict_ports (int fd) * * Return the new port. */ -GUILE_PROC(scm_open_file, "open-file", 2, 0, 0, +SCM_DEFINE(scm_open_file, "open-file", 2, 0, 0, (SCM filename, SCM modes), "Open the file whose name is @var{string}, and return a port representing that file. The attributes of the port are diff --git a/libguile/gc.c b/libguile/gc.c index ef294f701..b0b6416af 100644 --- a/libguile/gc.c +++ b/libguile/gc.c @@ -243,7 +243,7 @@ which_seg (SCM cell) } -GUILE_PROC (scm_map_free_list, "map-free-list", 0, 0, 0, +SCM_DEFINE (scm_map_free_list, "map-free-list", 0, 0, 0, (), "") #define FUNC_NAME s_scm_map_free_list @@ -298,7 +298,7 @@ scm_check_freelist () static int scm_debug_check_freelist = 0; -GUILE_PROC (scm_gc_set_debug_check_freelist_x, "gc-set-debug-check-freelist!", 1, 0, 0, +SCM_DEFINE (scm_gc_set_debug_check_freelist_x, "gc-set-debug-check-freelist!", 1, 0, 0, (SCM flag), "") #define FUNC_NAME s_scm_gc_set_debug_check_freelist_x @@ -342,7 +342,7 @@ scm_debug_newcell (void) /* {Scheme Interface to GC} */ -GUILE_PROC (scm_gc_stats, "gc-stats", 0, 0, 0, +SCM_DEFINE (scm_gc_stats, "gc-stats", 0, 0, 0, (), "Returns an association list of statistics about Guile's current use of storage. ") #define FUNC_NAME s_scm_gc_stats @@ -407,7 +407,7 @@ scm_gc_end () } -GUILE_PROC (scm_object_address, "object-address", 1, 0, 0, +SCM_DEFINE (scm_object_address, "object-address", 1, 0, 0, (SCM obj), "Return an integer that for the lifetime of @var{obj} is uniquely returned by this function for @var{obj}") @@ -418,7 +418,7 @@ returned by this function for @var{obj}") #undef FUNC_NAME -GUILE_PROC(scm_gc, "gc", 0, 0, 0, +SCM_DEFINE(scm_gc, "gc", 0, 0, 0, (), "Scans all of SCM objects and reclaims for further use those that are no longer accessible.") @@ -1754,7 +1754,7 @@ alloc_some_heap (int ncells, SCM *freelistp) -GUILE_PROC (scm_unhash_name, "unhash-name", 1, 0, 0, +SCM_DEFINE (scm_unhash_name, "unhash-name", 1, 0, 0, (SCM name), "") #define FUNC_NAME s_scm_unhash_name diff --git a/libguile/gsubr.c b/libguile/gsubr.c index 399129343..47e44613b 100644 --- a/libguile/gsubr.c +++ b/libguile/gsubr.c @@ -129,7 +129,7 @@ scm_make_gsubr_with_generic (const char *name, } -GUILE_PROC(scm_gsubr_apply, "gsubr-apply", 0, 0, 1, +SCM_DEFINE(scm_gsubr_apply, "gsubr-apply", 0, 0, 1, (SCM args), "") #define FUNC_NAME s_scm_gsubr_apply diff --git a/libguile/guardians.c b/libguile/guardians.c index 66e1e00ff..403d228c9 100644 --- a/libguile/guardians.c +++ b/libguile/guardians.c @@ -149,7 +149,7 @@ guard (SCM cclo, SCM arg) static SCM guard1; -GUILE_PROC (scm_make_guardian, "make-guardian", 0, 0, 0, +SCM_DEFINE (scm_make_guardian, "make-guardian", 0, 0, 0, (), "") #define FUNC_NAME s_scm_make_guardian diff --git a/libguile/hash.c b/libguile/hash.c index dcf018903..e74d089e9 100644 --- a/libguile/hash.c +++ b/libguile/hash.c @@ -144,7 +144,7 @@ scm_ihashq (SCM obj, unsigned int n) } -GUILE_PROC(scm_hashq, "hashq", 2, 0, 0, +SCM_DEFINE(scm_hashq, "hashq", 2, 0, 0, (SCM obj, SCM n), "@deffnx primitive hashv key size @deffnx primitive hash key size @@ -176,7 +176,7 @@ scm_ihashv (SCM obj, unsigned int n) } -GUILE_PROC(scm_hashv, "hashv", 2, 0, 0, +SCM_DEFINE(scm_hashv, "hashv", 2, 0, 0, (SCM obj, SCM n), "") #define FUNC_NAME s_scm_hashv @@ -196,7 +196,7 @@ scm_ihash (SCM obj, unsigned int n) return (unsigned int)scm_hasher (obj, n, 10); } -GUILE_PROC(scm_hash, "hash", 2, 0, 0, +SCM_DEFINE(scm_hash, "hash", 2, 0, 0, (SCM obj, SCM n), "") #define FUNC_NAME s_scm_hash diff --git a/libguile/hashtab.c b/libguile/hashtab.c index 8f7d17472..f383563f7 100644 --- a/libguile/hashtab.c +++ b/libguile/hashtab.c @@ -164,7 +164,7 @@ scm_hash_fn_remove_x (SCM table,SCM obj,unsigned int (*hash_fn)(),SCM (*assoc_fn -GUILE_PROC (scm_hashq_get_handle, "hashq-get-handle", 2, 0, 0, +SCM_DEFINE (scm_hashq_get_handle, "hashq-get-handle", 2, 0, 0, (SCM table, SCM obj), "@deffnx primitive hashv-get-handle table key @deffnx primitive hash-get-handle table key @@ -182,7 +182,7 @@ only a @code{value}, @code{hashq-get-handle table key} returns the pair #undef FUNC_NAME -GUILE_PROC (scm_hashq_create_handle_x, "hashq-create-handle!", 3, 0, 0, +SCM_DEFINE (scm_hashq_create_handle_x, "hashq-create-handle!", 3, 0, 0, (SCM table, SCM obj, SCM init), "@deffnx primitive hashv-create-handle! table key init @deffnx primitive hash-create-handle! table key init @@ -197,7 +197,7 @@ associates @var{key} with @var{init}.") #undef FUNC_NAME -GUILE_PROC (scm_hashq_ref, "hashq-ref", 2, 1, 0, +SCM_DEFINE (scm_hashq_ref, "hashq-ref", 2, 1, 0, (SCM table, SCM obj, SCM dflt), "@deffnx primitive hashv-ref table key [default] @deffnx primitive hash-ref table key [default] @@ -215,7 +215,7 @@ supplied).") -GUILE_PROC (scm_hashq_set_x, "hashq-set!", 3, 0, 0, +SCM_DEFINE (scm_hashq_set_x, "hashq-set!", 3, 0, 0, (SCM table, SCM obj, SCM val), "@deffnx primitive hashv-set! table key value @deffnx primitive hash-set! table key value @@ -229,7 +229,7 @@ Find the entry in @var{table} associated with @var{key}, and store -GUILE_PROC (scm_hashq_remove_x, "hashq-remove!", 2, 0, 0, +SCM_DEFINE (scm_hashq_remove_x, "hashq-remove!", 2, 0, 0, (SCM table, SCM obj), "@deffnx primitive hashv-remove! table key @deffnx primitive hash-remove! table key @@ -243,7 +243,7 @@ Remove @var{key} (and any value associated with it) from @var{table}.") -GUILE_PROC (scm_hashv_get_handle, "hashv-get-handle", 2, 0, 0, +SCM_DEFINE (scm_hashv_get_handle, "hashv-get-handle", 2, 0, 0, (SCM table, SCM obj), "") #define FUNC_NAME s_scm_hashv_get_handle @@ -253,7 +253,7 @@ GUILE_PROC (scm_hashv_get_handle, "hashv-get-handle", 2, 0, 0, #undef FUNC_NAME -GUILE_PROC (scm_hashv_create_handle_x, "hashv-create-handle!", 3, 0, 0, +SCM_DEFINE (scm_hashv_create_handle_x, "hashv-create-handle!", 3, 0, 0, (SCM table, SCM obj, SCM init), "") #define FUNC_NAME s_scm_hashv_create_handle_x @@ -263,7 +263,7 @@ GUILE_PROC (scm_hashv_create_handle_x, "hashv-create-handle!", 3, 0, 0, #undef FUNC_NAME -GUILE_PROC (scm_hashv_ref, "hashv-ref", 2, 1, 0, +SCM_DEFINE (scm_hashv_ref, "hashv-ref", 2, 1, 0, (SCM table, SCM obj, SCM dflt), "") #define FUNC_NAME s_scm_hashv_ref @@ -276,7 +276,7 @@ GUILE_PROC (scm_hashv_ref, "hashv-ref", 2, 1, 0, -GUILE_PROC (scm_hashv_set_x, "hashv-set!", 3, 0, 0, +SCM_DEFINE (scm_hashv_set_x, "hashv-set!", 3, 0, 0, (SCM table, SCM obj, SCM val), "") #define FUNC_NAME s_scm_hashv_set_x @@ -286,7 +286,7 @@ GUILE_PROC (scm_hashv_set_x, "hashv-set!", 3, 0, 0, #undef FUNC_NAME -GUILE_PROC (scm_hashv_remove_x, "hashv-remove!", 2, 0, 0, +SCM_DEFINE (scm_hashv_remove_x, "hashv-remove!", 2, 0, 0, (SCM table, SCM obj), "") #define FUNC_NAME s_scm_hashv_remove_x @@ -297,7 +297,7 @@ GUILE_PROC (scm_hashv_remove_x, "hashv-remove!", 2, 0, 0, -GUILE_PROC (scm_hash_get_handle, "hash-get-handle", 2, 0, 0, +SCM_DEFINE (scm_hash_get_handle, "hash-get-handle", 2, 0, 0, (SCM table, SCM obj), "") #define FUNC_NAME s_scm_hash_get_handle @@ -307,7 +307,7 @@ GUILE_PROC (scm_hash_get_handle, "hash-get-handle", 2, 0, 0, #undef FUNC_NAME -GUILE_PROC (scm_hash_create_handle_x, "hash-create-handle!", 3, 0, 0, +SCM_DEFINE (scm_hash_create_handle_x, "hash-create-handle!", 3, 0, 0, (SCM table, SCM obj, SCM init), "") #define FUNC_NAME s_scm_hash_create_handle_x @@ -317,7 +317,7 @@ GUILE_PROC (scm_hash_create_handle_x, "hash-create-handle!", 3, 0, 0, #undef FUNC_NAME -GUILE_PROC (scm_hash_ref, "hash-ref", 2, 1, 0, +SCM_DEFINE (scm_hash_ref, "hash-ref", 2, 1, 0, (SCM table, SCM obj, SCM dflt), "") #define FUNC_NAME s_scm_hash_ref @@ -330,7 +330,7 @@ GUILE_PROC (scm_hash_ref, "hash-ref", 2, 1, 0, -GUILE_PROC (scm_hash_set_x, "hash-set!", 3, 0, 0, +SCM_DEFINE (scm_hash_set_x, "hash-set!", 3, 0, 0, (SCM table, SCM obj, SCM val), "") #define FUNC_NAME s_scm_hash_set_x @@ -341,7 +341,7 @@ GUILE_PROC (scm_hash_set_x, "hash-set!", 3, 0, 0, -GUILE_PROC (scm_hash_remove_x, "hash-remove!", 2, 0, 0, +SCM_DEFINE (scm_hash_remove_x, "hash-remove!", 2, 0, 0, (SCM table, SCM obj), "") #define FUNC_NAME s_scm_hash_remove_x @@ -405,7 +405,7 @@ scm_delx_x (SCM obj,SCM alist,struct scm_ihashx_closure * closure) -GUILE_PROC (scm_hashx_get_handle, "hashx-get-handle", 4, 0, 0, +SCM_DEFINE (scm_hashx_get_handle, "hashx-get-handle", 4, 0, 0, (SCM hash, SCM assoc, SCM table, SCM obj), "") #define FUNC_NAME s_scm_hashx_get_handle @@ -418,7 +418,7 @@ GUILE_PROC (scm_hashx_get_handle, "hashx-get-handle", 4, 0, 0, #undef FUNC_NAME -GUILE_PROC (scm_hashx_create_handle_x, "hashx-create-handle!", 5, 0, 0, +SCM_DEFINE (scm_hashx_create_handle_x, "hashx-create-handle!", 5, 0, 0, (SCM hash,SCM assoc,SCM table,SCM obj,SCM init), "") #define FUNC_NAME s_scm_hashx_create_handle_x @@ -432,7 +432,7 @@ GUILE_PROC (scm_hashx_create_handle_x, "hashx-create-handle!", 5, 0, 0, -GUILE_PROC (scm_hashx_ref, "hashx-ref", 4, 1, 0, +SCM_DEFINE (scm_hashx_ref, "hashx-ref", 4, 1, 0, (SCM hash,SCM assoc,SCM table,SCM obj,SCM dflt), "@deffnx primitive hashx-set! hasher assoc table key value @deffnx primitive hashx-remove! hasher assoc table key @@ -459,7 +459,7 @@ to @code{hashx-ref hashq assq table key}.") -GUILE_PROC (scm_hashx_set_x, "hashx-set!", 5, 0, 0, +SCM_DEFINE (scm_hashx_set_x, "hashx-set!", 5, 0, 0, (SCM hash, SCM assoc, SCM table, SCM obj, SCM val), "") #define FUNC_NAME s_scm_hashx_set_x @@ -489,7 +489,7 @@ fold_proc (void *proc, SCM key, SCM data, SCM value) return scm_apply ((SCM) proc, SCM_LIST3 (key, data, value), SCM_EOL); } -GUILE_PROC (scm_hash_fold, "hash-fold", 3, 0, 0, +SCM_DEFINE (scm_hash_fold, "hash-fold", 3, 0, 0, (SCM proc, SCM init, SCM table), "") #define FUNC_NAME s_scm_hash_fold diff --git a/libguile/ioext.c b/libguile/ioext.c index 3fc250d65..75c5e7e7f 100644 --- a/libguile/ioext.c +++ b/libguile/ioext.c @@ -67,7 +67,7 @@ #endif -GUILE_PROC (scm_read_delimited_x, "%read-delimited!", 3, 3, 0, +SCM_DEFINE (scm_read_delimited_x, "%read-delimited!", 3, 3, 0, (SCM delims, SCM buf, SCM gobble, SCM port, SCM start, SCM end), "Read characters from @var{port} into @var{buf} until one of the characters in the @var{delims} string is encountered. If @var{gobble?} @@ -228,7 +228,7 @@ scm_do_read_line (SCM port, int *len_p) * efficiently in Scheme. */ -GUILE_PROC (scm_read_line, "%read-line", 0, 1, 0, +SCM_DEFINE (scm_read_line, "%read-line", 0, 1, 0, (SCM port), "Read a newline-terminated line from @var{port}, allocating storage as necessary. The newline terminator (if any) is removed from the string, @@ -281,7 +281,7 @@ delimiter may be either a newline or the @var{eof-object}; if } #undef FUNC_NAME -GUILE_PROC (scm_write_line, "write-line", 1, 1, 0, +SCM_DEFINE (scm_write_line, "write-line", 1, 1, 0, (SCM obj, SCM port), "Display @var{obj} and a newline character to @var{port}. If @var{port} is not specified, @code{(current-output-port)} is used. This function @@ -298,7 +298,7 @@ is equivalent to: } #undef FUNC_NAME -GUILE_PROC (scm_ftell, "ftell", 1, 0, 0, +SCM_DEFINE (scm_ftell, "ftell", 1, 0, 0, (SCM object), "Returns an integer representing the current position of @var{fd/port}, measured from the beginning. Equivalent to: @@ -311,7 +311,7 @@ measured from the beginning. Equivalent to: } #undef FUNC_NAME -GUILE_PROC (scm_fseek, "fseek", 3, 0, 0, +SCM_DEFINE (scm_fseek, "fseek", 3, 0, 0, (SCM object, SCM offset, SCM whence), "Obsolete. Almost the same as seek, above, but the return value is unspecified.") @@ -322,7 +322,7 @@ unspecified.") } #undef FUNC_NAME -GUILE_PROC (scm_redirect_port, "redirect-port", 2, 0, 0, +SCM_DEFINE (scm_redirect_port, "redirect-port", 2, 0, 0, (SCM old, SCM new), "This procedure takes two ports and duplicates the underlying file descriptor from @var{old-port} into @var{new-port}. The @@ -371,7 +371,7 @@ revealed counts.") } #undef FUNC_NAME -GUILE_PROC (scm_dup_to_fdes, "dup->fdes", 1, 1, 0, +SCM_DEFINE (scm_dup_to_fdes, "dup->fdes", 1, 1, 0, (SCM fd_or_port, SCM fd), "Returns an integer file descriptor.") #define FUNC_NAME s_scm_dup_to_fdes @@ -411,7 +411,7 @@ GUILE_PROC (scm_dup_to_fdes, "dup->fdes", 1, 1, 0, } #undef FUNC_NAME -GUILE_PROC (scm_fileno, "fileno", 1, 0, 0, +SCM_DEFINE (scm_fileno, "fileno", 1, 0, 0, (SCM port), "Returns the integer file descriptor underlying @var{port}. Does not change its revealed count.") @@ -427,7 +427,7 @@ Does not change its revealed count.") an error if the arg is not a port? This proc as is would be better names isattyport? if it is not going to assume that the arg is a port */ -GUILE_PROC (scm_isatty_p, "isatty?", 1, 0, 0, +SCM_DEFINE (scm_isatty_p, "isatty?", 1, 0, 0, (SCM port), "Returns @code{#t} if @var{port} is using a serial non-file device, otherwise @code{#f}.") @@ -447,7 +447,7 @@ non-file device, otherwise @code{#f}.") -GUILE_PROC (scm_fdopen, "fdopen", 2, 0, 0, +SCM_DEFINE (scm_fdopen, "fdopen", 2, 0, 0, (SCM fdes, SCM modes), "Returns a new port based on the file descriptor @var{fdes}. Modes are given by the string @var{modes}. The revealed count of the port @@ -472,7 +472,7 @@ by @ref{File Ports, open-file}.") * #t if fdes moved. * MOVE->FDES is implemented in Scheme and calls this primitive. */ -GUILE_PROC (scm_primitive_move_to_fdes, "primitive-move->fdes", 2, 0, 0, +SCM_DEFINE (scm_primitive_move_to_fdes, "primitive-move->fdes", 2, 0, 0, (SCM port, SCM fd), "Moves the underlying file descriptor for @var{port} to the integer value @var{fdes} without changing the revealed count of @var{port}. @@ -509,7 +509,7 @@ required value or @code{#t} if it was moved.") #undef FUNC_NAME /* Return a list of ports using a given file descriptor. */ -GUILE_PROC(scm_fdes_to_ports, "fdes->ports", 1, 0, 0, +SCM_DEFINE(scm_fdes_to_ports, "fdes->ports", 1, 0, 0, (SCM fd), "Returns a list of existing ports which have @var{fdes} as an underlying file descriptor, without changing their revealed counts.") diff --git a/libguile/keywords.c b/libguile/keywords.c index d76ed5738..d15168387 100644 --- a/libguile/keywords.c +++ b/libguile/keywords.c @@ -68,7 +68,7 @@ int scm_tc16_keyword; int scm_tc16_kw; -GUILE_PROC (scm_make_keyword_from_dash_symbol, "make-keyword-from-dash-symbol", 1, 0, 0, +SCM_DEFINE (scm_make_keyword_from_dash_symbol, "make-keyword-from-dash-symbol", 1, 0, 0, (SCM symbol), "") #define FUNC_NAME s_scm_make_keyword_from_dash_symbol @@ -106,7 +106,7 @@ scm_c_make_keyword (char *s) return scm_make_keyword_from_dash_symbol (SCM_CAR (vcell)); } -GUILE_PROC(scm_keyword_p, "keyword?", 1, 0, 0, +SCM_DEFINE(scm_keyword_p, "keyword?", 1, 0, 0, (SCM obj), "@code{keyword?} returns @code{#t} if the argument @var{kw} is a keyword; it returns @code{#f} otherwise.") @@ -117,7 +117,7 @@ it returns @code{#f} otherwise.") #undef FUNC_NAME -GUILE_PROC(scm_keyword_dash_symbol, "keyword-dash-symbol", 1, 0, 0, +SCM_DEFINE(scm_keyword_dash_symbol, "keyword-dash-symbol", 1, 0, 0, (SCM keyword), "@code{keyword-dash-symbol} [FIXME: have no idea what this does; it is not commented.]") diff --git a/libguile/lang.c b/libguile/lang.c index 3fe42c1c5..b7df7b115 100644 --- a/libguile/lang.c +++ b/libguile/lang.c @@ -63,7 +63,7 @@ * in all data structures. */ -GUILE_PROC (scm_nil_cons, "nil-cons", 2, 0, 0, +SCM_DEFINE (scm_nil_cons, "nil-cons", 2, 0, 0, (SCM x, SCM y), "") #define FUNC_NAME s_scm_nil_cons @@ -77,7 +77,7 @@ GUILE_PROC (scm_nil_cons, "nil-cons", 2, 0, 0, #undef FUNC_NAME -GUILE_PROC (scm_nil_car, "nil-car", 1, 0, 0, +SCM_DEFINE (scm_nil_car, "nil-car", 1, 0, 0, (SCM x), "") #define FUNC_NAME s_scm_nil_car @@ -89,7 +89,7 @@ GUILE_PROC (scm_nil_car, "nil-car", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC (scm_nil_cdr, "nil-cdr", 1, 0, 0, +SCM_DEFINE (scm_nil_cdr, "nil-cdr", 1, 0, 0, (SCM x), "") #define FUNC_NAME s_scm_nil_cdr @@ -103,7 +103,7 @@ GUILE_PROC (scm_nil_cdr, "nil-cdr", 1, 0, 0, /* GJB:FIXME:: why does this return scm_nil instead of SCM_BOOL_F? Could use SCM_BOOL, below, otherwise */ -GUILE_PROC (scm_null, "null", 1, 0, 0, +SCM_DEFINE (scm_null, "null", 1, 0, 0, (SCM x), "") #define FUNC_NAME s_scm_null diff --git a/libguile/list.c b/libguile/list.c index af1ce636b..cce61b868 100644 --- a/libguile/list.c +++ b/libguile/list.c @@ -82,7 +82,7 @@ scm_listify (SCM elt, ...) } -GUILE_PROC(scm_list, "list", 0, 0, 1, +SCM_DEFINE(scm_list, "list", 0, 0, 1, (SCM objs), "") #define FUNC_NAME s_scm_list @@ -92,7 +92,7 @@ GUILE_PROC(scm_list, "list", 0, 0, 1, #undef FUNC_NAME -GUILE_PROC (scm_list_star, "list*", 1, 0, 1, +SCM_DEFINE (scm_list_star, "list*", 1, 0, 1, (SCM arg, SCM rest), "") #define FUNC_NAME s_scm_list_star @@ -115,7 +115,7 @@ GUILE_PROC (scm_list_star, "list*", 1, 0, 1, /* general questions about lists --- null?, list?, length, etc. */ -GUILE_PROC(scm_null_p, "null?", 1, 0, 0, +SCM_DEFINE(scm_null_p, "null?", 1, 0, 0, (SCM x), "") #define FUNC_NAME s_scm_null_p @@ -124,7 +124,7 @@ GUILE_PROC(scm_null_p, "null?", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC(scm_list_p, "list?", 1, 0, 0, +SCM_DEFINE(scm_list_p, "list?", 1, 0, 0, (SCM x), "") #define FUNC_NAME s_scm_list_p @@ -164,7 +164,7 @@ scm_ilength(SCM sx) return -1; } -GUILE_PROC(scm_length, "length", 1, 0, 0, +SCM_DEFINE(scm_length, "length", 1, 0, 0, (SCM lst), "") #define FUNC_NAME s_scm_length @@ -179,7 +179,7 @@ GUILE_PROC(scm_length, "length", 1, 0, 0, /* appending lists */ -GUILE_PROC (scm_append, "append", 0, 0, 1, +SCM_DEFINE (scm_append, "append", 0, 0, 1, (SCM args), "A destructive version of @code{append} (@pxref{Pairs and Lists,,,r4rs, The Revised^4 Report on Scheme}). The cdr field of each list's final @@ -214,7 +214,7 @@ performed. Return a pointer to the mutated list.") #undef FUNC_NAME -GUILE_PROC (scm_append_x, "append!", 0, 0, 1, +SCM_DEFINE (scm_append_x, "append!", 0, 0, 1, (SCM args), "") #define FUNC_NAME s_scm_append_x @@ -233,7 +233,7 @@ GUILE_PROC (scm_append_x, "append!", 0, 0, 1, #undef FUNC_NAME -GUILE_PROC(scm_last_pair, "last-pair", 1, 0, 0, +SCM_DEFINE(scm_last_pair, "last-pair", 1, 0, 0, (SCM sx), "Return a pointer to the last pair in @var{lst}, signalling an error if @var{lst} is circular.") @@ -262,7 +262,7 @@ GUILE_PROC(scm_last_pair, "last-pair", 1, 0, 0, /* reversing lists */ -GUILE_PROC (scm_reverse, "reverse", 1, 0, 0, +SCM_DEFINE (scm_reverse, "reverse", 1, 0, 0, (SCM ls), "A destructive version of @code{reverse} (@pxref{Pairs and Lists,,,r4rs, The Revised^4 Report on Scheme}). The cdr of each cell in @var{lst} is @@ -299,7 +299,7 @@ of the modified list is not lost, it is wise to save the return value of } #undef FUNC_NAME -GUILE_PROC (scm_reverse_x, "reverse!", 1, 1, 0, +SCM_DEFINE (scm_reverse_x, "reverse!", 1, 1, 0, (SCM ls, SCM new_tail), "") #define FUNC_NAME s_scm_reverse_x @@ -326,7 +326,7 @@ GUILE_PROC (scm_reverse_x, "reverse!", 1, 1, 0, /* indexing lists by element number */ -GUILE_PROC(scm_list_ref, "list-ref", 2, 0, 0, +SCM_DEFINE(scm_list_ref, "list-ref", 2, 0, 0, (SCM lst, SCM k), "") #define FUNC_NAME s_scm_list_ref @@ -344,7 +344,7 @@ GUILE_PROC(scm_list_ref, "list-ref", 2, 0, 0, } #undef FUNC_NAME -GUILE_PROC(scm_list_set_x, "list-set!", 3, 0, 0, +SCM_DEFINE(scm_list_set_x, "list-set!", 3, 0, 0, (SCM lst, SCM k, SCM val), "Set the @var{k}th element of @var{lst} to @var{val}.") #define FUNC_NAME s_scm_list_set_x @@ -366,7 +366,7 @@ GUILE_PROC(scm_list_set_x, "list-set!", 3, 0, 0, SCM_REGISTER_PROC(s_list_cdr_ref, "list-cdr-ref", 2, 0, 0, scm_list_tail); -GUILE_PROC(scm_list_tail, "list-tail", 2, 0, 0, +SCM_DEFINE(scm_list_tail, "list-tail", 2, 0, 0, (SCM lst, SCM k), "Return the \"tail\" of @var{lst} beginning with its @var{k}th element. The first element of the list is considered to be element 0. @@ -387,7 +387,7 @@ or returning the results of cdring @var{k} times down @var{lst}.") #undef FUNC_NAME -GUILE_PROC(scm_list_cdr_set_x, "list-cdr-set!", 3, 0, 0, +SCM_DEFINE(scm_list_cdr_set_x, "list-cdr-set!", 3, 0, 0, (SCM lst, SCM k, SCM val), "Set the @var{k}th cdr of @var{lst} to @var{val}.") #define FUNC_NAME s_scm_list_cdr_set_x @@ -410,7 +410,7 @@ erout: /* copying lists, perhaps partially */ -GUILE_PROC(scm_list_head, "list-head", 2, 0, 0, +SCM_DEFINE(scm_list_head, "list-head", 2, 0, 0, (SCM lst, SCM k), "Copy the first @var{k} elements from @var{lst} into a new list, and return it.") @@ -435,7 +435,7 @@ return it.") #undef FUNC_NAME -GUILE_PROC (scm_list_copy, "list-copy", 1, 0, 0, +SCM_DEFINE (scm_list_copy, "list-copy", 1, 0, 0, (SCM lst), "Return a (newly-created) copy of @var{lst}.") #define FUNC_NAME s_scm_list_copy @@ -463,7 +463,7 @@ GUILE_PROC (scm_list_copy, "list-copy", 1, 0, 0, /* membership tests (memq, memv, etc.) */ -GUILE_PROC (scm_sloppy_memq, "sloppy-memq", 2, 0, 0, +SCM_DEFINE (scm_sloppy_memq, "sloppy-memq", 2, 0, 0, (SCM x, SCM lst), "@deffnx primitive sloppy-memv @deffnx primitive sloppy-member @@ -483,7 +483,7 @@ in writing Guile internals, not for high-level Scheme programs.") #undef FUNC_NAME -GUILE_PROC (scm_sloppy_memv, "sloppy-memv", 2, 0, 0, +SCM_DEFINE (scm_sloppy_memv, "sloppy-memv", 2, 0, 0, (SCM x, SCM lst), "") #define FUNC_NAME s_scm_sloppy_memv @@ -498,7 +498,7 @@ GUILE_PROC (scm_sloppy_memv, "sloppy-memv", 2, 0, 0, #undef FUNC_NAME -GUILE_PROC (scm_sloppy_member, "sloppy-member", 2, 0, 0, +SCM_DEFINE (scm_sloppy_member, "sloppy-member", 2, 0, 0, (SCM x, SCM lst), "") #define FUNC_NAME s_scm_sloppy_member @@ -514,7 +514,7 @@ GUILE_PROC (scm_sloppy_member, "sloppy-member", 2, 0, 0, -GUILE_PROC(scm_memq, "memq", 2, 0, 0, +SCM_DEFINE(scm_memq, "memq", 2, 0, 0, (SCM x, SCM lst), "") #define FUNC_NAME s_scm_memq @@ -528,7 +528,7 @@ GUILE_PROC(scm_memq, "memq", 2, 0, 0, -GUILE_PROC(scm_memv, "memv", 2, 0, 0, +SCM_DEFINE(scm_memv, "memv", 2, 0, 0, (SCM x, SCM lst), "") #define FUNC_NAME s_scm_memv @@ -541,7 +541,7 @@ GUILE_PROC(scm_memv, "memv", 2, 0, 0, #undef FUNC_NAME -GUILE_PROC(scm_member, "member", 2, 0, 0, +SCM_DEFINE(scm_member, "member", 2, 0, 0, (SCM x, SCM lst), "") #define FUNC_NAME s_scm_member @@ -557,7 +557,7 @@ GUILE_PROC(scm_member, "member", 2, 0, 0, /* deleting elements from a list (delq, etc.) */ -GUILE_PROC(scm_delq_x, "delq!", 2, 0, 0, +SCM_DEFINE(scm_delq_x, "delq!", 2, 0, 0, (SCM item, SCM lst), "@deffnx primitive delv! item lst @deffnx primitive delete! item lst @@ -587,7 +587,7 @@ destructive list functions, these functions cannot modify the binding of #undef FUNC_NAME -GUILE_PROC(scm_delv_x, "delv!", 2, 0, 0, +SCM_DEFINE(scm_delv_x, "delv!", 2, 0, 0, (SCM item, SCM lst), "") #define FUNC_NAME s_scm_delv_x @@ -611,7 +611,7 @@ GUILE_PROC(scm_delv_x, "delv!", 2, 0, 0, -GUILE_PROC(scm_delete_x, "delete!", 2, 0, 0, +SCM_DEFINE(scm_delete_x, "delete!", 2, 0, 0, (SCM item, SCM lst), "") #define FUNC_NAME s_scm_delete_x @@ -637,7 +637,7 @@ GUILE_PROC(scm_delete_x, "delete!", 2, 0, 0, -GUILE_PROC (scm_delq, "delq", 2, 0, 0, +SCM_DEFINE (scm_delq, "delq", 2, 0, 0, (SCM item, SCM lst), "@deffnx primitive delv item lst @deffnx primitive delete item lst @@ -652,7 +652,7 @@ procedures mirror @code{memq}, @code{memv} and @code{member}: } #undef FUNC_NAME -GUILE_PROC (scm_delv, "delv", 2, 0, 0, +SCM_DEFINE (scm_delv, "delv", 2, 0, 0, (SCM item, SCM lst), "") #define FUNC_NAME s_scm_delv @@ -662,7 +662,7 @@ GUILE_PROC (scm_delv, "delv", 2, 0, 0, } #undef FUNC_NAME -GUILE_PROC (scm_delete, "delete", 2, 0, 0, +SCM_DEFINE (scm_delete, "delete", 2, 0, 0, (SCM item, SCM lst), "") #define FUNC_NAME s_scm_delete @@ -673,7 +673,7 @@ GUILE_PROC (scm_delete, "delete", 2, 0, 0, #undef FUNC_NAME -GUILE_PROC(scm_delq1_x, "delq1!", 2, 0, 0, +SCM_DEFINE(scm_delq1_x, "delq1!", 2, 0, 0, (SCM item, SCM lst), "") #define FUNC_NAME s_scm_delq1_x @@ -699,7 +699,7 @@ GUILE_PROC(scm_delq1_x, "delq1!", 2, 0, 0, #undef FUNC_NAME -GUILE_PROC(scm_delv1_x, "delv1!", 2, 0, 0, +SCM_DEFINE(scm_delv1_x, "delv1!", 2, 0, 0, (SCM item, SCM lst), "") #define FUNC_NAME s_scm_delv1_x @@ -725,7 +725,7 @@ GUILE_PROC(scm_delv1_x, "delv1!", 2, 0, 0, #undef FUNC_NAME -GUILE_PROC(scm_delete1_x, "delete1!", 2, 0, 0, +SCM_DEFINE(scm_delete1_x, "delete1!", 2, 0, 0, (SCM item, SCM lst), "") #define FUNC_NAME s_scm_delete1_x diff --git a/libguile/load.c b/libguile/load.c index 689cbe8c9..42c0bea7c 100644 --- a/libguile/load.c +++ b/libguile/load.c @@ -97,7 +97,7 @@ load (void *data) return SCM_UNSPECIFIED; } -GUILE_PROC(scm_primitive_load, "primitive-load", 1, 0, 0, +SCM_DEFINE(scm_primitive_load, "primitive-load", 1, 0, 0, (SCM filename), "Load @var{file} and evaluate its contents in the top-level environment. The load paths are not searched; @var{file} must either be a full @@ -136,7 +136,7 @@ that will be called before any code is loaded. See documentation for /* Builtin path to scheme library files. */ #ifdef SCM_PKGDATA_DIR -GUILE_PROC (scm_sys_package_data_dir, "%package-data-dir", 0, 0, 0, +SCM_DEFINE (scm_sys_package_data_dir, "%package-data-dir", 0, 0, 0, (), "Return the name of the directory where Scheme packages, modules and libraries are kept. On most Unix systems, this will be @@ -149,7 +149,7 @@ libraries are kept. On most Unix systems, this will be #endif /* SCM_PKGDATA_DIR */ #ifdef SCM_LIBRARY_DIR -GUILE_PROC (scm_sys_library_dir, "%library-dir", 0,0,0, +SCM_DEFINE (scm_sys_library_dir, "%library-dir", 0,0,0, (), "Return the directory where the Guile Scheme library files are installed. E.g., may return \"/usr/share/guile/1.3.5\".") @@ -161,7 +161,7 @@ E.g., may return \"/usr/share/guile/1.3.5\".") #endif /* SCM_LIBRARY_DIR */ #ifdef SCM_SITE_DIR -GUILE_PROC (scm_sys_site_dir, "%site-dir", 0,0,0, +SCM_DEFINE (scm_sys_site_dir, "%site-dir", 0,0,0, (), "Return the directory where the Guile site files are installed. E.g., may return \"/usr/share/guile/site\".") @@ -211,7 +211,7 @@ scm_internal_parse_path (char *path, SCM tail) } -GUILE_PROC (scm_parse_path, "parse-path", 1, 1, 0, +SCM_DEFINE (scm_parse_path, "parse-path", 1, 1, 0, (SCM path, SCM tail), "") #define FUNC_NAME s_scm_parse_path @@ -256,7 +256,7 @@ SCM scm_listofnullstr; If FILENAME is absolute, return it unchanged. If given, EXTENSIONS is a list of strings; for each directory in PATH, we search for FILENAME concatenated with each EXTENSION. */ -GUILE_PROC(scm_search_path, "search-path", 2, 1, 0, +SCM_DEFINE(scm_search_path, "search-path", 2, 1, 0, (SCM path, SCM filename, SCM extensions), "") #define FUNC_NAME s_scm_search_path @@ -399,7 +399,7 @@ GUILE_PROC(scm_search_path, "search-path", 2, 1, 0, The file must be readable, and not a directory. If we find one, return its full filename; otherwise, return #f. If FILENAME is absolute, return it unchanged. */ -GUILE_PROC(scm_sys_search_load_path, "%search-load-path", 1, 0, 0, +SCM_DEFINE(scm_sys_search_load_path, "%search-load-path", 1, 0, 0, (SCM filename), "Search @var{%load-path} for @var{file}, which must be readable by the current user. If @var{file} is found in the list of paths to search or @@ -423,7 +423,7 @@ extension automatically.") #undef FUNC_NAME -GUILE_PROC(scm_primitive_load_path, "primitive-load-path", 1, 0, 0, +SCM_DEFINE(scm_primitive_load_path, "primitive-load-path", 1, 0, 0, (SCM filename), "Search @var{%load-path} for @var{file} and load it into the top-level environment. If @var{file} is a relative pathname and is not found in @@ -458,7 +458,7 @@ the list of search paths, an error is signalled.") SCM_SYMBOL (scm_end_of_file_key, "end-of-file"); -GUILE_PROC (scm_read_and_eval_x, "read-and-eval!", 0, 1, 0, +SCM_DEFINE (scm_read_and_eval_x, "read-and-eval!", 0, 1, 0, (SCM port), "Read a form from @var{port} (standard input by default), and evaluate it (memoizing it in the process) in the top-level environment. If no data diff --git a/libguile/macros.c b/libguile/macros.c index ed52dd9e8..f57a4bb25 100644 --- a/libguile/macros.c +++ b/libguile/macros.c @@ -52,7 +52,7 @@ long scm_tc16_macro; -GUILE_PROC (scm_makacro, "procedure->syntax", 1, 0, 0, +SCM_DEFINE (scm_makacro, "procedure->syntax", 1, 0, 0, (SCM code), "") #define FUNC_NAME s_scm_makacro @@ -63,7 +63,7 @@ GUILE_PROC (scm_makacro, "procedure->syntax", 1, 0, 0, #undef FUNC_NAME -GUILE_PROC(scm_makmacro, "procedure->macro", 1, 0, 0, +SCM_DEFINE(scm_makmacro, "procedure->macro", 1, 0, 0, (SCM code), "") #define FUNC_NAME s_scm_makmacro @@ -74,7 +74,7 @@ GUILE_PROC(scm_makmacro, "procedure->macro", 1, 0, 0, #undef FUNC_NAME -GUILE_PROC(scm_makmmacro, "procedure->memoizing-macro", 1, 0, 0, +SCM_DEFINE(scm_makmmacro, "procedure->memoizing-macro", 1, 0, 0, (SCM code), "") #define FUNC_NAME s_scm_makmmacro @@ -85,7 +85,7 @@ GUILE_PROC(scm_makmmacro, "procedure->memoizing-macro", 1, 0, 0, #undef FUNC_NAME -GUILE_PROC (scm_macro_p, "macro?", 1, 0, 0, +SCM_DEFINE (scm_macro_p, "macro?", 1, 0, 0, (SCM obj), "Return @code{#t} if @var{obj} is a regular macro, a memoizing macro or a syntax transformer.") @@ -100,7 +100,7 @@ SCM_SYMBOL (scm_sym_syntax, "syntax"); SCM_SYMBOL (scm_sym_macro, "macro"); SCM_SYMBOL (scm_sym_mmacro, "macro!"); -GUILE_PROC (scm_macro_type, "macro-type", 1, 0, 0, +SCM_DEFINE (scm_macro_type, "macro-type", 1, 0, 0, (SCM m), "Return one of the symbols @code{syntax}, @code{macro} or @code{macro!}, depending on whether @var{obj} is a syntax tranformer, a regular macro, @@ -121,7 +121,7 @@ or a memoizing macro, respectively. If @var{obj} is not a macro, #undef FUNC_NAME -GUILE_PROC (scm_macro_name, "macro-name", 1, 0, 0, +SCM_DEFINE (scm_macro_name, "macro-name", 1, 0, 0, (SCM m), "") #define FUNC_NAME s_scm_macro_name @@ -132,7 +132,7 @@ GUILE_PROC (scm_macro_name, "macro-name", 1, 0, 0, #undef FUNC_NAME -GUILE_PROC (scm_macro_transformer, "macro-transformer", 1, 0, 0, +SCM_DEFINE (scm_macro_transformer, "macro-transformer", 1, 0, 0, (SCM m), "") #define FUNC_NAME s_scm_macro_transformer diff --git a/libguile/net_db.c b/libguile/net_db.c index 9cdf52ba3..73b8384ce 100644 --- a/libguile/net_db.c +++ b/libguile/net_db.c @@ -82,7 +82,7 @@ int close (); extern int inet_aton (); -GUILE_PROC (scm_inet_aton, "inet-aton", 1, 0, 0, +SCM_DEFINE (scm_inet_aton, "inet-aton", 1, 0, 0, (SCM address), "Converts a string containing an Internet host address in the traditional dotted decimal notation into an integer. @@ -105,7 +105,7 @@ dotted decimal notation into an integer. #undef FUNC_NAME -GUILE_PROC (scm_inet_ntoa, "inet-ntoa", 1, 0, 0, +SCM_DEFINE (scm_inet_ntoa, "inet-ntoa", 1, 0, 0, (SCM inetid), "Converts an integer Internet host address into a string with the traditional dotted decimal representation. @@ -126,7 +126,7 @@ traditional dotted decimal representation. #undef FUNC_NAME #ifdef HAVE_INET_NETOF -GUILE_PROC (scm_inet_netof, "inet-netof", 1, 0, 0, +SCM_DEFINE (scm_inet_netof, "inet-netof", 1, 0, 0, (SCM address), "Returns the network number part of the given integer Internet address. @@ -143,7 +143,7 @@ GUILE_PROC (scm_inet_netof, "inet-netof", 1, 0, 0, #endif #ifdef HAVE_INET_LNAOF -GUILE_PROC (scm_lnaof, "inet-lnaof", 1, 0, 0, +SCM_DEFINE (scm_lnaof, "inet-lnaof", 1, 0, 0, (SCM address), "Returns the local-address-with-network part of the given Internet address. @@ -161,7 +161,7 @@ address. #endif #ifdef HAVE_INET_MAKEADDR -GUILE_PROC (scm_inet_makeaddr, "inet-makeaddr", 2, 0, 0, +SCM_DEFINE (scm_inet_makeaddr, "inet-makeaddr", 2, 0, 0, (SCM net, SCM lna), "Makes an Internet host address by combining the network number @var{net} with the local-address-within-network number @var{lna}. @@ -234,7 +234,7 @@ static void scm_resolv_error (const char *subr, SCM bad_value) Should use reentrant facilities if available. */ -GUILE_PROC (scm_gethost, "gethost", 0, 1, 0, +SCM_DEFINE (scm_gethost, "gethost", 0, 1, 0, (SCM name), "@deffnx procedure gethostbyname hostname @deffnx procedure gethostbyaddr address @@ -319,7 +319,7 @@ Unusual conditions may result in errors thrown to the operation?), but it seems to work okay. We'll see. */ #if defined(HAVE_GETNETENT) && defined(HAVE_GETNETBYNAME) && defined(HAVE_GETNETBYADDR) -GUILE_PROC (scm_getnet, "getnet", 0, 1, 0, +SCM_DEFINE (scm_getnet, "getnet", 0, 1, 0, (SCM name), "@deffnx procedure getnetbyname net-name @deffnx procedure getnetbyaddr net-number @@ -372,7 +372,7 @@ given.") #endif #ifdef HAVE_GETPROTOENT -GUILE_PROC (scm_getproto, "getproto", 0, 1, 0, +SCM_DEFINE (scm_getproto, "getproto", 0, 1, 0, (SCM name), "@deffnx procedure getprotobyname name @deffnx procedure getprotobynumber number @@ -438,7 +438,7 @@ scm_return_entry (struct servent *entry) } #ifdef HAVE_GETSERVENT -GUILE_PROC (scm_getserv, "getserv", 0, 2, 0, +SCM_DEFINE (scm_getserv, "getserv", 0, 2, 0, (SCM name, SCM proto), "@deffnx procedure getservbyname name protocol @deffnx procedure getservbyport port protocol @@ -487,7 +487,7 @@ as its first argument; if given no arguments, it behaves like #endif #if defined(HAVE_SETHOSTENT) && defined(HAVE_ENDHOSTENT) -GUILE_PROC (scm_sethost, "sethost", 0, 1, 0, +SCM_DEFINE (scm_sethost, "sethost", 0, 1, 0, (SCM arg), "If @var{stayopen} is omitted, this is equivalent to @code{endhostent}. Otherwise it is equivalent to @code{sethostent stayopen}.") @@ -503,7 +503,7 @@ Otherwise it is equivalent to @code{sethostent stayopen}.") #endif #if defined(HAVE_SETNETENT) && defined(HAVE_ENDNETENT) -GUILE_PROC (scm_setnet, "setnet", 0, 1, 0, +SCM_DEFINE (scm_setnet, "setnet", 0, 1, 0, (SCM arg), "If @var{stayopen} is omitted, this is equivalent to @code{endnetent}. Otherwise it is equivalent to @code{setnetent stayopen}.") @@ -519,7 +519,7 @@ Otherwise it is equivalent to @code{setnetent stayopen}.") #endif #if defined(HAVE_SETPROTOENT) && defined(HAVE_ENDPROTOENT) -GUILE_PROC (scm_setproto, "setproto", 0, 1, 0, +SCM_DEFINE (scm_setproto, "setproto", 0, 1, 0, (SCM arg), "If @var{stayopen} is omitted, this is equivalent to @code{endprotoent}. Otherwise it is equivalent to @code{setprotoent stayopen}.") @@ -535,7 +535,7 @@ Otherwise it is equivalent to @code{setprotoent stayopen}.") #endif #if defined(HAVE_SETSERVENT) && defined(HAVE_ENDSERVENT) -GUILE_PROC (scm_setserv, "setserv", 0, 1, 0, +SCM_DEFINE (scm_setserv, "setserv", 0, 1, 0, (SCM arg), "If @var{stayopen} is omitted, this is equivalent to @code{endservent}. Otherwise it is equivalent to @code{setservent stayopen}.") diff --git a/libguile/numbers.c b/libguile/numbers.c index c3b8fdedd..28253c767 100644 --- a/libguile/numbers.c +++ b/libguile/numbers.c @@ -95,7 +95,7 @@ -GUILE_PROC (scm_exact_p, "exact?", 1, 0, 0, +SCM_DEFINE (scm_exact_p, "exact?", 1, 0, 0, (SCM x), "") #define FUNC_NAME s_scm_exact_p @@ -110,7 +110,7 @@ GUILE_PROC (scm_exact_p, "exact?", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC (scm_odd_p, "odd?", 1, 0, 0, +SCM_DEFINE (scm_odd_p, "odd?", 1, 0, 0, (SCM n), "") #define FUNC_NAME s_scm_odd_p @@ -128,7 +128,7 @@ GUILE_PROC (scm_odd_p, "odd?", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC (scm_even_p, "even?", 1, 0, 0, +SCM_DEFINE (scm_even_p, "even?", 1, 0, 0, (SCM n), "") #define FUNC_NAME s_scm_even_p @@ -584,7 +584,7 @@ Example: } #undef FUNC_NAME -GUILE_PROC (scm_logtest, "logtest", 2, 0, 0, +SCM_DEFINE (scm_logtest, "logtest", 2, 0, 0, (SCM n1, SCM n2), "") #define FUNC_NAME s_scm_logtest @@ -597,7 +597,7 @@ GUILE_PROC (scm_logtest, "logtest", 2, 0, 0, #undef FUNC_NAME -GUILE_PROC (scm_logbit_p, "logbit?", 2, 0, 0, +SCM_DEFINE (scm_logbit_p, "logbit?", 2, 0, 0, (SCM n1, SCM n2), "") #define FUNC_NAME s_scm_logbit_p @@ -665,7 +665,7 @@ GUILE_PROC1 (scm_logxor, "logxor", scm_tc7_asubr, } #undef FUNC_NAME -GUILE_PROC (scm_logtest, "logtest", 2, 0, 0, +SCM_DEFINE (scm_logtest, "logtest", 2, 0, 0, (SCM n1, SCM n2), "@example (logtest j k) @equiv{} (not (zero? (logand j k))) @@ -682,7 +682,7 @@ GUILE_PROC (scm_logtest, "logtest", 2, 0, 0, } #undef FUNC_NAME -GUILE_PROC (scm_logbit_p, "logbit?", 2, 0, 0, +SCM_DEFINE (scm_logbit_p, "logbit?", 2, 0, 0, (SCM n1, SCM n2), "@example (logbit? index j) @equiv{} (logtest (integer-expt 2 index) j) @@ -703,7 +703,7 @@ GUILE_PROC (scm_logbit_p, "logbit?", 2, 0, 0, #undef FUNC_NAME #endif -GUILE_PROC (scm_lognot, "lognot", 1, 0, 0, +SCM_DEFINE (scm_lognot, "lognot", 1, 0, 0, (SCM n), "Returns the integer which is the 2s-complement of the integer argument. @@ -722,7 +722,7 @@ Example: } #undef FUNC_NAME -GUILE_PROC (scm_integer_expt, "integer-expt", 2, 0, 0, +SCM_DEFINE (scm_integer_expt, "integer-expt", 2, 0, 0, (SCM z1, SCM z2), "Returns @var{n} raised to the non-negative integer exponent @var{k}. @@ -763,7 +763,7 @@ Example: } #undef FUNC_NAME -GUILE_PROC (scm_ash, "ash", 2, 0, 0, +SCM_DEFINE (scm_ash, "ash", 2, 0, 0, (SCM n, SCM cnt), "Returns an integer equivalent to @code{(inexact->exact (floor (* @var{int} (expt 2 @var{count}))))}.@refill @@ -806,7 +806,7 @@ Example: #undef FUNC_NAME /* GJB:FIXME: do not use SCMs as integers! */ -GUILE_PROC (scm_bit_extract, "bit-extract", 3, 0, 0, +SCM_DEFINE (scm_bit_extract, "bit-extract", 3, 0, 0, (SCM n, SCM start, SCM end), "Returns the integer composed of the @var{start} (inclusive) through @var{end} (exclusive) bits of @var{n}. The @var{start}th bit becomes @@ -845,7 +845,7 @@ static const char scm_logtab[] = { 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4 }; -GUILE_PROC (scm_logcount, "logcount", 1, 0, 0, +SCM_DEFINE (scm_logcount, "logcount", 1, 0, 0, (SCM n), "Returns the number of bits in integer @var{n}. If integer is positive, the 1-bits in its binary representation are counted. If negative, the @@ -895,7 +895,7 @@ static const char scm_ilentab[] = { 0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4 }; -GUILE_PROC (scm_integer_length, "integer-length", 1, 0, 0, +SCM_DEFINE (scm_integer_length, "integer-length", 1, 0, 0, (SCM n), "Returns the number of bits neccessary to represent @var{n}. @@ -1856,7 +1856,7 @@ big2str (SCM b, unsigned int radix) #endif -GUILE_PROC (scm_number_to_string, "number->string", 1, 1, 0, +SCM_DEFINE (scm_number_to_string, "number->string", 1, 1, 0, (SCM x, SCM radix), "") #define FUNC_NAME s_scm_number_to_string @@ -2458,7 +2458,7 @@ scm_istring2number (char *str, long len, long radix) } -GUILE_PROC (scm_string_to_number, "string->number", 1, 1, 0, +SCM_DEFINE (scm_string_to_number, "string->number", 1, 1, 0, (SCM str, SCM radix), "") #define FUNC_NAME s_scm_string_to_number @@ -2542,7 +2542,7 @@ scm_floequal (SCM x, SCM y) SCM_REGISTER_PROC (s_number_p, "number?", 1, 0, 0, scm_number_p); -GUILE_PROC (scm_number_p, "complex?", 1, 0, 0, +SCM_DEFINE (scm_number_p, "complex?", 1, 0, 0, (SCM x), "") #define FUNC_NAME s_scm_number_p @@ -2568,7 +2568,7 @@ GUILE_PROC (scm_number_p, "complex?", 1, 0, 0, SCM_REGISTER_PROC (s_real_p, "real?", 1, 0, 0, scm_real_p); -GUILE_PROC (scm_real_p, "rational?", 1, 0, 0, +SCM_DEFINE (scm_real_p, "rational?", 1, 0, 0, (SCM x), "") #define FUNC_NAME s_scm_real_p @@ -2589,7 +2589,7 @@ GUILE_PROC (scm_real_p, "rational?", 1, 0, 0, -GUILE_PROC (scm_integer_p, "integer?", 1, 0, 0, +SCM_DEFINE (scm_integer_p, "integer?", 1, 0, 0, (SCM x), "") #define FUNC_NAME s_scm_integer_p @@ -2618,7 +2618,7 @@ GUILE_PROC (scm_integer_p, "integer?", 1, 0, 0, #endif /* SCM_FLOATS */ -GUILE_PROC (scm_inexact_p, "inexact?", 1, 0, 0, +SCM_DEFINE (scm_inexact_p, "inexact?", 1, 0, 0, (SCM x), "") #define FUNC_NAME s_scm_inexact_p @@ -4244,7 +4244,7 @@ scm_two_doubles (SCM z1, SCM z2, const char *sstring, struct dpair *xy) -GUILE_PROC (scm_sys_expt, "$expt", 2, 0, 0, +SCM_DEFINE (scm_sys_expt, "$expt", 2, 0, 0, (SCM z1, SCM z2), "") #define FUNC_NAME s_scm_sys_expt @@ -4257,7 +4257,7 @@ GUILE_PROC (scm_sys_expt, "$expt", 2, 0, 0, -GUILE_PROC (scm_sys_atan2, "$atan2", 2, 0, 0, +SCM_DEFINE (scm_sys_atan2, "$atan2", 2, 0, 0, (SCM z1, SCM z2), "") #define FUNC_NAME s_scm_sys_atan2 @@ -4270,7 +4270,7 @@ GUILE_PROC (scm_sys_atan2, "$atan2", 2, 0, 0, -GUILE_PROC (scm_make_rectangular, "make-rectangular", 2, 0, 0, +SCM_DEFINE (scm_make_rectangular, "make-rectangular", 2, 0, 0, (SCM z1, SCM z2), "") #define FUNC_NAME s_scm_make_rectangular @@ -4283,7 +4283,7 @@ GUILE_PROC (scm_make_rectangular, "make-rectangular", 2, 0, 0, -GUILE_PROC (scm_make_polar, "make-polar", 2, 0, 0, +SCM_DEFINE (scm_make_polar, "make-polar", 2, 0, 0, (SCM z1, SCM z2), "") #define FUNC_NAME s_scm_make_polar @@ -4421,7 +4421,7 @@ scm_angle (SCM z) } -GUILE_PROC (scm_inexact_to_exact, "inexact->exact", 1, 0, 0, +SCM_DEFINE (scm_inexact_to_exact, "inexact->exact", 1, 0, 0, (SCM z), "") #define FUNC_NAME s_scm_inexact_to_exact diff --git a/libguile/objects.c b/libguile/objects.c index 358b3a3e6..17c852f2c 100644 --- a/libguile/objects.c +++ b/libguile/objects.c @@ -359,7 +359,7 @@ scm_call_generic_3 (SCM gf, SCM a1, SCM a2, SCM a3) return scm_apply_generic (gf, SCM_LIST3 (a1, a2, a3)); } -GUILE_PROC (scm_entity_p, "entity?", 1, 0, 0, +SCM_DEFINE (scm_entity_p, "entity?", 1, 0, 0, (SCM obj), "") #define FUNC_NAME s_scm_entity_p @@ -368,7 +368,7 @@ GUILE_PROC (scm_entity_p, "entity?", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC (scm_operator_p, "operator?", 1, 0, 0, +SCM_DEFINE (scm_operator_p, "operator?", 1, 0, 0, (SCM obj), "") #define FUNC_NAME s_scm_operator_p @@ -379,7 +379,7 @@ GUILE_PROC (scm_operator_p, "operator?", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC (scm_set_object_procedure_x, "set-object-procedure!", 2, 0, 0, +SCM_DEFINE (scm_set_object_procedure_x, "set-object-procedure!", 2, 0, 0, (SCM obj, SCM proc), "") #define FUNC_NAME s_scm_set_object_procedure_x @@ -402,7 +402,7 @@ GUILE_PROC (scm_set_object_procedure_x, "set-object-procedure!", 2, 0, 0, #undef FUNC_NAME #ifdef GUILE_DEBUG -GUILE_PROC (scm_object_procedure, "object-procedure", 1, 0, 0, +SCM_DEFINE (scm_object_procedure, "object-procedure", 1, 0, 0, (SCM obj), "") #define FUNC_NAME s_scm_object_procedure @@ -437,7 +437,7 @@ scm_i_make_class_object (SCM meta, return c; } -GUILE_PROC (scm_make_class_object, "make-class-object", 2, 0, 0, +SCM_DEFINE (scm_make_class_object, "make-class-object", 2, 0, 0, (SCM metaclass, SCM layout), "") #define FUNC_NAME s_scm_make_class_object @@ -451,7 +451,7 @@ GUILE_PROC (scm_make_class_object, "make-class-object", 2, 0, 0, } #undef FUNC_NAME -GUILE_PROC (scm_make_subclass_object, "make-subclass-object", 2, 0, 0, +SCM_DEFINE (scm_make_subclass_object, "make-subclass-object", 2, 0, 0, (SCM class, SCM layout), "") #define FUNC_NAME s_scm_make_subclass_object diff --git a/libguile/objprop.c b/libguile/objprop.c index 5d53dc031..b955cd74e 100644 --- a/libguile/objprop.c +++ b/libguile/objprop.c @@ -56,7 +56,7 @@ /* {Object Properties} */ -GUILE_PROC(scm_object_properties, "object-properties", 1, 0, 0, +SCM_DEFINE(scm_object_properties, "object-properties", 1, 0, 0, (SCM obj), "@deffnx primitive procedure-properties obj Return @var{obj}'s property list.") @@ -67,7 +67,7 @@ Return @var{obj}'s property list.") #undef FUNC_NAME -GUILE_PROC(scm_set_object_properties_x, "set-object-properties!", 2, 0, 0, +SCM_DEFINE(scm_set_object_properties_x, "set-object-properties!", 2, 0, 0, (SCM obj, SCM plist), "@deffnx primitive set-procedure-properties! obj alist Set @var{obj}'s property list to @var{alist}.") @@ -79,7 +79,7 @@ Set @var{obj}'s property list to @var{alist}.") } #undef FUNC_NAME -GUILE_PROC(scm_object_property, "object-property", 2, 0, 0, +SCM_DEFINE(scm_object_property, "object-property", 2, 0, 0, (SCM obj, SCM key), "@deffnx primitive procedure-property obj key Return the property of @var{obj} with name @var{key}.") @@ -91,7 +91,7 @@ Return the property of @var{obj} with name @var{key}.") } #undef FUNC_NAME -GUILE_PROC(scm_set_object_property_x, "set-object-property!", 3, 0, 0, +SCM_DEFINE(scm_set_object_property_x, "set-object-property!", 3, 0, 0, (SCM obj, SCM key, SCM val), "@deffnx primitive set-procedure-property! obj key value In @var{obj}'s property list, set the property named @var{key} to diff --git a/libguile/pairs.c b/libguile/pairs.c index 96f1896e7..aab418815 100644 --- a/libguile/pairs.c +++ b/libguile/pairs.c @@ -54,7 +54,7 @@ /* {Pairs} */ -GUILE_PROC(scm_cons, "cons", 2, 0, 0, +SCM_DEFINE(scm_cons, "cons", 2, 0, 0, (SCM x, SCM y), "") #define FUNC_NAME s_scm_cons @@ -83,7 +83,7 @@ scm_cons2 (SCM w, SCM x, SCM y) } -GUILE_PROC (scm_pair_p, "pair?", 1, 0, 0, +SCM_DEFINE (scm_pair_p, "pair?", 1, 0, 0, (SCM x), "") #define FUNC_NAME s_scm_pair_p @@ -94,7 +94,7 @@ GUILE_PROC (scm_pair_p, "pair?", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC (scm_set_car_x, "set-car!", 2, 0, 0, +SCM_DEFINE (scm_set_car_x, "set-car!", 2, 0, 0, (SCM pair, SCM value), "") #define FUNC_NAME s_scm_set_car_x @@ -105,7 +105,7 @@ GUILE_PROC (scm_set_car_x, "set-car!", 2, 0, 0, } #undef FUNC_NAME -GUILE_PROC (scm_set_cdr_x, "set-cdr!", 2, 0, 0, +SCM_DEFINE (scm_set_cdr_x, "set-cdr!", 2, 0, 0, (SCM pair, SCM value), "") #define FUNC_NAME s_scm_set_cdr_x diff --git a/libguile/ports.c b/libguile/ports.c index ebe771fd0..e170449e0 100644 --- a/libguile/ports.c +++ b/libguile/ports.c @@ -212,7 +212,7 @@ scm_set_port_input_waiting (long tc, int (*input_waiting) (SCM)) -GUILE_PROC(scm_char_ready_p, "char-ready?", 0, 1, 0, +SCM_DEFINE(scm_char_ready_p, "char-ready?", 0, 1, 0, (SCM port), "") #define FUNC_NAME s_scm_char_ready_p @@ -246,7 +246,7 @@ GUILE_PROC(scm_char_ready_p, "char-ready?", 0, 1, 0, #undef FUNC_NAME /* Clear a port's read buffers, returning the contents. */ -GUILE_PROC (scm_drain_input, "drain-input", 1, 0, 0, +SCM_DEFINE (scm_drain_input, "drain-input", 1, 0, 0, (SCM port), "Drains @var{PORT}'s read buffers (including any pushed-back characters) and returns the contents as a single string.") @@ -282,7 +282,7 @@ and returns the contents as a single string.") /* Standard ports --- current input, output, error, and more(!). */ -GUILE_PROC(scm_current_input_port, "current-input-port", 0, 0, 0, +SCM_DEFINE(scm_current_input_port, "current-input-port", 0, 0, 0, (), "") #define FUNC_NAME s_scm_current_input_port @@ -291,7 +291,7 @@ GUILE_PROC(scm_current_input_port, "current-input-port", 0, 0, 0, } #undef FUNC_NAME -GUILE_PROC(scm_current_output_port, "current-output-port", 0, 0, 0, +SCM_DEFINE(scm_current_output_port, "current-output-port", 0, 0, 0, (), "") #define FUNC_NAME s_scm_current_output_port @@ -300,7 +300,7 @@ GUILE_PROC(scm_current_output_port, "current-output-port", 0, 0, 0, } #undef FUNC_NAME -GUILE_PROC(scm_current_error_port, "current-error-port", 0, 0, 0, +SCM_DEFINE(scm_current_error_port, "current-error-port", 0, 0, 0, (), "Return the port to which errors and warnings should be sent (the @dfn{standard error} in Unix and C terminology).") @@ -310,7 +310,7 @@ GUILE_PROC(scm_current_error_port, "current-error-port", 0, 0, 0, } #undef FUNC_NAME -GUILE_PROC(scm_current_load_port, "current-load-port", 0, 0, 0, +SCM_DEFINE(scm_current_load_port, "current-load-port", 0, 0, 0, (), "") #define FUNC_NAME s_scm_current_load_port @@ -319,7 +319,7 @@ GUILE_PROC(scm_current_load_port, "current-load-port", 0, 0, 0, } #undef FUNC_NAME -GUILE_PROC(scm_set_current_input_port, "set-current-input-port", 1, 0, 0, +SCM_DEFINE(scm_set_current_input_port, "set-current-input-port", 1, 0, 0, (SCM port), "@deffnx primitive set-current-output-port port @deffnx primitive set-current-error-port port @@ -336,7 +336,7 @@ so that they use the supplied @var{port} for input or output.") #undef FUNC_NAME -GUILE_PROC(scm_set_current_output_port, "set-current-output-port", 1, 0, 0, +SCM_DEFINE(scm_set_current_output_port, "set-current-output-port", 1, 0, 0, (SCM port), "") #define FUNC_NAME s_scm_set_current_output_port @@ -350,7 +350,7 @@ GUILE_PROC(scm_set_current_output_port, "set-current-output-port", 1, 0, 0, #undef FUNC_NAME -GUILE_PROC(scm_set_current_error_port, "set-current-error-port", 1, 0, 0, +SCM_DEFINE(scm_set_current_error_port, "set-current-error-port", 1, 0, 0, (SCM port), "") #define FUNC_NAME s_scm_set_current_error_port @@ -438,7 +438,7 @@ scm_remove_from_port_table (SCM port) /* Undocumented functions for debugging. */ /* Return the number of ports in the table. */ -GUILE_PROC(scm_pt_size, "pt-size", 0, 0, 0, +SCM_DEFINE(scm_pt_size, "pt-size", 0, 0, 0, (), "") #define FUNC_NAME s_scm_pt_size @@ -448,7 +448,7 @@ GUILE_PROC(scm_pt_size, "pt-size", 0, 0, 0, #undef FUNC_NAME /* Return the ith member of the port table. */ -GUILE_PROC(scm_pt_member, "pt-member", 1, 0, 0, +SCM_DEFINE(scm_pt_member, "pt-member", 1, 0, 0, (SCM member), "") #define FUNC_NAME s_scm_pt_member @@ -481,7 +481,7 @@ scm_revealed_count (SCM port) /* Return the revealed count for a port. */ -GUILE_PROC(scm_port_revealed, "port-revealed", 1, 0, 0, +SCM_DEFINE(scm_port_revealed, "port-revealed", 1, 0, 0, (SCM port), "Returns the revealed count for @var{port}.") #define FUNC_NAME s_scm_port_revealed @@ -493,7 +493,7 @@ GUILE_PROC(scm_port_revealed, "port-revealed", 1, 0, 0, #undef FUNC_NAME /* Set the revealed count for a port. */ -GUILE_PROC(scm_set_port_revealed_x, "set-port-revealed!", 2, 0, 0, +SCM_DEFINE(scm_set_port_revealed_x, "set-port-revealed!", 2, 0, 0, (SCM port, SCM rcount), "Sets the revealed count for a port to a given value. The return value is unspecified.") @@ -534,7 +534,7 @@ scm_mode_bits (char *modes) * Some modes such as "append" are only used when opening * a file and are not returned here. */ -GUILE_PROC(scm_port_mode, "port-mode", 1, 0, 0, +SCM_DEFINE(scm_port_mode, "port-mode", 1, 0, 0, (SCM port), "Returns the port modes associated with the open port @var{port}. These will not necessarily be identical to the modes used when the port was @@ -569,7 +569,7 @@ port creation are not retained.") * Call the close operation on a port object. * see also scm_close. */ -GUILE_PROC(scm_close_port, "close-port", 1, 0, 0, +SCM_DEFINE(scm_close_port, "close-port", 1, 0, 0, (SCM port), "Close the specified port object. Returns @code{#t} if it successfully closes a port or @code{#f} if it was already @@ -598,7 +598,7 @@ which can close file descriptors.") } #undef FUNC_NAME -GUILE_PROC(scm_close_all_ports_except, "close-all-ports-except", 0, 0, 1, +SCM_DEFINE(scm_close_all_ports_except, "close-all-ports-except", 0, 0, 1, (SCM ports), "Close all open file ports used by the interpreter except for those supplied as arguments. This procedure @@ -640,7 +640,7 @@ which are not needed in the new process.") /* Utter miscellany. Gosh, we should clean this up some time. */ -GUILE_PROC(scm_input_port_p, "input-port?", 1, 0, 0, +SCM_DEFINE(scm_input_port_p, "input-port?", 1, 0, 0, (SCM x), "") #define FUNC_NAME s_scm_input_port_p @@ -651,7 +651,7 @@ GUILE_PROC(scm_input_port_p, "input-port?", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC(scm_output_port_p, "output-port?", 1, 0, 0, +SCM_DEFINE(scm_output_port_p, "output-port?", 1, 0, 0, (SCM x), "") #define FUNC_NAME s_scm_output_port_p @@ -664,7 +664,7 @@ GUILE_PROC(scm_output_port_p, "output-port?", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC(scm_port_closed_p, "port-closed?", 1, 0, 0, +SCM_DEFINE(scm_port_closed_p, "port-closed?", 1, 0, 0, (SCM port), "Returns @code{#t} if @var{port} is closed or @code{#f} if it is open.") #define FUNC_NAME s_scm_port_closed_p @@ -674,7 +674,7 @@ GUILE_PROC(scm_port_closed_p, "port-closed?", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC(scm_eof_object_p, "eof-object?", 1, 0, 0, +SCM_DEFINE(scm_eof_object_p, "eof-object?", 1, 0, 0, (SCM x), "") #define FUNC_NAME s_scm_eof_object_p @@ -683,7 +683,7 @@ GUILE_PROC(scm_eof_object_p, "eof-object?", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC(scm_force_output, "force-output", 0, 1, 0, +SCM_DEFINE(scm_force_output, "force-output", 0, 1, 0, (SCM port), "Flush the specified output port, or the current output port if @var{port} is omitted. The current output buffer contents are passed to the @@ -706,7 +706,7 @@ The return value is unspecified.") } #undef FUNC_NAME -GUILE_PROC (scm_flush_all_ports, "flush-all-ports", 0, 0, 0, +SCM_DEFINE (scm_flush_all_ports, "flush-all-ports", 0, 0, 0, (), "Equivalent to calling @code{force-output} on all open output ports. The return value is unspecified.") @@ -723,7 +723,7 @@ all open output ports. The return value is unspecified.") } #undef FUNC_NAME -GUILE_PROC(scm_read_char, "read-char", 0, 1, 0, +SCM_DEFINE(scm_read_char, "read-char", 0, 1, 0, (SCM port), "") #define FUNC_NAME s_scm_read_char @@ -945,7 +945,7 @@ scm_ungets (char *s, int n, SCM port) } -GUILE_PROC(scm_peek_char, "peek-char", 0, 1, 0, +SCM_DEFINE(scm_peek_char, "peek-char", 0, 1, 0, (SCM port), "") #define FUNC_NAME s_scm_peek_char @@ -963,7 +963,7 @@ GUILE_PROC(scm_peek_char, "peek-char", 0, 1, 0, } #undef FUNC_NAME -GUILE_PROC (scm_unread_char, "unread-char", 2, 0, 0, +SCM_DEFINE (scm_unread_char, "unread-char", 2, 0, 0, (SCM cobj, SCM port), "Place @var{char} in @var{port} so that it will be read by the next read operation. If called multiple times, the unread characters @@ -986,7 +986,7 @@ not supplied, the current input port is used.") } #undef FUNC_NAME -GUILE_PROC (scm_unread_string, "unread-string", 2, 0, 0, +SCM_DEFINE (scm_unread_string, "unread-string", 2, 0, 0, (SCM str, SCM port), "Place the string @var{str} in @var{port} so that its characters will be read in subsequent read operations. If called multiple times, the @@ -1006,7 +1006,7 @@ unread characters will be read again in last-in first-out order. If } #undef FUNC_NAME -GUILE_PROC (scm_seek, "seek", 3, 0, 0, +SCM_DEFINE (scm_seek, "seek", 3, 0, 0, (SCM object, SCM offset, SCM whence), "Sets the current position of @var{fd/port} to the integer @var{offset}, which is interpreted according to the value of @var{whence}. @@ -1064,7 +1064,7 @@ the current position of a port can be obtained using: } #undef FUNC_NAME -GUILE_PROC (scm_truncate_file, "truncate-file", 1, 1, 0, +SCM_DEFINE (scm_truncate_file, "truncate-file", 1, 1, 0, (SCM object, SCM length), "Truncates the object referred to by @var{obj} to at most @var{size} bytes. @var{obj} can be a string containing a file name or an integer file @@ -1124,7 +1124,7 @@ The return value is unspecified.") } #undef FUNC_NAME -GUILE_PROC (scm_port_line, "port-line", 1, 0, 0, +SCM_DEFINE (scm_port_line, "port-line", 1, 0, 0, (SCM port), "") #define FUNC_NAME s_scm_port_line @@ -1135,7 +1135,7 @@ GUILE_PROC (scm_port_line, "port-line", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC (scm_set_port_line_x, "set-port-line!", 2, 0, 0, +SCM_DEFINE (scm_set_port_line_x, "set-port-line!", 2, 0, 0, (SCM port, SCM line), "") #define FUNC_NAME s_scm_set_port_line_x @@ -1147,7 +1147,7 @@ GUILE_PROC (scm_set_port_line_x, "set-port-line!", 2, 0, 0, } #undef FUNC_NAME -GUILE_PROC (scm_port_column, "port-column", 1, 0, 0, +SCM_DEFINE (scm_port_column, "port-column", 1, 0, 0, (SCM port), "@deffnx primitive port-line [input-port] Return the current column number or line number of @var{input-port}, @@ -1166,7 +1166,7 @@ what non-programmers will find most natural.)") } #undef FUNC_NAME -GUILE_PROC (scm_set_port_column_x, "set-port-column!", 2, 0, 0, +SCM_DEFINE (scm_set_port_column_x, "set-port-column!", 2, 0, 0, (SCM port, SCM column), "@deffnx primitive set-port-line! [input-port] line Set the current column or line number of @var{input-port}, using the @@ -1180,7 +1180,7 @@ current input port if none is specified.") } #undef FUNC_NAME -GUILE_PROC (scm_port_filename, "port-filename", 1, 0, 0, +SCM_DEFINE (scm_port_filename, "port-filename", 1, 0, 0, (SCM port), "Return the filename associated with @var{port}. This function returns the strings "standard input", "standard output" and "standard error" @@ -1193,7 +1193,7 @@ when called on the current input, output and error ports respectively.") } #undef FUNC_NAME -GUILE_PROC (scm_set_port_filename_x, "set-port-filename!", 2, 0, 0, +SCM_DEFINE (scm_set_port_filename_x, "set-port-filename!", 2, 0, 0, (SCM port, SCM filename), "Change the filename associated with @var{port}, using the current input port if none is specified. Note that this does not change the port's @@ -1301,7 +1301,7 @@ scm_void_port (char *mode_str) } -GUILE_PROC (scm_sys_make_void_port, "%make-void-port", 1, 0, 0, +SCM_DEFINE (scm_sys_make_void_port, "%make-void-port", 1, 0, 0, (SCM mode), "Create and return a new void port. The @var{mode} argument describes the input/output modes for this port; for a description, see the diff --git a/libguile/posix.c b/libguile/posix.c index b91dacb6d..360918106 100644 --- a/libguile/posix.c +++ b/libguile/posix.c @@ -166,7 +166,7 @@ extern char ** environ; SCM_SYMBOL (sym_read_pipe, "read pipe"); SCM_SYMBOL (sym_write_pipe, "write pipe"); -GUILE_PROC (scm_pipe, "pipe", 0, 0, 0, +SCM_DEFINE (scm_pipe, "pipe", 0, 0, 0, (), "Creates a pipe which can be used for communication. The return value is a pair in which the CAR contains an input port and the CDR an @@ -192,7 +192,7 @@ Alternatively a buffer can be added to the port using @code{setvbuf} #ifdef HAVE_GETGROUPS -GUILE_PROC (scm_getgroups, "getgroups", 0, 0, 0, +SCM_DEFINE (scm_getgroups, "getgroups", 0, 0, 0, (), "Returns a vector of integers representing the current supplimentary group IDs.") #define FUNC_NAME s_scm_getgroups @@ -229,7 +229,7 @@ GUILE_PROC (scm_getgroups, "getgroups", 0, 0, 0, #endif -GUILE_PROC (scm_getpwuid, "getpw", 0, 1, 0, +SCM_DEFINE (scm_getpwuid, "getpw", 0, 1, 0, (SCM user), "Look up an entry in the user database. @var{obj} can be an integer, a string, or omitted, giving the behaviour of getpwuid, getpwnam @@ -283,7 +283,7 @@ or getpwent respectively.") #ifdef HAVE_SETPWENT -GUILE_PROC (scm_setpwent, "setpw", 0, 1, 0, +SCM_DEFINE (scm_setpwent, "setpw", 0, 1, 0, (SCM arg), "If called with a true argument, initialize or reset the password data stream. Otherwise, close the stream. The @code{setpwent} and @@ -302,7 +302,7 @@ stream. Otherwise, close the stream. The @code{setpwent} and /* Combines getgrgid and getgrnam. */ -GUILE_PROC (scm_getgrgid, "getgr", 0, 1, 0, +SCM_DEFINE (scm_getgrgid, "getgr", 0, 1, 0, (SCM name), "Look up an entry in the group database. @var{obj} can be an integer, a string, or omitted, giving the behaviour of getgrgid, getgrnam @@ -343,7 +343,7 @@ or getgrent respectively.") -GUILE_PROC (scm_setgrent, "setgr", 0, 1, 0, +SCM_DEFINE (scm_setgrent, "setgr", 0, 1, 0, (SCM arg), "If called with a true argument, initialize or reset the group data stream. Otherwise, close the stream. The @code{setgrent} and @@ -360,7 +360,7 @@ stream. Otherwise, close the stream. The @code{setgrent} and -GUILE_PROC (scm_kill, "kill", 2, 0, 0, +SCM_DEFINE (scm_kill, "kill", 2, 0, 0, (SCM pid, SCM sig), "Sends a signal to the specified process or group of processes. @@ -401,7 +401,7 @@ Interrupt signal. #undef FUNC_NAME #ifdef HAVE_WAITPID -GUILE_PROC (scm_waitpid, "waitpid", 1, 1, 0, +SCM_DEFINE (scm_waitpid, "waitpid", 1, 1, 0, (SCM pid, SCM options), "This procedure collects status information from a child process which has terminated or (optionally) stopped. Normally it will @@ -466,7 +466,7 @@ The integer status value. #undef FUNC_NAME #endif /* HAVE_WAITPID */ -GUILE_PROC (scm_status_exit_val, "status:exit-val", 1, 0, 0, +SCM_DEFINE (scm_status_exit_val, "status:exit-val", 1, 0, 0, (SCM status), "Returns the exit status value, as would be set if a process ended normally through a @@ -487,7 +487,7 @@ call to @code{exit} or @code{_exit}, if any, otherwise @code{#f}.") } #undef FUNC_NAME -GUILE_PROC (scm_status_term_sig, "status:term-sig", 1, 0, 0, +SCM_DEFINE (scm_status_term_sig, "status:term-sig", 1, 0, 0, (SCM status), "Returns the signal number which terminated the process, if any, otherwise @code{#f}.") @@ -505,7 +505,7 @@ process, if any, otherwise @code{#f}.") } #undef FUNC_NAME -GUILE_PROC (scm_status_stop_sig, "status:stop-sig", 1, 0, 0, +SCM_DEFINE (scm_status_stop_sig, "status:stop-sig", 1, 0, 0, (SCM status), "Returns the signal number which stopped the process, if any, otherwise @code{#f}.") @@ -523,7 +523,7 @@ process, if any, otherwise @code{#f}.") } #undef FUNC_NAME -GUILE_PROC (scm_getppid, "getppid", 0, 0, 0, +SCM_DEFINE (scm_getppid, "getppid", 0, 0, 0, (), "Returns an integer representing the process ID of the parent process.") #define FUNC_NAME s_scm_getppid @@ -534,7 +534,7 @@ GUILE_PROC (scm_getppid, "getppid", 0, 0, 0, -GUILE_PROC (scm_getuid, "getuid", 0, 0, 0, +SCM_DEFINE (scm_getuid, "getuid", 0, 0, 0, (), "Returns an integer representing the current real user ID.") #define FUNC_NAME s_scm_getuid @@ -545,7 +545,7 @@ GUILE_PROC (scm_getuid, "getuid", 0, 0, 0, -GUILE_PROC (scm_getgid, "getgid", 0, 0, 0, +SCM_DEFINE (scm_getgid, "getgid", 0, 0, 0, (), "Returns an integer representing the current real group ID.") #define FUNC_NAME s_scm_getgid @@ -556,7 +556,7 @@ GUILE_PROC (scm_getgid, "getgid", 0, 0, 0, -GUILE_PROC (scm_geteuid, "geteuid", 0, 0, 0, +SCM_DEFINE (scm_geteuid, "geteuid", 0, 0, 0, (), "Returns an integer representing the current effective user ID. If the system does not support effective IDs, then the real ID @@ -574,7 +574,7 @@ supports effective IDs.") -GUILE_PROC (scm_getegid, "getegid", 0, 0, 0, +SCM_DEFINE (scm_getegid, "getegid", 0, 0, 0, (), "Returns an integer representing the current effective group ID. If the system does not support effective IDs, then the real ID @@ -591,7 +591,7 @@ supports effective IDs.") #undef FUNC_NAME -GUILE_PROC (scm_setuid, "setuid", 1, 0, 0, +SCM_DEFINE (scm_setuid, "setuid", 1, 0, 0, (SCM id), "Sets both the real and effective user IDs to the integer @var{id}, provided the process has appropriate privileges. @@ -605,7 +605,7 @@ The return value is unspecified.") } #undef FUNC_NAME -GUILE_PROC (scm_setgid, "setgid", 1, 0, 0, +SCM_DEFINE (scm_setgid, "setgid", 1, 0, 0, (SCM id), "Sets both the real and effective group IDs to the integer @var{id}, provided the process has appropriate privileges. @@ -619,7 +619,7 @@ The return value is unspecified.") } #undef FUNC_NAME -GUILE_PROC (scm_seteuid, "seteuid", 1, 0, 0, +SCM_DEFINE (scm_seteuid, "seteuid", 1, 0, 0, (SCM id), "Sets the effective user ID to the integer @var{id}, provided the process has appropriate privileges. If effective IDs are not supported, the @@ -643,7 +643,7 @@ The return value is unspecified.") #undef FUNC_NAME #ifdef HAVE_SETEGID -GUILE_PROC (scm_setegid, "setegid", 1, 0, 0, +SCM_DEFINE (scm_setegid, "setegid", 1, 0, 0, (SCM id), "Sets the effective group ID to the integer @var{id}, provided the process has appropriate privileges. If effective IDs are not supported, the @@ -668,7 +668,7 @@ The return value is unspecified.") #undef FUNC_NAME #endif -GUILE_PROC (scm_getpgrp, "getpgrp", 0, 0, 0, +SCM_DEFINE (scm_getpgrp, "getpgrp", 0, 0, 0, (), "Returns an integer representing the current process group ID. This is the POSIX definition, not BSD.") @@ -680,7 +680,7 @@ This is the POSIX definition, not BSD.") } #undef FUNC_NAME -GUILE_PROC (scm_setpgid, "setpgid", 2, 0, 0, +SCM_DEFINE (scm_setpgid, "setpgid", 2, 0, 0, (SCM pid, SCM pgid), "Move the process @var{pid} into the process group @var{pgid}. @var{pid} or @var{pgid} must be integers: they can be zero to indicate the ID of the @@ -704,7 +704,7 @@ The return value is unspecified.") } #undef FUNC_NAME -GUILE_PROC (scm_setsid, "setsid", 0, 0, 0, +SCM_DEFINE (scm_setsid, "setsid", 0, 0, 0, (), "Creates a new session. The current process becomes the session leader and is put in a new process group. The process will be detached @@ -725,7 +725,7 @@ The return value is an integer representing the new process group ID.") } #undef FUNC_NAME -GUILE_PROC (scm_ttyname, "ttyname", 1, 0, 0, +SCM_DEFINE (scm_ttyname, "ttyname", 1, 0, 0, (SCM port), "Returns a string with the name of the serial terminal device underlying @var{port}.") @@ -748,7 +748,7 @@ GUILE_PROC (scm_ttyname, "ttyname", 1, 0, 0, #undef FUNC_NAME -GUILE_PROC (scm_ctermid, "ctermid", 0, 0, 0, +SCM_DEFINE (scm_ctermid, "ctermid", 0, 0, 0, (), "Returns a string containing the file name of the controlling terminal for the current process.") @@ -767,7 +767,7 @@ for the current process.") } #undef FUNC_NAME -GUILE_PROC (scm_tcgetpgrp, "tcgetpgrp", 1, 0, 0, +SCM_DEFINE (scm_tcgetpgrp, "tcgetpgrp", 1, 0, 0, (SCM port), "Returns the process group ID of the foreground process group associated with the terminal open on the file descriptor @@ -800,7 +800,7 @@ foreground.") } #undef FUNC_NAME -GUILE_PROC (scm_tcsetpgrp, "tcsetpgrp", 2, 0, 0, +SCM_DEFINE (scm_tcsetpgrp, "tcsetpgrp", 2, 0, 0, (SCM port, SCM pgid), "Set the foreground process group ID for the terminal used by the file descriptor underlying @var{port} to the integer @var{pgid}. @@ -862,7 +862,7 @@ scm_convert_exec_args (SCM args, int pos, const char *subr) return execargv; } -GUILE_PROC (scm_execl, "execl", 1, 0, 1, +SCM_DEFINE (scm_execl, "execl", 1, 0, 1, (SCM filename, SCM args), "Executes the file named by @var{path} as a new process image. The remaining arguments are supplied to the process; from a C program @@ -888,7 +888,7 @@ call, but we call it @code{execl} because of its Scheme calling interface.") } #undef FUNC_NAME -GUILE_PROC (scm_execlp, "execlp", 1, 0, 1, +SCM_DEFINE (scm_execlp, "execlp", 1, 0, 1, (SCM filename, SCM args), "Similar to @code{execl}, however if @var{filename} does not contain a slash @@ -944,7 +944,7 @@ environ_list_to_c (SCM envlist, int arg, const char *proc) return result; } -GUILE_PROC (scm_execle, "execle", 2, 0, 1, +SCM_DEFINE (scm_execle, "execle", 2, 0, 1, (SCM filename, SCM env, SCM args), "Similar to @code{execl}, but the environment of the new process is specified by @var{env}, which must be a list of strings as returned by the @@ -969,7 +969,7 @@ call, but we call it @code{execle} because of its Scheme calling interface.") } #undef FUNC_NAME -GUILE_PROC (scm_fork, "primitive-fork", 0, 0, 0, +SCM_DEFINE (scm_fork, "primitive-fork", 0, 0, 0, (), "Creates a new \"child\" process by duplicating the current \"parent\" process. In the child the return value is 0. In the parent the return value is @@ -988,7 +988,7 @@ with the scsh fork.") #undef FUNC_NAME -GUILE_PROC (scm_uname, "uname", 0, 0, 0, +SCM_DEFINE (scm_uname, "uname", 0, 0, 0, (), "Returns an object with some information about the computer system the program is running on.") @@ -1018,7 +1018,7 @@ program is running on.") } #undef FUNC_NAME -GUILE_PROC (scm_environ, "environ", 0, 1, 0, +SCM_DEFINE (scm_environ, "environ", 0, 1, 0, (SCM env), "If @var{env} is omitted, returns the current environment as a list of strings. Otherwise it sets the current environment, which is also the @@ -1057,7 +1057,7 @@ If @var{env} is supplied then the return value is unspecified.") #ifdef L_tmpnam -GUILE_PROC (scm_tmpnam, "tmpnam", 0, 0, 0, +SCM_DEFINE (scm_tmpnam, "tmpnam", 0, 0, 0, (), "Create a new file in the file system with a unique name. The return value is the name of the new file. This function is implemented with @@ -1072,7 +1072,7 @@ the @code{tmpnam} function in the system libraries.") #endif -GUILE_PROC (scm_utime, "utime", 1, 2, 0, +SCM_DEFINE (scm_utime, "utime", 1, 2, 0, (SCM pathname, SCM actime, SCM modtime), "@code{utime} sets the access and modification times for the file named by @var{path}. If @var{actime} or @var{modtime} @@ -1113,7 +1113,7 @@ time to the current time.") } #undef FUNC_NAME -GUILE_PROC (scm_access, "access?", 2, 0, 0, +SCM_DEFINE (scm_access, "access?", 2, 0, 0, (SCM path, SCM how), "Returns @code{#t} if @var{path} corresponds to an existing file and the current process @@ -1153,7 +1153,7 @@ test for existence of the file. } #undef FUNC_NAME -GUILE_PROC (scm_getpid, "getpid", 0, 0, 0, +SCM_DEFINE (scm_getpid, "getpid", 0, 0, 0, (), "Returns an integer representing the current process ID.") #define FUNC_NAME s_scm_getpid @@ -1162,7 +1162,7 @@ GUILE_PROC (scm_getpid, "getpid", 0, 0, 0, } #undef FUNC_NAME -GUILE_PROC (scm_putenv, "putenv", 1, 0, 0, +SCM_DEFINE (scm_putenv, "putenv", 1, 0, 0, (SCM str), "Modifies the environment of the current process, which is also the default environment inherited by child processes. @@ -1194,7 +1194,7 @@ The return value is unspecified.") } #undef FUNC_NAME -GUILE_PROC (scm_setlocale, "setlocale", 1, 1, 0, +SCM_DEFINE (scm_setlocale, "setlocale", 1, 1, 0, (SCM category, SCM locale), "If @var{locale} is omitted, returns the current value of the specified locale category @@ -1236,7 +1236,7 @@ is an empty string, the locale will be set using envirionment variables.") } #undef FUNC_NAME -GUILE_PROC (scm_mknod, "mknod", 4, 0, 0, +SCM_DEFINE (scm_mknod, "mknod", 4, 0, 0, (SCM path, SCM type, SCM perms, SCM dev), "Creates a new special file, such as a file corresponding to a device. @var{path} specifies the name of the file. @var{type} should @@ -1298,7 +1298,7 @@ The return value is unspecified.") #undef FUNC_NAME -GUILE_PROC (scm_nice, "nice", 1, 0, 0, +SCM_DEFINE (scm_nice, "nice", 1, 0, 0, (SCM incr), "Increment the priority of the current process by @var{incr}. A higher priority value means that the process runs less often. @@ -1319,7 +1319,7 @@ The return value is unspecified.") #undef FUNC_NAME -GUILE_PROC (scm_sync, "sync", 0, 0, 0, +SCM_DEFINE (scm_sync, "sync", 0, 0, 0, (), "Flush the operating system disk buffers. The return value is unspecified.") diff --git a/libguile/print.c b/libguile/print.c index 01873af39..a9c202e29 100644 --- a/libguile/print.c +++ b/libguile/print.c @@ -128,7 +128,7 @@ scm_option scm_print_opts[] = { "Print closures with source." } }; -GUILE_PROC (scm_print_options, "print-options-interface", 0, 1, 0, +SCM_DEFINE (scm_print_options, "print-options-interface", 0, 1, 0, (SCM setting), "") #define FUNC_NAME s_scm_print_options @@ -184,7 +184,7 @@ static SCM print_state_pool; #ifdef GUILE_DEBUG /* Used for debugging purposes */ -GUILE_PROC(scm_current_pstate, "current-pstate", 0, 0, 0, +SCM_DEFINE(scm_current_pstate, "current-pstate", 0, 0, 0, (), "") #define FUNC_NAME s_scm_current_pstate @@ -934,7 +934,7 @@ scm_display (SCM obj, SCM port) return SCM_UNSPECIFIED; } -GUILE_PROC(scm_newline, "newline", 0, 1, 0, +SCM_DEFINE(scm_newline, "newline", 0, 1, 0, (SCM port), "") #define FUNC_NAME s_scm_newline @@ -949,7 +949,7 @@ GUILE_PROC(scm_newline, "newline", 0, 1, 0, } #undef FUNC_NAME -GUILE_PROC(scm_write_char, "write-char", 1, 1, 0, +SCM_DEFINE(scm_write_char, "write-char", 1, 1, 0, (SCM chr, SCM port), "") #define FUNC_NAME s_scm_write_char @@ -1002,7 +1002,7 @@ scm_printer_apply (SCM proc, SCM exp, SCM port, scm_print_state *pstate) return scm_apply (proc, exp, scm_cons (pwps, scm_listofnull)); } -GUILE_PROC (scm_port_with_print_state, "port-with-print-state", 2, 0, 0, +SCM_DEFINE (scm_port_with_print_state, "port-with-print-state", 2, 0, 0, (SCM port, SCM pstate), "") #define FUNC_NAME s_scm_port_with_print_state @@ -1016,7 +1016,7 @@ GUILE_PROC (scm_port_with_print_state, "port-with-print-state", 2, 0, 0, } #undef FUNC_NAME -GUILE_PROC (scm_get_print_state, "get-print-state", 1, 0, 0, +SCM_DEFINE (scm_get_print_state, "get-print-state", 1, 0, 0, (SCM port), "") #define FUNC_NAME s_scm_get_print_state diff --git a/libguile/procprop.c b/libguile/procprop.c index e18acdc15..ed7b01007 100644 --- a/libguile/procprop.c +++ b/libguile/procprop.c @@ -162,7 +162,7 @@ scm_stand_in_scm_proc(SCM proc) return answer; } -GUILE_PROC(scm_procedure_properties, "procedure-properties", 1, 0, 0, +SCM_DEFINE(scm_procedure_properties, "procedure-properties", 1, 0, 0, (SCM proc), "Return @var{obj}'s property list.") #define FUNC_NAME s_scm_procedure_properties @@ -175,7 +175,7 @@ GUILE_PROC(scm_procedure_properties, "procedure-properties", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC(scm_set_procedure_properties_x, "set-procedure-properties!", 2, 0, 0, +SCM_DEFINE(scm_set_procedure_properties_x, "set-procedure-properties!", 2, 0, 0, (SCM proc, SCM new_val), "Set @var{obj}'s property list to @var{alist}.") #define FUNC_NAME s_scm_set_procedure_properties_x @@ -188,7 +188,7 @@ GUILE_PROC(scm_set_procedure_properties_x, "set-procedure-properties!", 2, 0, 0, } #undef FUNC_NAME -GUILE_PROC(scm_procedure_property, "procedure-property", 2, 0, 0, +SCM_DEFINE(scm_procedure_property, "procedure-property", 2, 0, 0, (SCM p, SCM k), "Return the property of @var{obj} with name @var{key}.") #define FUNC_NAME s_scm_procedure_property @@ -210,7 +210,7 @@ GUILE_PROC(scm_procedure_property, "procedure-property", 2, 0, 0, } #undef FUNC_NAME -GUILE_PROC(scm_set_procedure_property_x, "set-procedure-property!", 3, 0, 0, +SCM_DEFINE(scm_set_procedure_property_x, "set-procedure-property!", 3, 0, 0, (SCM p, SCM k, SCM v), "In @var{obj}'s property list, set the property named @var{key} to @var{value}.") diff --git a/libguile/procs.c b/libguile/procs.c index 9fa52d366..6316b4aa4 100644 --- a/libguile/procs.c +++ b/libguile/procs.c @@ -164,7 +164,7 @@ scm_makcclo (SCM proc, long len) /* Undocumented debugging procedure */ #ifdef GUILE_DEBUG -GUILE_PROC (scm_make_cclo, "make-cclo", 2, 0, 0, +SCM_DEFINE (scm_make_cclo, "make-cclo", 2, 0, 0, (SCM proc, SCM len), "") #define FUNC_NAME s_scm_make_cclo @@ -177,7 +177,7 @@ GUILE_PROC (scm_make_cclo, "make-cclo", 2, 0, 0, -GUILE_PROC(scm_procedure_p, "procedure?", 1, 0, 0, +SCM_DEFINE(scm_procedure_p, "procedure?", 1, 0, 0, (SCM obj), "") #define FUNC_NAME s_scm_procedure_p @@ -203,7 +203,7 @@ GUILE_PROC(scm_procedure_p, "procedure?", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC(scm_closure_p, "closure?", 1, 0, 0, +SCM_DEFINE(scm_closure_p, "closure?", 1, 0, 0, (SCM obj), "") #define FUNC_NAME s_scm_closure_p @@ -212,7 +212,7 @@ GUILE_PROC(scm_closure_p, "closure?", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC(scm_thunk_p, "thunk?", 1, 0, 0, +SCM_DEFINE(scm_thunk_p, "thunk?", 1, 0, 0, (SCM obj), "") #define FUNC_NAME s_scm_thunk_p @@ -260,7 +260,7 @@ scm_subr_p (SCM obj) return 0; } -GUILE_PROC(scm_procedure_documentation, "procedure-documentation", 1, 0, 0, +SCM_DEFINE(scm_procedure_documentation, "procedure-documentation", 1, 0, 0, (SCM proc), "Return the documentation string associated with @code{proc}. By convention, if a procedure contains more than one expression and the @@ -298,7 +298,7 @@ documentation for that procedure.") /* Procedure-with-setter */ -GUILE_PROC (scm_procedure_with_setter_p, "procedure-with-setter?", 1, 0, 0, +SCM_DEFINE (scm_procedure_with_setter_p, "procedure-with-setter?", 1, 0, 0, (SCM obj), "") #define FUNC_NAME s_scm_procedure_with_setter_p @@ -307,7 +307,7 @@ GUILE_PROC (scm_procedure_with_setter_p, "procedure-with-setter?", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC (scm_make_procedure_with_setter, "make-procedure-with-setter", 2, 0, 0, +SCM_DEFINE (scm_make_procedure_with_setter, "make-procedure-with-setter", 2, 0, 0, (SCM procedure, SCM setter), "") #define FUNC_NAME s_scm_make_procedure_with_setter @@ -324,7 +324,7 @@ GUILE_PROC (scm_make_procedure_with_setter, "make-procedure-with-setter", 2, 0, } #undef FUNC_NAME -GUILE_PROC (scm_procedure, "procedure", 1, 0, 0, +SCM_DEFINE (scm_procedure, "procedure", 1, 0, 0, (SCM proc), "") #define FUNC_NAME s_scm_procedure diff --git a/libguile/ramap.c b/libguile/ramap.c index 195d8c684..6da842154 100644 --- a/libguile/ramap.c +++ b/libguile/ramap.c @@ -404,7 +404,7 @@ scm_ramapc (int (*cproc)(), SCM data, SCM ra0, SCM lra, const char *what) } -GUILE_PROC(scm_array_fill_x, "array-fill!", 2, 0, 0, +SCM_DEFINE(scm_array_fill_x, "array-fill!", 2, 0, 0, (SCM ra, SCM fill), "Stores @var{fill} in every element of @var{array}. The value returned is unspecified.") @@ -775,7 +775,7 @@ SCM_REGISTER_PROC(s_serial_array_copy_x, "serial-array-copy!", 2, 0, 0, scm_arra SCM_REGISTER_PROC(s_array_copy_in_order_x, "array-copy-in-order!", 2, 0, 0, scm_array_copy_x); -GUILE_PROC(scm_array_copy_x, "array-copy!", 2, 0, 0, +SCM_DEFINE(scm_array_copy_x, "array-copy!", 2, 0, 0, (SCM src, SCM dst), "Copies every element from vector or array @var{source} to the corresponding element of @var{destination}. @var{destination} must have @@ -1595,7 +1595,7 @@ SCM_REGISTER_PROC(s_serial_array_map_x, "serial-array-map!", 2, 0, 1, scm_array_ SCM_REGISTER_PROC(s_array_map_in_order_x, "array-map-in-order!", 2, 0, 1, scm_array_map_x); -GUILE_PROC(scm_array_map_x, "array-map!", 2, 0, 1, +SCM_DEFINE(scm_array_map_x, "array-map!", 2, 0, 1, (SCM ra0, SCM proc, SCM lra), "@var{array1}, @dots{} must have the same number of dimensions as @var{array0} and have a range for each index which includes the range @@ -1742,7 +1742,7 @@ rafe (SCM ra0,SCM proc,SCM ras) } -GUILE_PROC(scm_array_for_each, "array-for-each", 2, 0, 1, +SCM_DEFINE(scm_array_for_each, "array-for-each", 2, 0, 1, (SCM proc, SCM ra0, SCM lra), "@var{proc} is applied to each tuple of elements of @var{array0} @dots{} in row-major order. The value returned is unspecified.") @@ -1754,7 +1754,7 @@ in row-major order. The value returned is unspecified.") } #undef FUNC_NAME -GUILE_PROC(scm_array_index_map_x, "array-index-map!", 2, 0, 0, +SCM_DEFINE(scm_array_index_map_x, "array-index-map!", 2, 0, 0, (SCM ra, SCM proc), "applies @var{proc} to the indices of each element of @var{array} in turn, storing the result in the corresponding element. The value diff --git a/libguile/random.c b/libguile/random.c index ddcdccd37..b5adcbba1 100644 --- a/libguile/random.c +++ b/libguile/random.c @@ -350,7 +350,7 @@ free_rstate (SCM rstate) SCM_GLOBAL_VCELL_INIT (scm_var_random_state, "*random-state*", scm_seed_to_random_state (scm_makfrom0str ("URL:http://stat.fsu.edu/~geo/diehard.html"))); -GUILE_PROC (scm_random, "random", 1, 1, 0, +SCM_DEFINE (scm_random, "random", 1, 1, 0, (SCM n, SCM state), "") #define FUNC_NAME s_scm_random @@ -373,7 +373,7 @@ GUILE_PROC (scm_random, "random", 1, 1, 0, } #undef FUNC_NAME -GUILE_PROC (scm_copy_random_state, "copy-random-state", 0, 1, 0, +SCM_DEFINE (scm_copy_random_state, "copy-random-state", 0, 1, 0, (SCM state), "") #define FUNC_NAME s_scm_copy_random_state @@ -385,7 +385,7 @@ GUILE_PROC (scm_copy_random_state, "copy-random-state", 0, 1, 0, } #undef FUNC_NAME -GUILE_PROC (scm_seed_to_random_state, "seed->random-state", 1, 0, 0, +SCM_DEFINE (scm_seed_to_random_state, "seed->random-state", 1, 0, 0, (SCM seed), "") #define FUNC_NAME s_scm_seed_to_random_state @@ -398,7 +398,7 @@ GUILE_PROC (scm_seed_to_random_state, "seed->random-state", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC (scm_random_uniform, "random:uniform", 0, 1, 0, +SCM_DEFINE (scm_random_uniform, "random:uniform", 0, 1, 0, (SCM state), "") #define FUNC_NAME s_scm_random_uniform @@ -410,7 +410,7 @@ GUILE_PROC (scm_random_uniform, "random:uniform", 0, 1, 0, } #undef FUNC_NAME -GUILE_PROC (scm_random_normal, "random:normal", 0, 1, 0, +SCM_DEFINE (scm_random_normal, "random:normal", 0, 1, 0, (SCM state), "") #define FUNC_NAME s_scm_random_normal @@ -461,7 +461,7 @@ vector_sum_squares (SCM v) * distribution r^n; i.e., u=r^n is uniform [0,1], so r can be * generated as r=u^(1/n). */ -GUILE_PROC (scm_random_solid_sphere_x, "random:solid-sphere!", 1, 1, 0, +SCM_DEFINE (scm_random_solid_sphere_x, "random:solid-sphere!", 1, 1, 0, (SCM v, SCM state), "") #define FUNC_NAME s_scm_random_solid_sphere_x @@ -479,7 +479,7 @@ GUILE_PROC (scm_random_solid_sphere_x, "random:solid-sphere!", 1, 1, 0, } #undef FUNC_NAME -GUILE_PROC (scm_random_hollow_sphere_x, "random:hollow-sphere!", 1, 1, 0, +SCM_DEFINE (scm_random_hollow_sphere_x, "random:hollow-sphere!", 1, 1, 0, (SCM v, SCM state), "") #define FUNC_NAME s_scm_random_hollow_sphere_x @@ -495,7 +495,7 @@ GUILE_PROC (scm_random_hollow_sphere_x, "random:hollow-sphere!", 1, 1, 0, #undef FUNC_NAME -GUILE_PROC (scm_random_normal_vector_x, "random:normal-vector!", 1, 1, 0, +SCM_DEFINE (scm_random_normal_vector_x, "random:normal-vector!", 1, 1, 0, (SCM v, SCM state), "") #define FUNC_NAME s_scm_random_normal_vector_x @@ -518,7 +518,7 @@ GUILE_PROC (scm_random_normal_vector_x, "random:normal-vector!", 1, 1, 0, #endif /* HAVE_ARRAYS */ -GUILE_PROC (scm_random_exp, "random:exp", 0, 1, 0, +SCM_DEFINE (scm_random_exp, "random:exp", 0, 1, 0, (SCM state), "") #define FUNC_NAME s_scm_random_exp diff --git a/libguile/read.c b/libguile/read.c index 9fe22c784..11a11c1c5 100644 --- a/libguile/read.c +++ b/libguile/read.c @@ -74,7 +74,7 @@ scm_option scm_read_opts[] = { "Style of keyword recognition: #f or 'prefix"} }; -GUILE_PROC (scm_read_options, "read-options-interface", 0, 1, 0, +SCM_DEFINE (scm_read_options, "read-options-interface", 0, 1, 0, (SCM setting), "") #define FUNC_NAME s_scm_read_options @@ -92,7 +92,7 @@ GUILE_PROC (scm_read_options, "read-options-interface", 0, 1, 0, /* An association list mapping extra hash characters to procedures. */ static SCM *scm_read_hash_procedures; -GUILE_PROC (scm_read, "read", 0, 1, 0, +SCM_DEFINE (scm_read, "read", 0, 1, 0, (SCM port), "") #define FUNC_NAME s_scm_read @@ -701,7 +701,7 @@ exit: /* Manipulate the read-hash-procedures alist. This could be written in Scheme, but maybe it will also be used by C code during initialisation. */ -GUILE_PROC (scm_read_hash_extend, "read-hash-extend", 2, 0, 0, +SCM_DEFINE (scm_read_hash_extend, "read-hash-extend", 2, 0, 0, (SCM chr, SCM proc), "") #define FUNC_NAME s_scm_read_hash_extend diff --git a/libguile/regex-posix.c b/libguile/regex-posix.c index 39518f110..cce256580 100644 --- a/libguile/regex-posix.c +++ b/libguile/regex-posix.c @@ -133,7 +133,7 @@ scm_regexp_error_msg (int regerrno, regex_t *rx) return SCM_CHARS (errmsg); } -GUILE_PROC (scm_regexp_p, "regexp?", 1, 0, 0, +SCM_DEFINE (scm_regexp_p, "regexp?", 1, 0, 0, (SCM x), "Return @code{#t} if @var{obj} is a compiled regular expression, or @code{#f} otherwise.") @@ -143,7 +143,7 @@ GUILE_PROC (scm_regexp_p, "regexp?", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC (scm_make_regexp, "make-regexp", 1, 0, 1, +SCM_DEFINE (scm_make_regexp, "make-regexp", 1, 0, 1, (SCM pat, SCM flags), "Compile the regular expression described by @var{str}, and return the compiled regexp structure. If @var{str} does not describe a legal @@ -223,7 +223,7 @@ the earlier one. } #undef FUNC_NAME -GUILE_PROC (scm_regexp_exec, "regexp-exec", 2, 2, 0, +SCM_DEFINE (scm_regexp_exec, "regexp-exec", 2, 2, 0, (SCM rx, SCM str, SCM start, SCM flags), "Match the compiled regular expression @var{regexp} against @code{str}. If the optional integer @var{start} argument is provided, begin matching diff --git a/libguile/root.c b/libguile/root.c index 59ecacda5..41e106475 100644 --- a/libguile/root.c +++ b/libguile/root.c @@ -335,7 +335,7 @@ cwdr (SCM proc, SCM a1, SCM args, SCM handler, SCM_STACKITEM *stack_start) stack_start); } -GUILE_PROC(scm_call_with_dynamic_root, "call-with-dynamic-root", 2, 0, 0, +SCM_DEFINE(scm_call_with_dynamic_root, "call-with-dynamic-root", 2, 0, 0, (SCM thunk, SCM handler), "Evaluate @var{(thunk)} in a new dynamic context, returning its value. @@ -386,7 +386,7 @@ be under a new dynamic root.)") } #undef FUNC_NAME -GUILE_PROC(scm_dynamic_root, "dynamic-root", 0, 0, 0, +SCM_DEFINE(scm_dynamic_root, "dynamic-root", 0, 0, 0, (), "Return an object representing the current dynamic root. diff --git a/libguile/scmsigs.c b/libguile/scmsigs.c index fd49ab798..3cf9eb3fa 100644 --- a/libguile/scmsigs.c +++ b/libguile/scmsigs.c @@ -179,7 +179,7 @@ sys_deliver_signals (void) } /* user interface for installation of signal handlers. */ -GUILE_PROC(scm_sigaction, "sigaction", 1, 2, 0, +SCM_DEFINE(scm_sigaction, "sigaction", 1, 2, 0, (SCM signum, SCM handler, SCM flags), "Install or report the signal hander for a specified signal. @@ -335,7 +335,7 @@ structures.") } #undef FUNC_NAME -GUILE_PROC (scm_restore_signals, "restore-signals", 0, 0, 0, +SCM_DEFINE (scm_restore_signals, "restore-signals", 0, 0, 0, (void), "Return all signal handlers to the values they had before any call to @code{sigaction} was made. The return value is unspecified.") @@ -368,7 +368,7 @@ GUILE_PROC (scm_restore_signals, "restore-signals", 0, 0, 0, } #undef FUNC_NAME -GUILE_PROC(scm_alarm, "alarm", 1, 0, 0, +SCM_DEFINE(scm_alarm, "alarm", 1, 0, 0, (SCM i), "Set a timer to raise a @code{SIGALRM} signal after the specified number of seconds (an integer). It's advisable to install a signal @@ -389,7 +389,7 @@ no previous alarm, the return value is zero.") #undef FUNC_NAME #ifdef HAVE_PAUSE -GUILE_PROC(scm_pause, "pause", 0, 0, 0, +SCM_DEFINE(scm_pause, "pause", 0, 0, 0, (), "Pause the current process (thread?) until a signal arrives whose action is to either terminate the current process or invoke a @@ -402,7 +402,7 @@ handler procedure. The return value is unspecified.") #undef FUNC_NAME #endif -GUILE_PROC(scm_sleep, "sleep", 1, 0, 0, +SCM_DEFINE(scm_sleep, "sleep", 1, 0, 0, (SCM i), "Wait for the given number of seconds (an integer) or until a signal arrives. The return value is zero if the time elapses or the number @@ -421,7 +421,7 @@ of seconds remaining otherwise.") #undef FUNC_NAME #if defined(USE_THREADS) || defined(HAVE_USLEEP) -GUILE_PROC(scm_usleep, "usleep", 1, 0, 0, +SCM_DEFINE(scm_usleep, "usleep", 1, 0, 0, (SCM i), "") #define FUNC_NAME s_scm_usleep @@ -449,7 +449,7 @@ GUILE_PROC(scm_usleep, "usleep", 1, 0, 0, #undef FUNC_NAME #endif /* GUILE_ISELECT || HAVE_USLEEP */ -GUILE_PROC(scm_raise, "raise", 1, 0, 0, +SCM_DEFINE(scm_raise, "raise", 1, 0, 0, (SCM sig), " Sends a specified signal @var{sig} to the current process, where diff --git a/libguile/simpos.c b/libguile/simpos.c index 51f76e6ec..064d7dfca 100644 --- a/libguile/simpos.c +++ b/libguile/simpos.c @@ -63,7 +63,7 @@ extern int system(); -GUILE_PROC(scm_system, "system", 0, 1, 0, +SCM_DEFINE(scm_system, "system", 0, 1, 0, (SCM cmd), "Executes @var{cmd} using the operating system's "command processor". Under Unix this is usually the default shell @code{sh}. The value @@ -103,7 +103,7 @@ indicating whether the command processor is available.") #undef FUNC_NAME extern char *getenv(); -GUILE_PROC (scm_getenv, "getenv", 1, 0, 0, +SCM_DEFINE (scm_getenv, "getenv", 1, 0, 0, (SCM nam), "Looks up the string @var{name} in the current environment. The return value is @code{#f} unless a string of the form @code{NAME=VALUE} is @@ -120,7 +120,7 @@ returned.") #undef FUNC_NAME /* simple exit, without unwinding the scheme stack or flushing ports. */ -GUILE_PROC (scm_primitive_exit, "primitive-exit", 0, 1, 0, +SCM_DEFINE (scm_primitive_exit, "primitive-exit", 0, 1, 0, (SCM status), "Terminate the current process without unwinding the Scheme stack. This is would typically be useful after a fork. The exit status diff --git a/libguile/snarf.h b/libguile/snarf.h index 205c4e117..22de70c1a 100644 --- a/libguile/snarf.h +++ b/libguile/snarf.h @@ -53,7 +53,7 @@ #ifndef SCM_MAGIC_SNARFER -#define GUILE_PROC(FNAME, PRIMNAME, REQ, OPT, VAR, ARGLIST, DOCSTRING) \ +#define SCM_DEFINE(FNAME, PRIMNAME, REQ, OPT, VAR, ARGLIST, DOCSTRING) \ static const char s_ ## FNAME [] = PRIMNAME; \ SCM FNAME ARGLIST #define GUILE_PROC1(FNAME, PRIMNAME, TYPE, ARGLIST, DOCSTRING) \ @@ -83,7 +83,7 @@ SCM FNAME ARGLIST #undef SCM_ASSERT #define SCM_ASSERT(_cond, _arg, _pos, _subr) *&*&*&*SCM_ARG_BETTER_BE_IN_POSITION(_arg,_pos,__LINE__) -#define GUILE_PROC(FNAME, PRIMNAME, REQ, OPT, VAR, ARGLIST, DOCSTRING) \ +#define SCM_DEFINE(FNAME, PRIMNAME, REQ, OPT, VAR, ARGLIST, DOCSTRING) \ %%% scm_make_gsubr (s_ ## FNAME, REQ, OPT, VAR, (SCM (*)(...)) FNAME); \ $$$P PRIMNAME #ARGLIST | REQ | OPT | VAR | __FILE__:__LINE__ | @@@ DOCSTRING @!!! @@ -113,7 +113,7 @@ $$$R STR | REQ | OPT | VAR | __FILE__:__LINE__ | @@@ CFN @!!! #undef SCM_ASSERT #define SCM_ASSERT(_cond, _arg, _pos, _subr) *&*&*&*SCM_ARG_BETTER_BE_IN_POSITION(_arg,_pos,__LINE__) -#define GUILE_PROC(FNAME, PRIMNAME, REQ, OPT, VAR, ARGLIST, DOCSTRING) \ +#define SCM_DEFINE(FNAME, PRIMNAME, REQ, OPT, VAR, ARGLIST, DOCSTRING) \ %%% scm_make_gsubr (s_ ## FNAME, REQ, OPT, VAR, (SCM (*)()) FNAME); \ $$$P PRIMNAME #ARGLIST | REQ | OPT | VAR | __FILE__:__LINE__ | @@@ DOCSTRING @!!! diff --git a/libguile/socket.c b/libguile/socket.c index 8c5e969b4..b8720e9e1 100644 --- a/libguile/socket.c +++ b/libguile/socket.c @@ -71,7 +71,7 @@ -GUILE_PROC (scm_htons, "htons", 1, 0, 0, +SCM_DEFINE (scm_htons, "htons", 1, 0, 0, (SCM in), "Returns a new integer from @var{value} by converting from host to network order. @var{value} must be within the range of a C unsigned @@ -88,7 +88,7 @@ short integer.") } #undef FUNC_NAME -GUILE_PROC (scm_ntohs, "ntohs", 1, 0, 0, +SCM_DEFINE (scm_ntohs, "ntohs", 1, 0, 0, (SCM in), "Returns a new integer from @var{value} by converting from network to host order. @var{value} must be within the range of a C unsigned short @@ -105,7 +105,7 @@ integer.") } #undef FUNC_NAME -GUILE_PROC (scm_htonl, "htonl", 1, 0, 0, +SCM_DEFINE (scm_htonl, "htonl", 1, 0, 0, (SCM in), "Returns a new integer from @var{value} by converting from host to network order. @var{value} must be within the range of a C unsigned @@ -117,7 +117,7 @@ long integer.") } #undef FUNC_NAME -GUILE_PROC (scm_ntohl, "ntohl", 1, 0, 0, +SCM_DEFINE (scm_ntohl, "ntohl", 1, 0, 0, (SCM in), "Returns a new integer from @var{value} by converting from network to host order. @var{value} must be within the range of a C unsigned @@ -144,7 +144,7 @@ scm_sock_fd_to_port (int fd, const char *proc) #define SCM_SOCK_FD_TO_PORT(fd) (scm_sock_fd_to_port((fd),FUNC_NAME)) -GUILE_PROC (scm_socket, "socket", 3, 0, 0, +SCM_DEFINE (scm_socket, "socket", 3, 0, 0, (SCM family, SCM style, SCM proto), "Returns a new socket port of the type specified by @var{family}, @var{style} and @var{protocol}. All three parameters are integers. Typical values @@ -175,7 +175,7 @@ it has been connected to another socket.") #ifdef HAVE_SOCKETPAIR -GUILE_PROC (scm_socketpair, "socketpair", 3, 0, 0, +SCM_DEFINE (scm_socketpair, "socketpair", 3, 0, 0, (SCM family, SCM style, SCM proto), "Returns a pair of connected (but unnamed) socket ports of the type specified by @var{family}, @var{style} and @var{protocol}. @@ -205,7 +205,7 @@ the only meaningful value for @var{protocol}.") #undef FUNC_NAME #endif -GUILE_PROC (scm_getsockopt, "getsockopt", 3, 0, 0, +SCM_DEFINE (scm_getsockopt, "getsockopt", 3, 0, 0, (SCM sock, SCM level, SCM optname), "Returns the value of a particular socket option for the socket port @var{socket}. @var{level} is an integer code for type of option @@ -275,7 +275,7 @@ pair of integers.") } #undef FUNC_NAME -GUILE_PROC (scm_setsockopt, "setsockopt", 4, 0, 0, +SCM_DEFINE (scm_setsockopt, "setsockopt", 4, 0, 0, (SCM sock, SCM level, SCM optname, SCM value), "Sets the value of a particular socket option for the socket port @var{socket}. @var{level} is an integer code for type of option @@ -358,7 +358,7 @@ The return value is unspecified.") } #undef FUNC_NAME -GUILE_PROC (scm_shutdown, "shutdown", 2, 0, 0, +SCM_DEFINE (scm_shutdown, "shutdown", 2, 0, 0, (SCM sock, SCM how), "Sockets can be closed simply by using @code{close-port}. The @code{shutdown} procedure allows reception or tranmission on a @@ -447,7 +447,7 @@ scm_fill_sockaddr (int fam,SCM address,SCM *args,int which_arg,const char *proc, } } -GUILE_PROC (scm_connect, "connect", 3, 0, 1, +SCM_DEFINE (scm_connect, "connect", 3, 0, 1, (SCM sock, SCM fam, SCM address, SCM args), "Initiates a connection from @var{socket} to the address specified by @var{address} and possibly @var{arg @dots{}}. The format @@ -481,7 +481,7 @@ The return value is unspecified.") } #undef FUNC_NAME -GUILE_PROC (scm_bind, "bind", 3, 0, 1, +SCM_DEFINE (scm_bind, "bind", 3, 0, 1, (SCM sock, SCM fam, SCM address, SCM args), "Assigns an address to the socket port @var{socket}. Generally this only needs to be done for server sockets, @@ -539,7 +539,7 @@ The return value is unspecified.") } #undef FUNC_NAME -GUILE_PROC (scm_listen, "listen", 2, 0, 0, +SCM_DEFINE (scm_listen, "listen", 2, 0, 0, (SCM sock, SCM backlog), "This procedure enables @var{socket} to accept connection requests. @var{backlog} is an integer specifying @@ -616,7 +616,7 @@ scm_init_addr_buffer (void) scm_addr_buffer = scm_must_malloc (scm_addr_buffer_size, "address buffer"); } -GUILE_PROC (scm_accept, "accept", 1, 0, 0, +SCM_DEFINE (scm_accept, "accept", 1, 0, 0, (SCM sock), "Accepts a connection on a bound, listening socket @var{socket}. If there are no pending connections in the queue, it waits until @@ -655,7 +655,7 @@ connection and will continue to accept new requests.") } #undef FUNC_NAME -GUILE_PROC (scm_getsockname, "getsockname", 1, 0, 0, +SCM_DEFINE (scm_getsockname, "getsockname", 1, 0, 0, (SCM sock), "Returns the address of @var{socket}, in the same form as the object returned by @code{accept}. On many systems the address of a socket @@ -679,7 +679,7 @@ in the @code{AF_FILE} namespace cannot be read.") } #undef FUNC_NAME -GUILE_PROC (scm_getpeername, "getpeername", 1, 0, 0, +SCM_DEFINE (scm_getpeername, "getpeername", 1, 0, 0, (SCM sock), "Returns the address of the socket that the socket @var{socket} is connected to, in the same form as the object @@ -704,7 +704,7 @@ in the @code{AF_FILE} namespace cannot be read.") } #undef FUNC_NAME -GUILE_PROC (scm_recv, "recv!", 2, 1, 0, +SCM_DEFINE (scm_recv, "recv!", 2, 1, 0, (SCM sock, SCM buf, SCM flags), "Receives data from the socket port @var{socket}. @var{socket} must already be bound to the address from which data is to be received. @@ -740,7 +740,7 @@ any unread buffered port data is ignored.") } #undef FUNC_NAME -GUILE_PROC (scm_send, "send", 2, 1, 0, +SCM_DEFINE (scm_send, "send", 2, 1, 0, (SCM sock, SCM message, SCM flags), "Transmits the string @var{message} on the socket port @var{socket}. @var{socket} must already be bound to a destination address. The @@ -770,7 +770,7 @@ any unflushed buffered port data is ignored.") } #undef FUNC_NAME -GUILE_PROC (scm_recvfrom, "recvfrom!", 2, 3, 0, +SCM_DEFINE (scm_recvfrom, "recvfrom!", 2, 3, 0, (SCM sock, SCM buf, SCM flags, SCM start, SCM end), "Returns data from the socket port @var{socket} and also information about where the data was received from. @var{socket} must already @@ -850,7 +850,7 @@ any unread buffered port data is ignored.") } #undef FUNC_NAME -GUILE_PROC (scm_sendto, "sendto", 4, 0, 1, +SCM_DEFINE (scm_sendto, "sendto", 4, 0, 1, (SCM sock, SCM message, SCM fam, SCM address, SCM args_and_flags), "Transmits the string @var{message} on the socket port @var{socket}. The destination address is specified using the @var{family}, @var{address} and diff --git a/libguile/sort.c b/libguile/sort.c index 7edb97fc2..184bec760 100644 --- a/libguile/sort.c +++ b/libguile/sort.c @@ -415,7 +415,7 @@ scm_cmp_function (SCM p) /* endpos equal as for substring, i.e. endpos is not included. */ /* More natural wih length? */ -GUILE_PROC (scm_restricted_vector_sort_x, "restricted-vector-sort!", 4, 0, 0, +SCM_DEFINE (scm_restricted_vector_sort_x, "restricted-vector-sort!", 4, 0, 0, (SCM vec, SCM less, SCM startpos, SCM endpos), "") #define FUNC_NAME s_scm_restricted_vector_sort_x @@ -456,7 +456,7 @@ GUILE_PROC (scm_restricted_vector_sort_x, "restricted-vector-sort!", 4, 0, 0, * is true when sequence is a list (x0 x1 ... xm) or a vector #(x0 ... xm) * such that for all 1 <= i <= m, * (not (less? (list-ref list i) (list-ref list (- i 1)))). */ -GUILE_PROC (scm_sorted_p, "sorted?", 2, 0, 0, +SCM_DEFINE (scm_sorted_p, "sorted?", 2, 0, 0, (SCM items, SCM less), "") #define FUNC_NAME s_scm_sorted_p @@ -536,7 +536,7 @@ GUILE_PROC (scm_sorted_p, "sorted?", 2, 0, 0, and returns a new list in which the elements of a and b have been stably interleaved so that (sorted? (merge a b less?) less?). Note: this does _not_ accept vectors. */ -GUILE_PROC (scm_merge, "merge", 3, 0, 0, +SCM_DEFINE (scm_merge, "merge", 3, 0, 0, (SCM alist, SCM blist, SCM less), "") #define FUNC_NAME s_scm_merge @@ -643,7 +643,7 @@ scm_merge_list_x (SCM alist, SCM blist, return build; } /* scm_merge_list_x */ -GUILE_PROC (scm_merge_x, "merge!", 3, 0, 0, +SCM_DEFINE (scm_merge_x, "merge!", 3, 0, 0, (SCM alist, SCM blist, SCM less), "") #define FUNC_NAME s_scm_merge_x @@ -715,7 +715,7 @@ scm_merge_list_step (SCM * seq, /* scm_sort_x manages lists and vectors, not stable sort */ -GUILE_PROC (scm_sort_x, "sort!", 2, 0, 0, +SCM_DEFINE (scm_sort_x, "sort!", 2, 0, 0, (SCM items, SCM less), "") #define FUNC_NAME s_scm_sort_x @@ -747,7 +747,7 @@ GUILE_PROC (scm_sort_x, "sort!", 2, 0, 0, /* scm_sort manages lists and vectors, not stable sort */ -GUILE_PROC (scm_sort, "sort", 2, 0, 0, +SCM_DEFINE (scm_sort, "sort", 2, 0, 0, (SCM items, SCM less), "") #define FUNC_NAME s_scm_sort @@ -838,7 +838,7 @@ scm_merge_vector_step (void *const vp, /* stable-sort! manages lists and vectors */ -GUILE_PROC (scm_stable_sort_x, "stable-sort!", 2, 0, 0, +SCM_DEFINE (scm_stable_sort_x, "stable-sort!", 2, 0, 0, (SCM items, SCM less), "") #define FUNC_NAME s_scm_stable_sort_x @@ -876,7 +876,7 @@ GUILE_PROC (scm_stable_sort_x, "stable-sort!", 2, 0, 0, /* stable_sort manages lists and vectors */ -GUILE_PROC (scm_stable_sort, "stable-sort", 2, 0, 0, +SCM_DEFINE (scm_stable_sort, "stable-sort", 2, 0, 0, (SCM items, SCM less), "") #define FUNC_NAME s_scm_stable_sort @@ -919,7 +919,7 @@ GUILE_PROC (scm_stable_sort, "stable-sort", 2, 0, 0, #undef FUNC_NAME /* scm_stable_sort */ /* stable */ -GUILE_PROC (scm_sort_list_x, "sort-list!", 2, 0, 0, +SCM_DEFINE (scm_sort_list_x, "sort-list!", 2, 0, 0, (SCM items, SCM less), "") #define FUNC_NAME s_scm_sort_list_x @@ -932,7 +932,7 @@ GUILE_PROC (scm_sort_list_x, "sort-list!", 2, 0, 0, #undef FUNC_NAME /* scm_sort_list_x */ /* stable */ -GUILE_PROC (scm_sort_list, "sort-list", 2, 0, 0, +SCM_DEFINE (scm_sort_list, "sort-list", 2, 0, 0, (SCM items, SCM less), "") #define FUNC_NAME s_scm_sort_list diff --git a/libguile/srcprop.c b/libguile/srcprop.c index 87d9f3dfb..06442b9f6 100644 --- a/libguile/srcprop.c +++ b/libguile/srcprop.c @@ -163,7 +163,7 @@ scm_srcprops_to_plist (SCM obj) return plist; } -GUILE_PROC (scm_source_properties, "source-properties", 1, 0, 0, +SCM_DEFINE (scm_source_properties, "source-properties", 1, 0, 0, (SCM obj), "") #define FUNC_NAME s_scm_source_properties @@ -185,7 +185,7 @@ GUILE_PROC (scm_source_properties, "source-properties", 1, 0, 0, /* Perhaps this procedure should look through an alist and try to make a srcprops-object...? */ -GUILE_PROC (scm_set_source_properties_x, "set-source-properties!", 2, 0, 0, +SCM_DEFINE (scm_set_source_properties_x, "set-source-properties!", 2, 0, 0, (SCM obj, SCM plist), "") #define FUNC_NAME s_scm_set_source_properties_x @@ -204,7 +204,7 @@ GUILE_PROC (scm_set_source_properties_x, "set-source-properties!", 2, 0, 0, } #undef FUNC_NAME -GUILE_PROC (scm_source_property, "source-property", 2, 0, 0, +SCM_DEFINE (scm_source_property, "source-property", 2, 0, 0, (SCM obj, SCM key), "") #define FUNC_NAME s_scm_source_property @@ -236,7 +236,7 @@ GUILE_PROC (scm_source_property, "source-property", 2, 0, 0, } #undef FUNC_NAME -GUILE_PROC (scm_set_source_property_x, "set-source-property!", 3, 0, 0, +SCM_DEFINE (scm_set_source_property_x, "set-source-property!", 3, 0, 0, (SCM obj, SCM key, SCM datum), "") #define FUNC_NAME s_scm_set_source_property_x diff --git a/libguile/stacks.c b/libguile/stacks.c index 95f1d3c5a..b059fbd49 100644 --- a/libguile/stacks.c +++ b/libguile/stacks.c @@ -408,7 +408,7 @@ narrow_stack (SCM stack,int inner,SCM inner_key,int outer,SCM outer_key) SCM scm_stack_type; -GUILE_PROC (scm_stack_p, "stack?", 1, 0, 0, +SCM_DEFINE (scm_stack_p, "stack?", 1, 0, 0, (SCM obj), "Return @code{#t} if @var{obj} is a calling stack.") #define FUNC_NAME s_scm_stack_p @@ -417,7 +417,7 @@ GUILE_PROC (scm_stack_p, "stack?", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC (scm_make_stack, "make-stack", 0, 0, 1, +SCM_DEFINE (scm_make_stack, "make-stack", 0, 0, 1, (SCM args), "") #define FUNC_NAME s_scm_make_stack @@ -510,7 +510,7 @@ GUILE_PROC (scm_make_stack, "make-stack", 0, 0, 1, } #undef FUNC_NAME -GUILE_PROC (scm_stack_id, "stack-id", 1, 0, 0, +SCM_DEFINE (scm_stack_id, "stack-id", 1, 0, 0, (SCM stack), "Return the identifier given to @var{stack} by @code{start-stack}.") #define FUNC_NAME s_scm_stack_id @@ -546,7 +546,7 @@ GUILE_PROC (scm_stack_id, "stack-id", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC (scm_stack_ref, "stack-ref", 2, 0, 0, +SCM_DEFINE (scm_stack_ref, "stack-ref", 2, 0, 0, (SCM stack, SCM i), "") #define FUNC_NAME s_scm_stack_ref @@ -560,7 +560,7 @@ GUILE_PROC (scm_stack_ref, "stack-ref", 2, 0, 0, } #undef FUNC_NAME -GUILE_PROC(scm_stack_length, "stack-length", 1, 0, 0, +SCM_DEFINE(scm_stack_length, "stack-length", 1, 0, 0, (SCM stack), "") #define FUNC_NAME s_scm_stack_length @@ -573,7 +573,7 @@ GUILE_PROC(scm_stack_length, "stack-length", 1, 0, 0, /* Frames */ -GUILE_PROC (scm_frame_p, "frame?", 1, 0, 0, +SCM_DEFINE (scm_frame_p, "frame?", 1, 0, 0, (SCM obj), "") #define FUNC_NAME s_scm_frame_p @@ -582,7 +582,7 @@ GUILE_PROC (scm_frame_p, "frame?", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC(scm_last_stack_frame, "last-stack-frame", 1, 0, 0, +SCM_DEFINE(scm_last_stack_frame, "last-stack-frame", 1, 0, 0, (SCM obj), "") #define FUNC_NAME s_scm_last_stack_frame @@ -623,7 +623,7 @@ GUILE_PROC(scm_last_stack_frame, "last-stack-frame", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC(scm_frame_number, "frame-number", 1, 0, 0, +SCM_DEFINE(scm_frame_number, "frame-number", 1, 0, 0, (SCM frame), "") #define FUNC_NAME s_scm_frame_number @@ -633,7 +633,7 @@ GUILE_PROC(scm_frame_number, "frame-number", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC(scm_frame_source, "frame-source", 1, 0, 0, +SCM_DEFINE(scm_frame_source, "frame-source", 1, 0, 0, (SCM frame), "") #define FUNC_NAME s_scm_frame_source @@ -643,7 +643,7 @@ GUILE_PROC(scm_frame_source, "frame-source", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC(scm_frame_procedure, "frame-procedure", 1, 0, 0, +SCM_DEFINE(scm_frame_procedure, "frame-procedure", 1, 0, 0, (SCM frame), "") #define FUNC_NAME s_scm_frame_procedure @@ -655,7 +655,7 @@ GUILE_PROC(scm_frame_procedure, "frame-procedure", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC(scm_frame_arguments, "frame-arguments", 1, 0, 0, +SCM_DEFINE(scm_frame_arguments, "frame-arguments", 1, 0, 0, (SCM frame), "") #define FUNC_NAME s_scm_frame_arguments @@ -665,7 +665,7 @@ GUILE_PROC(scm_frame_arguments, "frame-arguments", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC(scm_frame_previous, "frame-previous", 1, 0, 0, +SCM_DEFINE(scm_frame_previous, "frame-previous", 1, 0, 0, (SCM frame), "") #define FUNC_NAME s_scm_frame_previous @@ -680,7 +680,7 @@ GUILE_PROC(scm_frame_previous, "frame-previous", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC(scm_frame_next, "frame-next", 1, 0, 0, +SCM_DEFINE(scm_frame_next, "frame-next", 1, 0, 0, (SCM frame), "") #define FUNC_NAME s_scm_frame_next @@ -695,7 +695,7 @@ GUILE_PROC(scm_frame_next, "frame-next", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC(scm_frame_real_p, "frame-real?", 1, 0, 0, +SCM_DEFINE(scm_frame_real_p, "frame-real?", 1, 0, 0, (SCM frame), "") #define FUNC_NAME s_scm_frame_real_p @@ -705,7 +705,7 @@ GUILE_PROC(scm_frame_real_p, "frame-real?", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC(scm_frame_procedure_p, "frame-procedure?", 1, 0, 0, +SCM_DEFINE(scm_frame_procedure_p, "frame-procedure?", 1, 0, 0, (SCM frame), "") #define FUNC_NAME s_scm_frame_procedure_p @@ -715,7 +715,7 @@ GUILE_PROC(scm_frame_procedure_p, "frame-procedure?", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC(scm_frame_evaluating_args_p, "frame-evaluating-args?", 1, 0, 0, +SCM_DEFINE(scm_frame_evaluating_args_p, "frame-evaluating-args?", 1, 0, 0, (SCM frame), "") #define FUNC_NAME s_scm_frame_evaluating_args_p @@ -725,7 +725,7 @@ GUILE_PROC(scm_frame_evaluating_args_p, "frame-evaluating-args?", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC(scm_frame_overflow_p, "frame-overflow?", 1, 0, 0, +SCM_DEFINE(scm_frame_overflow_p, "frame-overflow?", 1, 0, 0, (SCM frame), "") #define FUNC_NAME s_scm_frame_overflow_p diff --git a/libguile/stime.c b/libguile/stime.c index f3a0438c7..f736fb7f9 100644 --- a/libguile/stime.c +++ b/libguile/stime.c @@ -129,7 +129,7 @@ extern int errno; struct timeb scm_your_base = {0}; -GUILE_PROC(scm_get_internal_real_time, "get-internal-real-time", 0, 0, 0, +SCM_DEFINE(scm_get_internal_real_time, "get-internal-real-time", 0, 0, 0, (), "Returns the number of time units since the interpreter was started.") #define FUNC_NAME s_scm_get_internal_real_time @@ -153,7 +153,7 @@ GUILE_PROC(scm_get_internal_real_time, "get-internal-real-time", 0, 0, 0, timet scm_your_base = 0; -GUILE_PROC(scm_get_internal_real_time, "get-internal-real-time", 0, 0, 0, +SCM_DEFINE(scm_get_internal_real_time, "get-internal-real-time", 0, 0, 0, (), "") #define FUNC_NAME s_scm_get_internal_real_time @@ -164,7 +164,7 @@ GUILE_PROC(scm_get_internal_real_time, "get-internal-real-time", 0, 0, 0, #endif -GUILE_PROC (scm_times, "times", 0, 0, 0, +SCM_DEFINE (scm_times, "times", 0, 0, 0, (void), "Returns an object with information about real and processor time. The following procedures accept such an object as an argument and @@ -215,7 +215,7 @@ terminated child processes. static long scm_my_base = 0; -GUILE_PROC(scm_get_internal_run_time, "get-internal-run-time", 0, 0, 0, +SCM_DEFINE(scm_get_internal_run_time, "get-internal-run-time", 0, 0, 0, (void), "Returns the number of time units of processor time used by the interpreter. Both "system" and "user" time @@ -226,7 +226,7 @@ are included but subprocesses are not.") } #undef FUNC_NAME -GUILE_PROC(scm_current_time, "current-time", 0, 0, 0, +SCM_DEFINE(scm_current_time, "current-time", 0, 0, 0, (void), "Returns the number of seconds since 1970-01-01 00:00:00 UTC, excluding leap seconds.") @@ -242,7 +242,7 @@ leap seconds.") } #undef FUNC_NAME -GUILE_PROC (scm_gettimeofday, "gettimeofday", 0, 0, 0, +SCM_DEFINE (scm_gettimeofday, "gettimeofday", 0, 0, 0, (void), "Returns a pair containing the number of seconds and microseconds since 1970-01-01 00:00:00 UTC, excluding leap seconds. Note: whether true @@ -337,7 +337,7 @@ restorezone (SCM zone, char **oldenv, const char *subr) } -GUILE_PROC (scm_localtime, "localtime", 1, 1, 0, +SCM_DEFINE (scm_localtime, "localtime", 1, 1, 0, (SCM time, SCM zone), "Returns an object representing the broken down components of @var{time}, an integer like the one returned by @code{current-time}. The time zone @@ -407,7 +407,7 @@ used.") } #undef FUNC_NAME -GUILE_PROC (scm_gmtime, "gmtime", 1, 0, 0, +SCM_DEFINE (scm_gmtime, "gmtime", 1, 0, 0, (SCM time), "Returns an object representing the broken down components of @var{time}, an integer like the one returned by @code{current-time}. The values @@ -465,7 +465,7 @@ bdtime2c (SCM sbd_time, struct tm *lt, int pos, const char *subr) #endif } -GUILE_PROC (scm_mktime, "mktime", 1, 1, 0, +SCM_DEFINE (scm_mktime, "mktime", 1, 1, 0, (SCM sbd_time, SCM zone), "@var{bd-time} is an object representing broken down time and @code{zone} is an optional time zone specifier (otherwise the TZ environment variable @@ -541,7 +541,7 @@ as @var{bd-time} but with normalized values.") } #undef FUNC_NAME -GUILE_PROC (scm_tzset, "tzset", 0, 0, 0, +SCM_DEFINE (scm_tzset, "tzset", 0, 0, 0, (void), "Initialize the timezone from the TZ environment variable or the system default. Usually this is done automatically by other procedures which @@ -554,7 +554,7 @@ is changed.") } #undef FUNC_NAME -GUILE_PROC (scm_strftime, "strftime", 2, 0, 0, +SCM_DEFINE (scm_strftime, "strftime", 2, 0, 0, (SCM format, SCM stime), "Formats a time specification @var{time} using @var{template}. @var{time} is an object with time components in the form returned by @code{localtime} @@ -593,7 +593,7 @@ is the formatted string. } #undef FUNC_NAME -GUILE_PROC (scm_strptime, "strptime", 2, 0, 0, +SCM_DEFINE (scm_strptime, "strptime", 2, 0, 0, (SCM format, SCM string), "Performs the reverse action to @code{strftime}, parsing @var{string} according to the specification supplied in @var{template}. The diff --git a/libguile/strings.c b/libguile/strings.c index ccc37d4d4..9235ebf7e 100644 --- a/libguile/strings.c +++ b/libguile/strings.c @@ -55,7 +55,7 @@ /* {Strings} */ -GUILE_PROC(scm_string_p, "string?", 1, 0, 0, +SCM_DEFINE(scm_string_p, "string?", 1, 0, 0, (SCM x), "") #define FUNC_NAME s_scm_string_p @@ -66,7 +66,7 @@ GUILE_PROC(scm_string_p, "string?", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC(scm_read_only_string_p, "read-only-string?", 1, 0, 0, +SCM_DEFINE(scm_read_only_string_p, "read-only-string?", 1, 0, 0, (SCM x), "Return true of OBJ can be read as a string, @@ -91,7 +91,7 @@ This illustrates the difference between @code{string?} and SCM_REGISTER_PROC(s_list_to_string, "list->string", 1, 0, 0, scm_string); -GUILE_PROC(scm_string, "string", 0, 0, 1, +SCM_DEFINE(scm_string, "string", 0, 0, 1, (SCM chrs), "") #define FUNC_NAME s_scm_string @@ -247,7 +247,7 @@ scm_makfrom0str_opt (const char *src) -GUILE_PROC(scm_make_string, "make-string", 1, 1, 0, +SCM_DEFINE(scm_make_string, "make-string", 1, 1, 0, (SCM k, SCM chr), "") #define FUNC_NAME s_scm_make_string @@ -270,7 +270,7 @@ GUILE_PROC(scm_make_string, "make-string", 1, 1, 0, } #undef FUNC_NAME -GUILE_PROC(scm_string_length, "string-length", 1, 0, 0, +SCM_DEFINE(scm_string_length, "string-length", 1, 0, 0, (SCM str), "") #define FUNC_NAME s_scm_string_length @@ -280,7 +280,7 @@ GUILE_PROC(scm_string_length, "string-length", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC(scm_string_ref, "string-ref", 1, 1, 0, +SCM_DEFINE(scm_string_ref, "string-ref", 1, 1, 0, (SCM str, SCM k), "") #define FUNC_NAME s_scm_string_ref @@ -292,7 +292,7 @@ GUILE_PROC(scm_string_ref, "string-ref", 1, 1, 0, } #undef FUNC_NAME -GUILE_PROC(scm_string_set_x, "string-set!", 3, 0, 0, +SCM_DEFINE(scm_string_set_x, "string-set!", 3, 0, 0, (SCM str, SCM k, SCM chr), "") #define FUNC_NAME s_scm_string_set_x @@ -307,7 +307,7 @@ GUILE_PROC(scm_string_set_x, "string-set!", 3, 0, 0, -GUILE_PROC(scm_substring, "substring", 2, 1, 0, +SCM_DEFINE(scm_substring, "substring", 2, 1, 0, (SCM str, SCM start, SCM end), "") #define FUNC_NAME s_scm_substring @@ -324,7 +324,7 @@ GUILE_PROC(scm_substring, "substring", 2, 1, 0, } #undef FUNC_NAME -GUILE_PROC(scm_string_append, "string-append", 0, 0, 1, +SCM_DEFINE(scm_string_append, "string-append", 0, 0, 1, (SCM args), "") #define FUNC_NAME s_scm_string_append @@ -350,7 +350,7 @@ GUILE_PROC(scm_string_append, "string-append", 0, 0, 1, } #undef FUNC_NAME -GUILE_PROC(scm_make_shared_substring, "make-shared-substring", 1, 2, 0, +SCM_DEFINE(scm_make_shared_substring, "make-shared-substring", 1, 2, 0, (SCM str, SCM frm, SCM to), "Return a shared substring of @var{str}. The semantics are the same as for the @code{substring} function: the shared substring returned diff --git a/libguile/strop.c b/libguile/strop.c index f8127f204..89723a3e8 100644 --- a/libguile/strop.c +++ b/libguile/strop.c @@ -86,7 +86,7 @@ scm_i_index (SCM *str, SCM chr, int direction, SCM sub_start, return -1; } -GUILE_PROC(scm_string_index, "string-index", 2, 2, 0, +SCM_DEFINE(scm_string_index, "string-index", 2, 2, 0, (SCM str, SCM chr, SCM frm, SCM to), "Return the index of the first occurrence of @var{chr} in @var{str}. The optional integer arguments @var{frm} and @var{to} limit the search to @@ -107,7 +107,7 @@ a portion of the string. This procedure essentially implements the } #undef FUNC_NAME -GUILE_PROC(scm_string_rindex, "string-rindex", 2, 2, 0, +SCM_DEFINE(scm_string_rindex, "string-rindex", 2, 2, 0, (SCM str, SCM chr, SCM frm, SCM to), "Like @code{string-index}, but search from the right of the string rather than from the left. This procedure essentially implements the @@ -132,7 +132,7 @@ SCM_REGISTER_PROC(s_substring_move_left_x, "substring-move-left!", 5, 0, 0, scm_ SCM_REGISTER_PROC(s_substring_move_right_x, "substring-move-right!", 5, 0, 0, scm_substring_move_x); -GUILE_PROC(scm_substring_move_x, "substring-move!", 5, 0, 0, +SCM_DEFINE(scm_substring_move_x, "substring-move!", 5, 0, 0, (SCM str1, SCM start1, SCM end1, SCM str2, SCM start2), "Copy the substring of @var{str1} bounded by @var{start1} and @var{end1} into @var{str2} beginning at position @var{end2}. @@ -175,7 +175,7 @@ are different strings, it does not matter which function you use.") #undef FUNC_NAME -GUILE_PROC(scm_substring_fill_x, "substring-fill!", 4, 0, 0, +SCM_DEFINE(scm_substring_fill_x, "substring-fill!", 4, 0, 0, (SCM str, SCM start, SCM end, SCM fill), "Change every character in @var{str} between @var{start} and @var{end} to @var{fill-char}.") @@ -195,7 +195,7 @@ GUILE_PROC(scm_substring_fill_x, "substring-fill!", 4, 0, 0, #undef FUNC_NAME -GUILE_PROC(scm_string_null_p, "string-null?", 1, 0, 0, +SCM_DEFINE(scm_string_null_p, "string-null?", 1, 0, 0, (SCM str), "Return @code{#t} if @var{str}'s length is nonzero, and @code{#f} otherwise.") @@ -207,7 +207,7 @@ otherwise.") #undef FUNC_NAME -GUILE_PROC(scm_string_to_list, "string->list", 1, 0, 0, +SCM_DEFINE(scm_string_to_list, "string->list", 1, 0, 0, (SCM str), "") #define FUNC_NAME s_scm_string_to_list @@ -224,7 +224,7 @@ GUILE_PROC(scm_string_to_list, "string->list", 1, 0, 0, -GUILE_PROC(scm_string_copy, "string-copy", 1, 0, 0, +SCM_DEFINE(scm_string_copy, "string-copy", 1, 0, 0, (SCM str), "") #define FUNC_NAME s_scm_string_copy @@ -235,7 +235,7 @@ GUILE_PROC(scm_string_copy, "string-copy", 1, 0, 0, #undef FUNC_NAME -GUILE_PROC(scm_string_fill_x, "string-fill!", 2, 0, 0, +SCM_DEFINE(scm_string_fill_x, "string-fill!", 2, 0, 0, (SCM str, SCM chr), "") #define FUNC_NAME s_scm_string_fill_x @@ -249,7 +249,7 @@ GUILE_PROC(scm_string_fill_x, "string-fill!", 2, 0, 0, } #undef FUNC_NAME -GUILE_PROC(scm_string_upcase_x, "string-upcase!", 1, 0, 0, +SCM_DEFINE(scm_string_upcase_x, "string-upcase!", 1, 0, 0, (SCM v), "@deffnx primitive string-downcase! str Upcase or downcase every character in @code{str}, respectively.") @@ -274,7 +274,7 @@ Upcase or downcase every character in @code{str}, respectively.") } #undef FUNC_NAME -GUILE_PROC(scm_string_upcase, "string-upcase", 1, 0, 0, +SCM_DEFINE(scm_string_upcase, "string-upcase", 1, 0, 0, (SCM str), "") #define FUNC_NAME s_scm_string_upcase @@ -283,7 +283,7 @@ GUILE_PROC(scm_string_upcase, "string-upcase", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC(scm_string_downcase_x, "string-downcase!", 1, 0, 0, +SCM_DEFINE(scm_string_downcase_x, "string-downcase!", 1, 0, 0, (SCM v), "") #define FUNC_NAME s_scm_string_downcase_x @@ -306,7 +306,7 @@ GUILE_PROC(scm_string_downcase_x, "string-downcase!", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC(scm_string_downcase, "string-downcase", 1, 0, 0, +SCM_DEFINE(scm_string_downcase, "string-downcase", 1, 0, 0, (SCM str), "") #define FUNC_NAME s_scm_string_downcase @@ -316,7 +316,7 @@ GUILE_PROC(scm_string_downcase, "string-downcase", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC(scm_string_capitalize_x, "string-capitalize!", 1, 0, 0, +SCM_DEFINE(scm_string_capitalize_x, "string-capitalize!", 1, 0, 0, (SCM s), "") #define FUNC_NAME s_scm_string_capitalize_x @@ -341,7 +341,7 @@ GUILE_PROC(scm_string_capitalize_x, "string-capitalize!", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC(scm_string_capitalize, "string-capitalize", 1, 0, 0, +SCM_DEFINE(scm_string_capitalize, "string-capitalize", 1, 0, 0, (SCM s), "") #define FUNC_NAME s_scm_string_capitalize @@ -351,7 +351,7 @@ GUILE_PROC(scm_string_capitalize, "string-capitalize", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC(scm_string_ci_to_symbol, "string-ci->symbol", 1, 0, 0, +SCM_DEFINE(scm_string_ci_to_symbol, "string-ci->symbol", 1, 0, 0, (SCM str), "") #define FUNC_NAME s_scm_string_ci_to_symbol diff --git a/libguile/strports.c b/libguile/strports.c index ea19523e1..2b98696f3 100644 --- a/libguile/strports.c +++ b/libguile/strports.c @@ -295,7 +295,7 @@ SCM scm_strport_to_string (SCM port) return scm_makfromstr (pt->read_buf, pt->read_buf_size, 0); } -GUILE_PROC(scm_call_with_output_string, "call-with-output-string", 1, 0, 0, +SCM_DEFINE(scm_call_with_output_string, "call-with-output-string", 1, 0, 0, (SCM proc), "Calls the one-argument procedure @var{proc} with a newly created output port. When the function returns, the string composed of the characters @@ -337,7 +337,7 @@ scm_strprint_obj (SCM obj) -GUILE_PROC(scm_call_with_input_string, "call-with-input-string", 2, 0, 0, +SCM_DEFINE(scm_call_with_input_string, "call-with-input-string", 2, 0, 0, (SCM str, SCM proc), "Calls the one-argument procedure @var{proc} with a newly created input port from which @var{string}'s contents may be read. The value yielded @@ -378,7 +378,7 @@ scm_eval_0str (const char *expr) } -GUILE_PROC (scm_eval_string, "eval-string", 1, 0, 0, +SCM_DEFINE (scm_eval_string, "eval-string", 1, 0, 0, (SCM string), "Evaluate @var{string} as the text representation of a Scheme form or forms, and return whatever value they produce.") diff --git a/libguile/struct.c b/libguile/struct.c index b42ace19d..f0760a5eb 100644 --- a/libguile/struct.c +++ b/libguile/struct.c @@ -66,7 +66,7 @@ static SCM required_vtable_fields = SCM_BOOL_F; SCM scm_struct_table; -GUILE_PROC (scm_make_struct_layout, "make-struct-layout", 1, 0, 0, +SCM_DEFINE (scm_make_struct_layout, "make-struct-layout", 1, 0, 0, (SCM fields), "Return a new structure layout object. @@ -240,7 +240,7 @@ scm_struct_init (SCM handle, int tail_elts, SCM inits) } -GUILE_PROC (scm_struct_p, "struct?", 1, 0, 0, +SCM_DEFINE (scm_struct_p, "struct?", 1, 0, 0, (SCM x), "Return #t iff @var{obj} is a structure object, else #f.") #define FUNC_NAME s_scm_struct_p @@ -249,7 +249,7 @@ GUILE_PROC (scm_struct_p, "struct?", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC (scm_struct_vtable_p, "struct-vtable?", 1, 0, 0, +SCM_DEFINE (scm_struct_vtable_p, "struct-vtable?", 1, 0, 0, (SCM x), "Return #t iff obj is a vtable structure.") #define FUNC_NAME s_scm_struct_vtable_p @@ -367,7 +367,7 @@ scm_struct_free_entity (SCM *vtable, SCM *data) return n; } -GUILE_PROC (scm_make_struct, "make-struct", 2, 0, 1, +SCM_DEFINE (scm_make_struct, "make-struct", 2, 0, 1, (SCM vtable, SCM tail_array_size, SCM init), "Create a new structure. @@ -420,7 +420,7 @@ can not be initialized by Scheme programs.") -GUILE_PROC (scm_make_vtable_vtable, "make-vtable-vtable", 2, 0, 1, +SCM_DEFINE (scm_make_vtable_vtable, "make-vtable-vtable", 2, 0, 1, (SCM extra_fields, SCM tail_array_size, SCM init), "Return a new, self-describing vtable structure. @@ -522,7 +522,7 @@ provided, it will be interpreted as a print call-back function. -GUILE_PROC (scm_struct_ref, "struct-ref", 2, 0, 0, +SCM_DEFINE (scm_struct_ref, "struct-ref", 2, 0, 0, (SCM handle, SCM pos), "@deffnx primitive struct-set! struct n value Access (or modify) the @var{n}th field of @var{struct}. @@ -607,7 +607,7 @@ integer value small enough to fit in one machine word.") #undef FUNC_NAME -GUILE_PROC (scm_struct_set_x, "struct-set!", 3, 0, 0, +SCM_DEFINE (scm_struct_set_x, "struct-set!", 3, 0, 0, (SCM handle, SCM pos, SCM val), "") #define FUNC_NAME s_scm_struct_set_x @@ -681,7 +681,7 @@ GUILE_PROC (scm_struct_set_x, "struct-set!", 3, 0, 0, #undef FUNC_NAME -GUILE_PROC (scm_struct_vtable, "struct-vtable", 1, 0, 0, +SCM_DEFINE (scm_struct_vtable, "struct-vtable", 1, 0, 0, (SCM handle), "Return the vtable structure that describes the type of @var{struct}.") #define FUNC_NAME s_scm_struct_vtable @@ -692,7 +692,7 @@ GUILE_PROC (scm_struct_vtable, "struct-vtable", 1, 0, 0, #undef FUNC_NAME -GUILE_PROC (scm_struct_vtable_tag, "struct-vtable-tag", 1, 0, 0, +SCM_DEFINE (scm_struct_vtable_tag, "struct-vtable-tag", 1, 0, 0, (SCM handle), "") #define FUNC_NAME s_scm_struct_vtable_tag @@ -731,7 +731,7 @@ scm_struct_create_handle (SCM obj) return handle; } -GUILE_PROC (scm_struct_vtable_name, "struct-vtable-name", 1, 0, 0, +SCM_DEFINE (scm_struct_vtable_name, "struct-vtable-name", 1, 0, 0, (SCM vtable), "") #define FUNC_NAME s_scm_struct_vtable_name @@ -741,7 +741,7 @@ GUILE_PROC (scm_struct_vtable_name, "struct-vtable-name", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC (scm_set_struct_vtable_name_x, "set-struct-vtable-name!", 2, 0, 0, +SCM_DEFINE (scm_set_struct_vtable_name_x, "set-struct-vtable-name!", 2, 0, 0, (SCM vtable, SCM name), "") #define FUNC_NAME s_scm_set_struct_vtable_name_x diff --git a/libguile/symbols.c b/libguile/symbols.c index 27dd69446..e64567c67 100644 --- a/libguile/symbols.c +++ b/libguile/symbols.c @@ -419,7 +419,7 @@ scm_symbol_value0 (const char *name) return SCM_CDR (vcell); } -GUILE_PROC(scm_symbol_p, "symbol?", 1, 0, 0, +SCM_DEFINE(scm_symbol_p, "symbol?", 1, 0, 0, (SCM x), "") #define FUNC_NAME s_scm_symbol_p @@ -429,7 +429,7 @@ GUILE_PROC(scm_symbol_p, "symbol?", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC(scm_symbol_to_string, "symbol->string", 1, 0, 0, +SCM_DEFINE(scm_symbol_to_string, "symbol->string", 1, 0, 0, (SCM s), "") #define FUNC_NAME s_scm_symbol_to_string @@ -440,7 +440,7 @@ GUILE_PROC(scm_symbol_to_string, "symbol->string", 1, 0, 0, #undef FUNC_NAME -GUILE_PROC(scm_string_to_symbol, "string->symbol", 1, 0, 0, +SCM_DEFINE(scm_string_to_symbol, "string->symbol", 1, 0, 0, (SCM s), "") #define FUNC_NAME s_scm_string_to_symbol @@ -456,7 +456,7 @@ GUILE_PROC(scm_string_to_symbol, "string->symbol", 1, 0, 0, #undef FUNC_NAME -GUILE_PROC(scm_string_to_obarray_symbol, "string->obarray-symbol", 2, 1, 0, +SCM_DEFINE(scm_string_to_obarray_symbol, "string->obarray-symbol", 2, 1, 0, (SCM o, SCM s, SCM softp), "Intern a new symbol in @var{obarray}, a symbol table, with name @var{string}. @@ -501,7 +501,7 @@ table; instead, simply return @code{#f}.") } #undef FUNC_NAME -GUILE_PROC(scm_intern_symbol, "intern-symbol", 2, 0, 0, +SCM_DEFINE(scm_intern_symbol, "intern-symbol", 2, 0, 0, (SCM o, SCM s), "Add a new symbol to @var{obarray} with name @var{string}, bound to an unspecified initial value. The symbol table is not modified if a symbol @@ -538,7 +538,7 @@ with this name is already present.") } #undef FUNC_NAME -GUILE_PROC(scm_unintern_symbol, "unintern-symbol", 2, 0, 0, +SCM_DEFINE(scm_unintern_symbol, "unintern-symbol", 2, 0, 0, (SCM o, SCM s), "Remove the symbol with name @var{string} from @var{obarray}. This function returns @code{#t} if the symbol was present and @code{#f} @@ -578,7 +578,7 @@ otherwise.") } #undef FUNC_NAME -GUILE_PROC(scm_symbol_binding, "symbol-binding", 2, 0, 0, +SCM_DEFINE(scm_symbol_binding, "symbol-binding", 2, 0, 0, (SCM o, SCM s), "Look up in @var{obarray} the symbol whose name is @var{string}, and return the value to which it is bound. If @var{obarray} is @code{#f}, @@ -597,7 +597,7 @@ use the global symbol table. If @var{string} is not interned in #undef FUNC_NAME -GUILE_PROC(scm_symbol_interned_p, "symbol-interned?", 2, 0, 0, +SCM_DEFINE(scm_symbol_interned_p, "symbol-interned?", 2, 0, 0, (SCM o, SCM s), "Return @var{#t} if @var{obarray} contains a symbol with name @var{string}, and @var{#f} otherwise.") @@ -618,7 +618,7 @@ GUILE_PROC(scm_symbol_interned_p, "symbol-interned?", 2, 0, 0, #undef FUNC_NAME -GUILE_PROC(scm_symbol_bound_p, "symbol-bound?", 2, 0, 0, +SCM_DEFINE(scm_symbol_bound_p, "symbol-bound?", 2, 0, 0, (SCM o, SCM s), "Return @var{#t} if @var{obarray} contains a symbol with name @var{string} bound to a defined value. This differs from @@ -641,7 +641,7 @@ been given any meaningful value.") #undef FUNC_NAME -GUILE_PROC(scm_symbol_set_x, "symbol-set!", 3, 0, 0, +SCM_DEFINE(scm_symbol_set_x, "symbol-set!", 3, 0, 0, (SCM o, SCM s, SCM v), "Find the symbol in @var{obarray} whose name is @var{string}, and rebind it to @var{value}. An error is signalled if @var{string} is not present @@ -676,7 +676,7 @@ msymbolize (SCM s) } -GUILE_PROC(scm_symbol_fref, "symbol-fref", 1, 0, 0, +SCM_DEFINE(scm_symbol_fref, "symbol-fref", 1, 0, 0, (SCM s), "Return the contents of @var{symbol}'s @dfn{function slot}.") #define FUNC_NAME s_scm_symbol_fref @@ -691,7 +691,7 @@ GUILE_PROC(scm_symbol_fref, "symbol-fref", 1, 0, 0, #undef FUNC_NAME -GUILE_PROC(scm_symbol_pref, "symbol-pref", 1, 0, 0, +SCM_DEFINE(scm_symbol_pref, "symbol-pref", 1, 0, 0, (SCM s), "Return the @dfn{property list} currently associated with @var{symbol}.") #define FUNC_NAME s_scm_symbol_pref @@ -706,7 +706,7 @@ GUILE_PROC(scm_symbol_pref, "symbol-pref", 1, 0, 0, #undef FUNC_NAME -GUILE_PROC(scm_symbol_fset_x, "symbol-fset!", 2, 0, 0, +SCM_DEFINE(scm_symbol_fset_x, "symbol-fset!", 2, 0, 0, (SCM s, SCM val), "Change the binding of @var{symbol}'s function slot.") #define FUNC_NAME s_scm_symbol_fset_x @@ -722,7 +722,7 @@ GUILE_PROC(scm_symbol_fset_x, "symbol-fset!", 2, 0, 0, #undef FUNC_NAME -GUILE_PROC(scm_symbol_pset_x, "symbol-pset!", 2, 0, 0, +SCM_DEFINE(scm_symbol_pset_x, "symbol-pset!", 2, 0, 0, (SCM s, SCM val), "Change the binding of @var{symbol}'s property slot.") #define FUNC_NAME s_scm_symbol_pset_x @@ -738,7 +738,7 @@ GUILE_PROC(scm_symbol_pset_x, "symbol-pset!", 2, 0, 0, #undef FUNC_NAME -GUILE_PROC(scm_symbol_hash, "symbol-hash", 1, 0, 0, +SCM_DEFINE(scm_symbol_hash, "symbol-hash", 1, 0, 0, (SCM s), "Return the hash value derived from @var{symbol}'s name, i.e. the integer index into @var{symbol}'s obarray at which it is stored.") @@ -777,7 +777,7 @@ copy_and_prune_obarray (SCM from, SCM to) } -GUILE_PROC(scm_builtin_bindings, "builtin-bindings", 0, 0, 0, +SCM_DEFINE(scm_builtin_bindings, "builtin-bindings", 0, 0, 0, (), "Create and return a copy of the global symbol table, removing all unbound symbols.") @@ -791,7 +791,7 @@ unbound symbols.") #undef FUNC_NAME -GUILE_PROC(scm_builtin_weak_bindings, "builtin-weak-bindings", 0, 0, 0, +SCM_DEFINE(scm_builtin_weak_bindings, "builtin-weak-bindings", 0, 0, 0, (), "") #define FUNC_NAME s_scm_builtin_weak_bindings @@ -807,7 +807,7 @@ static int gensym_counter; static SCM gensym_prefix; /* :FIXME:OPTIMIZE */ -GUILE_PROC (scm_gensym, "gensym", 0, 2, 0, +SCM_DEFINE (scm_gensym, "gensym", 0, 2, 0, (SCM name, SCM obarray), "Create a new, unique symbol in @var{obarray}, using the global symbol table by default. If @var{name} is specified, it should be used as a diff --git a/libguile/tag.c b/libguile/tag.c index 7d0e231a0..aaee3b9b7 100644 --- a/libguile/tag.c +++ b/libguile/tag.c @@ -89,7 +89,7 @@ SCM_CONST_LONG (scm_utag_flag_base, "utag_flag_base", 254); SCM_CONST_LONG (scm_utag_struct_base, "utag_struct_base", 255); -GUILE_PROC (scm_tag, "tag", 1, 0, 0, +SCM_DEFINE (scm_tag, "tag", 1, 0, 0, (SCM x), "") #define FUNC_NAME s_scm_tag diff --git a/libguile/throw.c b/libguile/throw.c index 8b0c3676d..ba2185f7b 100644 --- a/libguile/throw.c +++ b/libguile/throw.c @@ -526,7 +526,7 @@ scm_handle_by_throw (void *handler_data, SCM tag, SCM args) /* the Scheme-visible CATCH and LAZY-CATCH functions */ -GUILE_PROC(scm_catch, "catch", 3, 0, 0, +SCM_DEFINE(scm_catch, "catch", 3, 0, 0, (SCM tag, SCM thunk, SCM handler), "Invoke @var{thunk} in the dynamic context of @var{handler} for exceptions matching @var{key}. If thunk throws to the symbol @var{key}, @@ -569,7 +569,7 @@ this call to @code{catch}.") #undef FUNC_NAME -GUILE_PROC(scm_lazy_catch, "lazy-catch", 3, 0, 0, +SCM_DEFINE(scm_lazy_catch, "lazy-catch", 3, 0, 0, (SCM tag, SCM thunk, SCM handler), "") #define FUNC_NAME s_scm_lazy_catch @@ -598,7 +598,7 @@ GUILE_PROC(scm_lazy_catch, "lazy-catch", 3, 0, 0, /* throwing */ -GUILE_PROC(scm_throw, "throw", 1, 0, 1, +SCM_DEFINE(scm_throw, "throw", 1, 0, 1, (SCM key, SCM args), "Invoke the catch form matching @var{key}, passing @var{args} to the @var{handler}. diff --git a/libguile/unif.c b/libguile/unif.c index 60f5a10af..5d3769c23 100644 --- a/libguile/unif.c +++ b/libguile/unif.c @@ -237,7 +237,7 @@ scm_make_uve (long k, SCM prot) return v; } -GUILE_PROC(scm_uniform_vector_length, "uniform-vector-length", 1, 0, 0, +SCM_DEFINE(scm_uniform_vector_length, "uniform-vector-length", 1, 0, 0, (SCM v), "Returns the number of elements in @var{uve}.") #define FUNC_NAME s_scm_uniform_vector_length @@ -267,7 +267,7 @@ GUILE_PROC(scm_uniform_vector_length, "uniform-vector-length", 1, 0, 0, } #undef FUNC_NAME -GUILE_PROC(scm_array_p, "array?", 1, 1, 0, +SCM_DEFINE(scm_array_p, "array?", 1, 1, 0, (SCM v, SCM prot), "Returns @code{#t} if the @var{obj} is an array, and @code{#f} if not. @@ -335,7 +335,7 @@ loop: #undef FUNC_NAME -GUILE_PROC(scm_array_rank, "array-rank", 1, 0, 0, +SCM_DEFINE(scm_array_rank, "array-rank", 1, 0, 0, (SCM ra), "Returns the number of dimensions of @var{obj}. If @var{obj} is not an array, @code{0} is returned.") @@ -370,7 +370,7 @@ array, @code{0} is returned.") #undef FUNC_NAME -GUILE_PROC(scm_array_dimensions, "array-dimensions", 1, 0, 0, +SCM_DEFINE(scm_array_dimensions, "array-dimensions", 1, 0, 0, (SCM ra), "@code{Array-dimensions} is similar to @code{array-shape} but replaces elements with a @code{0} minimum with one greater than the maximum. So: @@ -508,7 +508,7 @@ scm_shap2ra (SCM args, const char *what) return ra; } -GUILE_PROC(scm_dimensions_to_uniform_array, "dimensions->uniform-array", 2, 1, 0, +SCM_DEFINE(scm_dimensions_to_uniform_array, "dimensions->uniform-array", 2, 1, 0, (SCM dims, SCM prot, SCM fill), "@deffnx primitive make-uniform-vector length prototype [fill] Creates and returns a uniform array or vector of type corresponding to @@ -619,7 +619,7 @@ scm_ra_set_contp (SCM ra) } -GUILE_PROC(scm_make_shared_array, "make-shared-array", 2, 0, 1, +SCM_DEFINE(scm_make_shared_array, "make-shared-array", 2, 0, 1, (SCM oldra, SCM mapfunc, SCM dims), "@code{make-shared-array} can be used to create shared subarrays of other arrays. The @var{mapper} is a function that translates coordinates in @@ -745,7 +745,7 @@ it can be otherwise arbitrary. A simple example: /* args are RA . DIMS */ -GUILE_PROC(scm_transpose_array, "transpose-array", 0, 0, 1, +SCM_DEFINE(scm_transpose_array, "transpose-array", 0, 0, 1, (SCM args), "Returns an array sharing contents with @var{array}, but with dimensions arranged in a different order. There must be one @var{dim} argument for @@ -857,7 +857,7 @@ examples: #undef FUNC_NAME /* args are RA . AXES */ -GUILE_PROC(scm_enclose_array, "enclose-array", 0, 0, 1, +SCM_DEFINE(scm_enclose_array, "enclose-array", 0, 0, 1, (SCM axes), "@var{dim0}, @var{dim1} @dots{} should be nonnegative integers less than the rank of @var{array}. @var{enclose-array} returns an array @@ -960,7 +960,7 @@ examples: -GUILE_PROC(scm_array_in_bounds_p, "array-in-bounds?", 0, 0, 1, +SCM_DEFINE(scm_array_in_bounds_p, "array-in-bounds?", 0, 0, 1, (SCM args), "Returns @code{#t} if its arguments would be acceptable to array-ref.") #define FUNC_NAME s_scm_array_in_bounds_p @@ -1043,7 +1043,7 @@ tail: SCM_REGISTER_PROC(s_array_ref, "array-ref", 1, 0, 1, scm_uniform_vector_ref); -GUILE_PROC(scm_uniform_vector_ref, "uniform-vector-ref", 2, 0, 0, +SCM_DEFINE(scm_uniform_vector_ref, "uniform-vector-ref", 2, 0, 0, (SCM v, SCM args), "Returns the element at the @code{(index1, index2)} element in @var{array}.") #define FUNC_NAME s_scm_uniform_vector_ref @@ -1237,7 +1237,7 @@ SCM_REGISTER_PROC(s_uniform_array_set1_x, "uniform-array-set1!", 3, 0, 0, scm_ar /* Note that args may be a list or an immediate object, depending which PROC is used (and it's called from C too). */ -GUILE_PROC(scm_array_set_x, "array-set!", 2, 0, 1, +SCM_DEFINE(scm_array_set_x, "array-set!", 2, 0, 1, (SCM v, SCM obj, SCM args), "Sets the element at the @code{(index1, index2)} element in @var{array} to @var{new-value}. The value returned by array-set! is unspecified.") @@ -1343,7 +1343,7 @@ GUILE_PROC(scm_array_set_x, "array-set!", 2, 0, 1, returns the unrolled array or #f if it can't be done. */ /* if strict is not SCM_UNDEFINED, return #f if returned array wouldn't have contiguous elements. */ -GUILE_PROC(scm_array_contents, "array-contents", 1, 1, 0, +SCM_DEFINE(scm_array_contents, "array-contents", 1, 1, 0, (SCM ra, SCM strict), "@deffnx primitive array-contents array strict If @var{array} may be @dfn{unrolled} into a one dimensional shared array @@ -1449,7 +1449,7 @@ scm_ra2contig (SCM ra, int copy) -GUILE_PROC(scm_uniform_array_read_x, "uniform-array-read!", 1, 3, 0, +SCM_DEFINE(scm_uniform_array_read_x, "uniform-array-read!", 1, 3, 0, (SCM ra, SCM port_or_fd, SCM start, SCM end), "@deffnx primitive uniform-vector-read! uve [port-or-fdes] [start] [end] Attempts to read all elements of @var{ura}, in lexicographic order, as @@ -1609,7 +1609,7 @@ loop: } #undef FUNC_NAME -GUILE_PROC(scm_uniform_array_write, "uniform-array-write", 1, 3, 0, +SCM_DEFINE(scm_uniform_array_write, "uniform-array-write", 1, 3, 0, (SCM v, SCM port_or_fd, SCM start, SCM end), "@deffnx primitive uniform-vector-write uve [port-or-fdes] [start] [end] Writes all elements of @var{ura} as binary objects to @@ -1734,7 +1734,7 @@ loop: static char cnt_tab[16] = {0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4}; -GUILE_PROC(scm_bit_count, "bit-count", 2, 0, 0, +SCM_DEFINE(scm_bit_count, "bit-count", 2, 0, 0, (SCM item, SCM seq), "Returns the number occurrences of @var{bool} in @var{bv}.") #define FUNC_NAME s_scm_bit_count @@ -1769,7 +1769,7 @@ GUILE_PROC(scm_bit_count, "bit-count", 2, 0, 0, #undef FUNC_NAME -GUILE_PROC(scm_bit_position, "bit-position", 3, 0, 0, +SCM_DEFINE(scm_bit_position, "bit-position", 3, 0, 0, (SCM item, SCM v, SCM k), "Returns the minimum index of an occurrence of @var{bool} in @var{bv} which is at least @var{k}. If no @var{bool} occurs within the specified @@ -1837,7 +1837,7 @@ range @code{#f} is returned.") #undef FUNC_NAME -GUILE_PROC(scm_bit_set_star_x, "bit-set*!", 3, 0, 0, +SCM_DEFINE(scm_bit_set_star_x, "bit-set*!", 3, 0, 0, (SCM v, SCM kv, SCM obj), "If uve is a bit-vector @var{bv} and uve must be of the same length. If @var{bool} is @code{#t}, uve is OR'ed into @var{bv}; If @var{bool} is @code{#f}, the @@ -1899,7 +1899,7 @@ The return value is unspecified.") #undef FUNC_NAME -GUILE_PROC(scm_bit_count_star, "bit-count*", 3, 0, 0, +SCM_DEFINE(scm_bit_count_star, "bit-count*", 3, 0, 0, (SCM v, SCM kv, SCM obj), "Returns @example @@ -1967,7 +1967,7 @@ GUILE_PROC(scm_bit_count_star, "bit-count*", 3, 0, 0, #undef FUNC_NAME -GUILE_PROC(scm_bit_invert_x, "bit-invert!", 1, 0, 0, +SCM_DEFINE(scm_bit_invert_x, "bit-invert!", 1, 0, 0, (SCM v), "Modifies @var{bv} by replacing each element with its negation.") #define FUNC_NAME s_scm_bit_invert_x @@ -2050,7 +2050,7 @@ ra2l (SCM ra,scm_sizet base,scm_sizet k) } -GUILE_PROC(scm_array_to_list, "array->list", 1, 0, 0, +SCM_DEFINE(scm_array_to_list, "array->list", 1, 0, 0, (SCM v), "Returns a list consisting of all the elements, in order, of @var{array}.") #define FUNC_NAME s_scm_array_to_list @@ -2157,7 +2157,7 @@ static char s_bad_ralst[] = "Bad scm_array contents list"; static int l2ra(SCM lst, SCM ra, scm_sizet base, scm_sizet k); -GUILE_PROC(scm_list_to_uniform_array, "list->uniform-array", 3, 0, 0, +SCM_DEFINE(scm_list_to_uniform_array, "list->uniform-array", 3, 0, 0, (SCM ndim, SCM prot, SCM lst), "@deffnx procedure list->uniform-vector prot lst Returns a uniform array of the type indicated by prototype @var{prot} @@ -2512,7 +2512,7 @@ tail: return 1; } -GUILE_PROC(scm_array_prototype, "array-prototype", 1, 0, 0, +SCM_DEFINE(scm_array_prototype, "array-prototype", 1, 0, 0, (SCM ra), "Returns an object that would produce an array of the same type as @var{array}, if used as the @var{prototype} for diff --git a/libguile/variable.c b/libguile/variable.c index e0b3643ad..cd4c740d8 100644 --- a/libguile/variable.c +++ b/libguile/variable.c @@ -99,7 +99,7 @@ make_vcell_variable (SCM vcell) SCM_RETURN_NEWSMOB (scm_tc16_variable, vcell); } -GUILE_PROC(scm_make_variable, "make-variable", 1, 1, 0, +SCM_DEFINE(scm_make_variable, "make-variable", 1, 1, 0, (SCM init, SCM name_hint), "") #define FUNC_NAME s_scm_make_variable @@ -119,7 +119,7 @@ GUILE_PROC(scm_make_variable, "make-variable", 1, 1, 0, #undef FUNC_NAME -GUILE_PROC(scm_make_undefined_variable, "make-undefined-variable", 0, 1, 0, +SCM_DEFINE(scm_make_undefined_variable, "make-undefined-variable", 0, 1, 0, (SCM name_hint), "") #define FUNC_NAME s_scm_make_undefined_variable @@ -139,7 +139,7 @@ GUILE_PROC(scm_make_undefined_variable, "make-undefined-variable", 0, 1, 0, #undef FUNC_NAME -GUILE_PROC(scm_variable_p, "variable?", 1, 0, 0, +SCM_DEFINE(scm_variable_p, "variable?", 1, 0, 0, (SCM obj), "") #define FUNC_NAME s_scm_variable_p @@ -149,7 +149,7 @@ GUILE_PROC(scm_variable_p, "variable?", 1, 0, 0, #undef FUNC_NAME -GUILE_PROC(scm_variable_ref, "variable-ref", 1, 0, 0, +SCM_DEFINE(scm_variable_ref, "variable-ref", 1, 0, 0, (SCM var), "") #define FUNC_NAME s_scm_variable_ref @@ -161,7 +161,7 @@ GUILE_PROC(scm_variable_ref, "variable-ref", 1, 0, 0, -GUILE_PROC(scm_variable_set_x, "variable-set!", 2, 0, 0, +SCM_DEFINE(scm_variable_set_x, "variable-set!", 2, 0, 0, (SCM var, SCM val), "") #define FUNC_NAME s_scm_variable_set_x @@ -173,7 +173,7 @@ GUILE_PROC(scm_variable_set_x, "variable-set!", 2, 0, 0, #undef FUNC_NAME -GUILE_PROC(scm_builtin_variable, "builtin-variable", 1, 0, 0, +SCM_DEFINE(scm_builtin_variable, "builtin-variable", 1, 0, 0, (SCM name), "") #define FUNC_NAME s_scm_builtin_variable @@ -200,7 +200,7 @@ GUILE_PROC(scm_builtin_variable, "builtin-variable", 1, 0, 0, #undef FUNC_NAME -GUILE_PROC(scm_variable_bound_p, "variable-bound?", 1, 0, 0, +SCM_DEFINE(scm_variable_bound_p, "variable-bound?", 1, 0, 0, (SCM var), "") #define FUNC_NAME s_scm_variable_bound_p diff --git a/libguile/vectors.c b/libguile/vectors.c index 3f7217ab6..35c0e5d89 100644 --- a/libguile/vectors.c +++ b/libguile/vectors.c @@ -122,7 +122,7 @@ scm_vector_set_length_x (SCM vect, SCM len) return vect; } -GUILE_PROC (scm_vector_p, "vector?", 1, 0, 0, +SCM_DEFINE (scm_vector_p, "vector?", 1, 0, 0, (SCM x), "") #define FUNC_NAME s_scm_vector_p @@ -145,7 +145,7 @@ scm_vector_length (SCM v) SCM_REGISTER_PROC (s_list_to_vector, "list->vector", 1, 0, 0, scm_vector); -GUILE_PROC (scm_vector, "vector", 0, 0, 1, +SCM_DEFINE (scm_vector, "vector", 0, 0, 1, (SCM l), "") #define FUNC_NAME s_scm_vector @@ -194,7 +194,7 @@ scm_vector_set_x (SCM v, SCM k, SCM obj) } -GUILE_PROC (scm_make_vector, "make-vector", 1, 1, 0, +SCM_DEFINE (scm_make_vector, "make-vector", 1, 1, 0, (SCM k, SCM fill), "") #define FUNC_NAME s_scm_make_vector @@ -221,7 +221,7 @@ GUILE_PROC (scm_make_vector, "make-vector", 1, 1, 0, #undef FUNC_NAME -GUILE_PROC(scm_vector_to_list, "vector->list", 1, 0, 0, +SCM_DEFINE(scm_vector_to_list, "vector->list", 1, 0, 0, (SCM v), "") #define FUNC_NAME s_scm_vector_to_list @@ -237,7 +237,7 @@ GUILE_PROC(scm_vector_to_list, "vector->list", 1, 0, 0, #undef FUNC_NAME -GUILE_PROC (scm_vector_fill_x, "vector-fill!", 2, 0, 0, +SCM_DEFINE (scm_vector_fill_x, "vector-fill!", 2, 0, 0, (SCM v, SCM fill_x), "") #define FUNC_NAME s_scm_vector_fill_x @@ -265,7 +265,7 @@ scm_vector_equal_p(SCM x, SCM y) } -GUILE_PROC (scm_vector_move_left_x, "vector-move-left!", 5, 0, 0, +SCM_DEFINE (scm_vector_move_left_x, "vector-move-left!", 5, 0, 0, (SCM vec1, SCM start1, SCM end1, SCM vec2, SCM start2), "Vector version of @code{substring-move-left!}.") #define FUNC_NAME s_scm_vector_move_left_x @@ -288,7 +288,7 @@ GUILE_PROC (scm_vector_move_left_x, "vector-move-left!", 5, 0, 0, } #undef FUNC_NAME -GUILE_PROC (scm_vector_move_right_x, "vector-move-right!", 5, 0, 0, +SCM_DEFINE (scm_vector_move_right_x, "vector-move-right!", 5, 0, 0, (SCM vec1, SCM start1, SCM end1, SCM vec2, SCM start2), "Vector version of @code{substring-move-right!}.") #define FUNC_NAME s_scm_vector_move_right_x diff --git a/libguile/version.c b/libguile/version.c index 316dc0455..a50ad1cfd 100644 --- a/libguile/version.c +++ b/libguile/version.c @@ -52,7 +52,7 @@ /* Return a Scheme string containing Guile's major version number. */ -GUILE_PROC(scm_major_version, "major-version", 0, 0, 0, +SCM_DEFINE(scm_major_version, "major-version", 0, 0, 0, (), "") #define FUNC_NAME s_scm_major_version @@ -63,7 +63,7 @@ GUILE_PROC(scm_major_version, "major-version", 0, 0, 0, /* Return a Scheme string containing Guile's minor version number. */ -GUILE_PROC(scm_minor_version, "minor-version", 0, 0, 0, +SCM_DEFINE(scm_minor_version, "minor-version", 0, 0, 0, (), "") #define FUNC_NAME s_scm_minor_version @@ -74,7 +74,7 @@ GUILE_PROC(scm_minor_version, "minor-version", 0, 0, 0, /* Return a Scheme string containing Guile's complete version. */ -GUILE_PROC(scm_version, "version", 0, 0, 0, +SCM_DEFINE(scm_version, "version", 0, 0, 0, (), "@deffnx primitive major-version @deffnx primitive minor-version diff --git a/libguile/vports.c b/libguile/vports.c index e35c9733d..f8c76f8c1 100644 --- a/libguile/vports.c +++ b/libguile/vports.c @@ -137,7 +137,7 @@ sf_close (SCM port) -GUILE_PROC(scm_make_soft_port, "make-soft-port", 2, 0, 0, +SCM_DEFINE(scm_make_soft_port, "make-soft-port", 2, 0, 0, (SCM pv, SCM modes), "Returns a port capable of receiving or delivering characters as specified by the @var{modes} string (@pxref{File Ports, diff --git a/libguile/weaks.c b/libguile/weaks.c index 730cd0804..3475ae298 100644 --- a/libguile/weaks.c +++ b/libguile/weaks.c @@ -55,7 +55,7 @@ */ -GUILE_PROC(scm_make_weak_vector, "make-weak-vector", 1, 1, 0, +SCM_DEFINE(scm_make_weak_vector, "make-weak-vector", 1, 1, 0, (SCM k, SCM fill), "Return a weak vector with @var{size} elements. If the optional argument @var{fill} is given, all entries in the vector will be set to @@ -77,7 +77,7 @@ argument @var{fill} is given, all entries in the vector will be set to SCM_REGISTER_PROC(s_list_to_weak_vector, "list->weak-vector", 1, 0, 0, scm_weak_vector); -GUILE_PROC(scm_weak_vector, "weak-vector", 0, 0, 1, +SCM_DEFINE(scm_weak_vector, "weak-vector", 0, 0, 1, (SCM l), "@deffnx primitive list->weak-vector l Construct a weak vector from a list: @code{weak-vector} uses the list of @@ -103,7 +103,7 @@ its arguments while @code{list->weak-vector} uses its only argument #undef FUNC_NAME -GUILE_PROC(scm_weak_vector_p, "weak-vector?", 1, 0, 0, +SCM_DEFINE(scm_weak_vector_p, "weak-vector?", 1, 0, 0, (SCM x), "Return @var{#t} if @var{obj} is a weak vector. Note that all weak hashes are also weak vectors.") @@ -119,7 +119,7 @@ hashes are also weak vectors.") -GUILE_PROC(scm_make_weak_key_hash_table, "make-weak-key-hash-table", 1, 0, 0, +SCM_DEFINE(scm_make_weak_key_hash_table, "make-weak-key-hash-table", 1, 0, 0, (SCM k), "@deffnx primitive make-weak-value-hash-table size @deffnx primitive make-doubly-weak-hash-table size @@ -141,7 +141,7 @@ regular hash tables. (@pxref{Hash Tables})") #undef FUNC_NAME -GUILE_PROC (scm_make_weak_value_hash_table, "make-weak-value-hash-table", 1, 0, 0, +SCM_DEFINE (scm_make_weak_value_hash_table, "make-weak-value-hash-table", 1, 0, 0, (SCM k), "") #define FUNC_NAME s_scm_make_weak_value_hash_table @@ -158,7 +158,7 @@ GUILE_PROC (scm_make_weak_value_hash_table, "make-weak-value-hash-table", 1, 0, -GUILE_PROC (scm_make_doubly_weak_hash_table, "make-doubly-weak-hash-table", 1, 0, 0, +SCM_DEFINE (scm_make_doubly_weak_hash_table, "make-doubly-weak-hash-table", 1, 0, 0, (SCM k), "") #define FUNC_NAME s_scm_make_doubly_weak_hash_table @@ -173,7 +173,7 @@ GUILE_PROC (scm_make_doubly_weak_hash_table, "make-doubly-weak-hash-table", 1, 0 } #undef FUNC_NAME -GUILE_PROC(scm_weak_key_hash_table_p, "weak-key-hash-table?", 1, 0, 0, +SCM_DEFINE(scm_weak_key_hash_table_p, "weak-key-hash-table?", 1, 0, 0, (SCM x), "@deffnx primitive weak-value-hash-table? obj @deffnx primitive doubly-weak-hash-table? obj @@ -187,7 +187,7 @@ hash table.") #undef FUNC_NAME -GUILE_PROC (scm_weak_value_hash_table_p, "weak-value-hash-table?", 1, 0, 0, +SCM_DEFINE (scm_weak_value_hash_table_p, "weak-value-hash-table?", 1, 0, 0, (SCM x), "") #define FUNC_NAME s_scm_weak_value_hash_table_p @@ -197,7 +197,7 @@ GUILE_PROC (scm_weak_value_hash_table_p, "weak-value-hash-table?", 1, 0, 0, #undef FUNC_NAME -GUILE_PROC (scm_doubly_weak_hash_table_p, "doubly-weak-hash-table?", 1, 0, 0, +SCM_DEFINE (scm_doubly_weak_hash_table_p, "doubly-weak-hash-table?", 1, 0, 0, (SCM x), "") #define FUNC_NAME s_scm_doubly_weak_hash_table_p |