diff options
40 files changed, 1735 insertions, 1910 deletions
diff --git a/libguile/alist.c b/libguile/alist.c index 9dbf9a5a2..9481412d1 100644 --- a/libguile/alist.c +++ b/libguile/alist.c @@ -55,10 +55,10 @@ 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 -pair is consed onto @var{alist}, and the new list is returned. This -function is @emph{not} destructive; @var{alist} is not modified.") + "Adds a new key-value pair to @var{alist}. A new pair is\n" + "created whose car is @var{key} and whose cdr is @var{value}, and the\n" + "pair is consed onto @var{alist}, and the new list is returned. This\n" + "function is @emph{not} destructive; @var{alist} is not modified.") #define FUNC_NAME s_scm_acons { SCM pair; @@ -80,8 +80,8 @@ function is @emph{not} destructive; @var{alist} is not modified.") 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.") + "Behaves like @code{assq} but does not do any error checking.\n" + "Recommended only for use in Guile internals.") #define FUNC_NAME s_scm_sloppy_assq { for (; SCM_CONSP (alist); alist = SCM_CDR (alist)) @@ -98,8 +98,8 @@ Recommended only for use in Guile internals.") 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.") + "Behaves like @code{assv} but does not do any error checking.\n" + "Recommended only for use in Guile internals.") #define FUNC_NAME s_scm_sloppy_assv { for (; SCM_CONSP (alist); alist = SCM_CDR (alist)) @@ -116,8 +116,8 @@ Recommended only for use in Guile internals.") 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.") + "Behaves like @code{assoc} but does not do any error checking.\n" + "Recommended only for use in Guile internals.") #define FUNC_NAME s_scm_sloppy_assoc { for (; SCM_CONSP (alist); alist = SCM_CDR (alist)) @@ -136,15 +136,15 @@ Recommended only for use in Guile internals.") SCM_DEFINE (scm_assq, "assq", 2, 0, 0, (SCM key, SCM alist), -"@deffnx primitive assv key alist -@deffnx primitive assoc key alist -Fetches the entry in @var{alist} that is associated with @var{key}. To -decide whether the argument @var{key} matches a particular entry in -@var{alist}, @code{assq} compares keys with @code{eq?}, @code{assv} -uses @code{eqv?} and @code{assoc} uses @code{equal?}. If @var{key} -cannot be found in @var{alist} (according to whichever equality -predicate is in use), then @code{#f} is returned. These functions -return the entire alist entry found (i.e. both the key and the value).") + "@deffnx primitive assv key alist\n" + "@deffnx primitive assoc key alist\n" + "Fetches the entry in @var{alist} that is associated with @var{key}. To\n" + "decide whether the argument @var{key} matches a particular entry in\n" + "@var{alist}, @code{assq} compares keys with @code{eq?}, @code{assv}\n" + "uses @code{eqv?} and @code{assoc} uses @code{equal?}. If @var{key}\n" + "cannot be found in @var{alist} (according to whichever equality\n" + "predicate is in use), then @code{#f} is returned. These functions\n" + "return the entire alist entry found (i.e. both the key and the value).") #define FUNC_NAME s_scm_assq { for (; SCM_CONSP (alist); alist = SCM_CDR (alist)) @@ -162,7 +162,7 @@ return the entire alist entry found (i.e. both the key and the value).") SCM_DEFINE (scm_assv, "assv", 2, 0, 0, (SCM key, SCM alist), -"Behaves like @code{assq} but uses @code{eqv?} for key comparison.") + "Behaves like @code{assq} but uses @code{eqv?} for key comparison.") #define FUNC_NAME s_scm_assv { for(; SCM_CONSP (alist); alist = SCM_CDR (alist)) @@ -180,7 +180,7 @@ SCM_DEFINE (scm_assv, "assv", 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.") + "Behaves like @code{assq} but uses @code{equal?} for key comparison.") #define FUNC_NAME s_scm_assoc { for(; SCM_CONSP (alist); alist = SCM_CDR (alist)) @@ -200,18 +200,16 @@ SCM_DEFINE (scm_assoc, "assoc", 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 -Like @code{assq}, @code{assv} and @code{assoc}, except that only the -value associated with @var{key} in @var{alist} is returned. These -functions are equivalent to - -@lisp -(let ((ent (@var{associator} @var{key} @var{alist}))) - (and ent (cdr ent))) -@end lisp - -where @var{associator} is one of @code{assq}, @code{assv} or @code{assoc}.") + "@deffnx primitive assv-ref alist key\n" + "@deffnx primitive assoc-ref alist key\n" + "Like @code{assq}, @code{assv} and @code{assoc}, except that only the\n" + "value associated with @var{key} in @var{alist} is returned. These\n" + "functions are equivalent to\n\n" + "@lisp\n" + "(let ((ent (@var{associator} @var{key} @var{alist})))\n" + " (and ent (cdr ent)))\n" + "@end lisp\n\n" + "where @var{associator} is one of @code{assq}, @code{assv} or @code{assoc}.") #define FUNC_NAME s_scm_assq_ref { SCM handle; @@ -228,7 +226,7 @@ where @var{associator} is one of @code{assq}, @code{assv} or @code{assoc}.") 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.") + "Behaves like @code{assq-ref} but uses @code{eqv?} for key comparison.") #define FUNC_NAME s_scm_assv_ref { SCM handle; @@ -245,7 +243,7 @@ SCM_DEFINE (scm_assv_ref, "assv-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.") + "Behaves like @code{assq-ref} but uses @code{equal?} for key comparison.") #define FUNC_NAME s_scm_assoc_ref { SCM handle; @@ -266,16 +264,15 @@ SCM_DEFINE (scm_assoc_ref, "assoc-ref", 2, 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 -Reassociate @var{key} in @var{alist} with @var{value}: find any existing -@var{alist} entry for @var{key} and associate it with the new -@var{value}. If @var{alist} does not contain an entry for @var{key}, -add a new one. Return the (possibly new) alist. - -These functions do not attempt to verify the structure of @var{alist}, -and so may cause unusual results if passed an object that is not an -association list.") + "@deffnx primitive assv-set! alist key value\n" + "@deffnx primitive assoc-set! alist key value\n" + "Reassociate @var{key} in @var{alist} with @var{value}: find any existing\n" + "@var{alist} entry for @var{key} and associate it with the new\n" + "@var{value}. If @var{alist} does not contain an entry for @var{key},\n" + "add a new one. Return the (possibly new) alist.\n\n" + "These functions do not attempt to verify the structure of @var{alist},\n" + "and so may cause unusual results if passed an object that is not an\n" + "association list.") #define FUNC_NAME s_scm_assq_set_x { SCM handle; @@ -293,7 +290,7 @@ association list.") 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.") + "Behaves like @code{assq-set!} but uses @code{eqv?} for key comparison.") #define FUNC_NAME s_scm_assv_set_x { SCM handle; @@ -311,7 +308,7 @@ SCM_DEFINE (scm_assv_set_x, "assv-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.") + "Behaves like @code{assq-set!} but uses @code{equal?} for key comparison.") #define FUNC_NAME s_scm_assoc_set_x { SCM handle; @@ -332,10 +329,10 @@ SCM_DEFINE (scm_assoc_set_x, "assoc-set!", 3, 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 -Delete any entry in @var{alist} associated with @var{key}, and return -the resulting alist.") + "@deffnx primitive assv-remove! alist key\n" + "@deffnx primitive assoc-remove! alist key\n" + "Delete any entry in @var{alist} associated with @var{key}, and return\n" + "the resulting alist.") #define FUNC_NAME s_scm_assq_remove_x { SCM handle; @@ -353,7 +350,7 @@ the resulting alist.") 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.") + "Behaves like @code{assq-remove!} but uses @code{eqv?} for key comparison.") #define FUNC_NAME s_scm_assv_remove_x { SCM handle; @@ -371,7 +368,7 @@ SCM_DEFINE (scm_assv_remove_x, "assv-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.") + "Behaves like @code{assq-remove!} but uses @code{equal?} for key comparison.") #define FUNC_NAME s_scm_assoc_remove_x { SCM handle; diff --git a/libguile/chars.c b/libguile/chars.c index b603510c2..f93f8d785 100644 --- a/libguile/chars.c +++ b/libguile/chars.c @@ -54,7 +54,7 @@ SCM_DEFINE (scm_char_p, "char?", 1, 0, 0, (SCM x), -"Return #t iff X is a character, else #f.") + "Return #t iff X is a character, else #f.") #define FUNC_NAME s_scm_char_p { return SCM_BOOL(SCM_ICHRP(x)); @@ -63,7 +63,7 @@ SCM_DEFINE (scm_char_p, "char?", 1, 0, 0, SCM_DEFINE1 (scm_char_eq_p, "char=?", scm_tc7_rpsubr, (SCM x, SCM y), -"Return #t iff X is the same character as Y, else #f.") + "Return #t iff X is the same character as Y, else #f.") #define FUNC_NAME s_scm_char_eq_p { SCM_VALIDATE_ICHR (1,x); @@ -75,7 +75,7 @@ SCM_DEFINE1 (scm_char_eq_p, "char=?", scm_tc7_rpsubr, SCM_DEFINE1 (scm_char_less_p, "char<?", scm_tc7_rpsubr, (SCM x, SCM y), -"Return #t iff X is less than Y in the Ascii sequence, else #f.") + "Return #t iff X is less than Y in the Ascii sequence, else #f.") #define FUNC_NAME s_scm_char_less_p { SCM_VALIDATE_ICHR (1,x); @@ -86,7 +86,7 @@ SCM_DEFINE1 (scm_char_less_p, "char<?", scm_tc7_rpsubr, SCM_DEFINE1 (scm_char_leq_p, "char<=?", scm_tc7_rpsubr, (SCM x, SCM y), -"Return #t iff X is less than or equal to Y in the Ascii sequence, else #f.") + "Return #t iff X is less than or equal to Y in the Ascii sequence, else #f.") #define FUNC_NAME s_scm_char_leq_p { SCM_VALIDATE_ICHR (1,x); @@ -97,7 +97,7 @@ SCM_DEFINE1 (scm_char_leq_p, "char<=?", scm_tc7_rpsubr, SCM_DEFINE1 (scm_char_gr_p, "char>?", scm_tc7_rpsubr, (SCM x, SCM y), -"Return #t iff X is greater than Y in the Ascii sequence, else #f.") + "Return #t iff X is greater than Y in the Ascii sequence, else #f.") #define FUNC_NAME s_scm_char_gr_p { SCM_VALIDATE_ICHR (1,x); @@ -108,7 +108,7 @@ SCM_DEFINE1 (scm_char_gr_p, "char>?", scm_tc7_rpsubr, SCM_DEFINE1 (scm_char_geq_p, "char>=?", scm_tc7_rpsubr, (SCM x, SCM y), -"Return #t iff X is greater than or equal to Y in the Ascii sequence, else #f.") + "Return #t iff X is greater than or equal to Y in the Ascii sequence, else #f.") #define FUNC_NAME s_scm_char_geq_p { SCM_VALIDATE_ICHR (1,x); @@ -119,7 +119,7 @@ SCM_DEFINE1 (scm_char_geq_p, "char>=?", scm_tc7_rpsubr, SCM_DEFINE1 (scm_char_ci_eq_p, "char-ci=?", scm_tc7_rpsubr, (SCM x, SCM y), -"Return #t iff X is the same character as Y ignoring case, else #f.") + "Return #t iff X is the same character as Y ignoring case, else #f.") #define FUNC_NAME s_scm_char_ci_eq_p { SCM_VALIDATE_ICHR (1,x); @@ -130,7 +130,7 @@ SCM_DEFINE1 (scm_char_ci_eq_p, "char-ci=?", scm_tc7_rpsubr, SCM_DEFINE1 (scm_char_ci_less_p, "char-ci<?", scm_tc7_rpsubr, (SCM x, SCM y), -"Return #t iff X is less than Y in the Ascii sequence ignoring case, else #f.") + "Return #t iff X is less than Y in the Ascii sequence ignoring case, else #f.") #define FUNC_NAME s_scm_char_ci_less_p { SCM_VALIDATE_ICHR (1,x); @@ -141,7 +141,7 @@ SCM_DEFINE1 (scm_char_ci_less_p, "char-ci<?", scm_tc7_rpsubr, SCM_DEFINE1 (scm_char_ci_leq_p, "char-ci<=?", scm_tc7_rpsubr, (SCM x, SCM y), -"Return #t iff X is less than or equal to Y in the Ascii sequence ignoring case, else #f.") + "Return #t iff X is less than or equal to Y in the Ascii sequence ignoring case, else #f.") #define FUNC_NAME s_scm_char_ci_leq_p { SCM_VALIDATE_ICHR (1,x); @@ -152,7 +152,7 @@ SCM_DEFINE1 (scm_char_ci_leq_p, "char-ci<=?", scm_tc7_rpsubr, SCM_DEFINE1 (scm_char_ci_gr_p, "char-ci>?", scm_tc7_rpsubr, (SCM x, SCM y), -"Return #t iff X is greater than Y in the Ascii sequence ignoring case, else #f.") + "Return #t iff X is greater than Y in the Ascii sequence ignoring case, else #f.") #define FUNC_NAME s_scm_char_ci_gr_p { SCM_VALIDATE_ICHR (1,x); @@ -163,7 +163,7 @@ SCM_DEFINE1 (scm_char_ci_gr_p, "char-ci>?", scm_tc7_rpsubr, SCM_DEFINE1 (scm_char_ci_geq_p, "char-ci>=?", scm_tc7_rpsubr, (SCM x, SCM y), -"Return #t iff X is greater than or equal to Y in the Ascii sequence ignoring case, else #f.") + "Return #t iff X is greater than or equal to Y in the Ascii sequence ignoring case, else #f.") #define FUNC_NAME s_scm_char_ci_geq_p { SCM_VALIDATE_ICHR (1,x); @@ -175,8 +175,8 @@ SCM_DEFINE1 (scm_char_ci_geq_p, "char-ci>=?", scm_tc7_rpsubr, 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.") + "Return #t iff CHR is alphabetic, else #f.\n" + "Alphabetic means the same thing as the isalpha C library function.") #define FUNC_NAME s_scm_char_alphabetic_p { SCM_VALIDATE_ICHR (1,chr); @@ -186,8 +186,8 @@ Alphabetic means the same thing as the isalpha C library function.") 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.") + "Return #t iff CHR is numeric, else #f.\n" + "Numeric means the same thing as the isdigit C library function.") #define FUNC_NAME s_scm_char_numeric_p { SCM_VALIDATE_ICHR (1,chr); @@ -197,8 +197,8 @@ Numeric means the same thing as the isdigit C library function.") 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.") + "Return #t iff CHR is whitespace, else #f.\n" + "Whitespace means the same thing as the isspace C library function.") #define FUNC_NAME s_scm_char_whitespace_p { SCM_VALIDATE_ICHR (1,chr); @@ -210,8 +210,8 @@ Whitespace means the same thing as the isspace C library function.") 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.") + "Return #t iff CHR is uppercase, else #f.\n" + "Uppercase means the same thing as the isupper C library function.") #define FUNC_NAME s_scm_char_upper_case_p { SCM_VALIDATE_ICHR (1,chr); @@ -222,8 +222,8 @@ Uppercase means the same thing as the isupper C library function.") 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.") + "Return #t iff CHR is lowercase, else #f.\n" + "Lowercase means the same thing as the islower C library function.") #define FUNC_NAME s_scm_char_lower_case_p { SCM_VALIDATE_ICHR (1,chr); @@ -235,9 +235,9 @@ Lowercase means the same thing as the islower C library function.") 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 -C library functions.") + "Return #t iff CHR is either uppercase or lowercase, else #f.\n" + "Uppercase and lowercase are as defined by the isupper and islower\n" + "C library functions.") #define FUNC_NAME s_scm_char_is_both_p { SCM_VALIDATE_ICHR (1,chr); @@ -250,7 +250,7 @@ C library functions.") 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.") + "Return the number corresponding to ordinal position of CHR in the Ascii sequence.") #define FUNC_NAME s_scm_char_to_integer { SCM_VALIDATE_ICHR (1,chr); @@ -262,7 +262,7 @@ SCM_DEFINE (scm_char_to_integer, "char->integer", 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.") + "Return the character at position N in the Ascii sequence.") #define FUNC_NAME s_scm_integer_to_char { SCM_VALIDATE_INUM_RANGE (1, n, 0, 256); @@ -273,7 +273,7 @@ SCM_DEFINE (scm_integer_to_char, "integer->char", 1, 0, 0, SCM_DEFINE (scm_char_upcase, "char-upcase", 1, 0, 0, (SCM chr), -"Return the uppercase character version of CHR.") + "Return the uppercase character version of CHR.") #define FUNC_NAME s_scm_char_upcase { SCM_VALIDATE_ICHR (1,chr); @@ -284,7 +284,7 @@ SCM_DEFINE (scm_char_upcase, "char-upcase", 1, 0, 0, SCM_DEFINE (scm_char_downcase, "char-downcase", 1, 0, 0, (SCM chr), -"Return the lowercase character version of CHR.") + "Return the lowercase character version of CHR.") #define FUNC_NAME s_scm_char_downcase { SCM_VALIDATE_ICHR (1,chr); diff --git a/libguile/debug.c b/libguile/debug.c index c2af8bbfa..e02d8d136 100644 --- a/libguile/debug.c +++ b/libguile/debug.c @@ -476,10 +476,10 @@ SCM_DEFINE (scm_procedure_environment, "procedure-environment", 1, 0, 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, -@var{exp} must be a memoized code object (in which case, its environment -is implicit).") + "Evaluate @var{exp} in its environment. If @var{env} is supplied,\n" + "it is the environment in which to evaluate @var{exp}. Otherwise,\n" + "@var{exp} must be a memoized code object (in which case, its environment\n" + "is implicit).") #define FUNC_NAME s_scm_local_eval { if (SCM_UNBNDP (env)) @@ -566,7 +566,7 @@ prindebugobj (SCM obj,SCM port,scm_print_state *pstate) SCM_DEFINE (scm_debug_object_p, "debug-object?", 1, 0, 0, (SCM obj), -"") + "") #define FUNC_NAME s_scm_debug_object_p { return SCM_BOOL(SCM_DEBUGOBJP (obj)); @@ -592,7 +592,7 @@ scm_make_debugobj (scm_debug_frame *frame) #ifdef GUILE_DEBUG SCM_DEFINE (scm_debug_hang, "debug-hang", 0, 1, 0, (SCM obj), -"") + "") #define FUNC_NAME s_scm_debug_hang { int go = 0; diff --git a/libguile/dynl.c b/libguile/dynl.c index 057ae450d..a5833e3e8 100644 --- a/libguile/dynl.c +++ b/libguile/dynl.c @@ -175,11 +175,11 @@ scm_register_module_xxx (char *module_name, void *init_func) 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 -car is the name of the module (as it might be used by -@code{use-modules}, for instance), and whose cdr is the function handle -for that module's initializer function.") + "Return a list of the object code modules that have been imported into\n" + "the current Guile process. Each element of the list is a pair whose\n" + "car is the name of the module (as it might be used by\n" + "@code{use-modules}, for instance), and whose cdr is the function handle\n" + "for that module's initializer function.") #define FUNC_NAME s_scm_registered_modules { SCM res; @@ -196,11 +196,11 @@ for that module's initializer function.") 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 -not actually unlink or deallocate these modules, but only destroys the -records of which modules have been loaded. It should therefore be used -only by module bookkeeping operations.") + "Destroy the list of modules registered with the current Guile process.\n" + "The return value is unspecified. @strong{Warning:} this function does\n" + "not actually unlink or deallocate these modules, but only destroys the\n" + "records of which modules have been loaded. It should therefore be used\n" + "only by module bookkeeping operations.") #define FUNC_NAME s_scm_clear_registered_modules { struct moddata *md1, *md2; @@ -357,9 +357,9 @@ SCM_SYMBOL (sym_global, "-global"); 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 -as the @var{lib} argument to the following functions.") + "Open the dynamic library @var{library-file}. A library handle\n" + "representing the opened library is returned; this handle should be used\n" + "as the @var{lib} argument to the following functions.") #define FUNC_NAME s_scm_dynamic_link { SCM z; @@ -423,8 +423,8 @@ get_dynl_obj (SCM dobj,const char *subr,int argn) 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.") + "Return @code{#t} if @var{obj} is a dynamic library handle, or @code{#f}\n" + "otherwise.") #define FUNC_NAME s_scm_dynamic_object_p { return SCM_BOOL(SCM_NIMP (obj) && SCM_CAR (obj) == scm_tc16_dynamic_obj); @@ -433,15 +433,15 @@ otherwise.") 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. -GJB:FIXME:DOC: 2nd version below: -Unlink the indicated object file from the application. The argument -@var{dynobj} should be one of the values returned by -@code{dynamic-link}. When @code{dynamic-unlink} has been called on -@var{dynobj}, it is no longer usable as an argument to the functions -below and you will get type mismatch errors when you try to. -") + "Unlink the library represented by @var{library-handle}, and remove any\n" + "imported symbols from the address space.\n" + "GJB:FIXME:DOC: 2nd version below:\n" + "Unlink the indicated object file from the application. The argument\n" + "@var{dynobj} should be one of the values returned by\n" + "@code{dynamic-link}. When @code{dynamic-unlink} has been called on\n" + "@var{dynobj}, it is no longer usable as an argument to the functions\n" + "below and you will get type mismatch errors when you try to.\n" + "") #define FUNC_NAME s_scm_dynamic_unlink { struct dynl_obj *d = get_dynl_obj (dobj, FUNC_NAME, SCM_ARG1); @@ -455,21 +455,19 @@ below and you will get type mismatch errors when you try to. 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. -GJB:FIXME:DOC: 2nd version below -Search the C function indicated by @var{function} (a string or symbol) -in @var{dynobj} and return some Scheme object that can later be used -with @code{dynamic-call} to actually call this function. Right now, -these Scheme objects are formed by casting the address of the function -to @code{long} and converting this number to its Scheme representation. - -Regardless whether your C compiler prepends an underscore @samp{_} to -the global names in a program, you should @strong{not} include this -underscore in @var{function}. Guile knows whether the underscore is -needed or not and will add it when necessary. - -") + "Import the symbol @var{func} from @var{lib} (a dynamic library handle).\n" + "A @dfn{function handle} representing the imported function is returned.\n" + "GJB:FIXME:DOC: 2nd version below\n" + "Search the C function indicated by @var{function} (a string or symbol)\n" + "in @var{dynobj} and return some Scheme object that can later be used\n" + "with @code{dynamic-call} to actually call this function. Right now,\n" + "these Scheme objects are formed by casting the address of the function\n" + "to @code{long} and converting this number to its Scheme representation.\n\n" + "Regardless whether your C compiler prepends an underscore @samp{_} to\n" + "the global names in a program, you should @strong{not} include this\n" + "underscore in @var{function}. Guile knows whether the underscore is\n" + "needed or not and will add it when necessary.\n\n" + "") #define FUNC_NAME s_scm_dynamic_func { struct dynl_obj *d; @@ -489,25 +487,23 @@ needed or not and will add it when necessary. 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 -@var{lib} and is fetched with @code{dynamic-func}. Otherwise, it should -be a function handle returned by a previous call to @code{dynamic-func}. -The return value is unspecified. -GJB:FIXME:DOC 2nd version below -Call the C function indicated by @var{function} and @var{dynobj}. The -function is passed no arguments and its return value is ignored. When -@var{function} is something returned by @code{dynamic-func}, call that -function and ignore @var{dynobj}. When @var{function} is a string (or -symbol, etc.), look it up in @var{dynobj}; this is equivalent to - -@smallexample -(dynamic-call (dynamic-func @var{function} @var{dynobj} #f)) -@end smallexample - -Interrupts are deferred while the C function is executing (with -@code{SCM_DEFER_INTS}/@code{SCM_ALLOW_INTS}). -") + "Call @var{lib-thunk}, a procedure of no arguments. If @var{lib-thunk}\n" + "is a string, it is assumed to be a symbol found in the dynamic library\n" + "@var{lib} and is fetched with @code{dynamic-func}. Otherwise, it should\n" + "be a function handle returned by a previous call to @code{dynamic-func}.\n" + "The return value is unspecified.\n" + "GJB:FIXME:DOC 2nd version below\n" + "Call the C function indicated by @var{function} and @var{dynobj}. The\n" + "function is passed no arguments and its return value is ignored. When\n" + "@var{function} is something returned by @code{dynamic-func}, call that\n" + "function and ignore @var{dynobj}. When @var{function} is a string (or\n" + "symbol, etc.), look it up in @var{dynobj}; this is equivalent to\n\n" + "@smallexample\n" + "(dynamic-call (dynamic-func @var{function} @var{dynobj} #f))\n" + "@end smallexample\n\n" + "Interrupts are deferred while the C function is executing (with\n" + "@code{SCM_DEFER_INTS}/@code{SCM_ALLOW_INTS}).\n" + "") #define FUNC_NAME s_scm_dynamic_call { void (*fptr)(); @@ -524,31 +520,25 @@ Interrupts are deferred while the C function is executing (with 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}, -@var{proc} should be either a function handle or a string, in which case -it is first fetched from @var{lib} with @code{dynamic-func}. - -@var{proc} is assumed to return an integer, which is used as the return -value from @code{dynamic-args-call}. - -GJB:FIXME:DOC 2nd version below -Call the C function indicated by @var{function} and @var{dynobj}, just -like @code{dynamic-call}, but pass it some arguments and return its -return value. The C function is expected to take two arguments and -return an @code{int}, just like @code{main}: - -@smallexample -int c_func (int argc, char **argv); -@end smallexample - -The parameter @var{args} must be a list of strings and is converted into -an array of @code{char *}. The array is passed in @var{argv} and its -size in @var{argc}. The return value is converted to a Scheme number -and returned from the call to @code{dynamic-args-call}. - - -") + "Call @var{proc}, a dynamically loaded function, passing it the argument\n" + "list @var{args} (a list of strings). As with @code{dynamic-call},\n" + "@var{proc} should be either a function handle or a string, in which case\n" + "it is first fetched from @var{lib} with @code{dynamic-func}.\n\n" + "@var{proc} is assumed to return an integer, which is used as the return\n" + "value from @code{dynamic-args-call}.\n\n" + "GJB:FIXME:DOC 2nd version below\n" + "Call the C function indicated by @var{function} and @var{dynobj}, just\n" + "like @code{dynamic-call}, but pass it some arguments and return its\n" + "return value. The C function is expected to take two arguments and\n" + "return an @code{int}, just like @code{main}:\n\n" + "@smallexample\n" + "int c_func (int argc, char **argv);\n" + "@end smallexample\n\n" + "The parameter @var{args} must be a list of strings and is converted into\n" + "an array of @code{char *}. The array is passed in @var{argv} and its\n" + "size in @var{argc}. The return value is converted to a Scheme number\n" + "and returned from the call to @code{dynamic-args-call}.\n\n\n" + "") #define FUNC_NAME s_scm_dynamic_args_call { int (*fptr) (int argc, char **argv); diff --git a/libguile/dynwind.c b/libguile/dynwind.c index 5f3271215..0f93efc13 100644 --- a/libguile/dynwind.c +++ b/libguile/dynwind.c @@ -72,60 +72,49 @@ SCM_DEFINE (scm_dynamic_wind, "dynamic-wind", 3, 0, 0, (SCM thunk1, SCM thunk2, SCM thunk3), -"All three arguments must be 0-argument procedures. - -@var{in-guard} is called, then @var{thunk}, then @var{out-guard}. - -If, any time during the execution of @var{thunk}, the continuation -of the @code{dynamic-wind} expression is escaped non-locally, @var{out-guard} -is called. If the continuation of the dynamic-wind is re-entered, -@var{in-guard} is called. Thus @var{in-guard} and @var{out-guard} may -be called any number of times. - -@example -(define x 'normal-binding) -@result{} x - -(define a-cont (call-with-current-continuation - (lambda (escape) - (let ((old-x x)) - (dynamic-wind - ;; in-guard: - ;; - (lambda () (set! x 'special-binding)) - - ;; thunk - ;; - (lambda () (display x) (newline) - (call-with-current-continuation escape) - (display x) (newline) - x) - - ;; out-guard: - ;; - (lambda () (set! x old-x))))))) - -;; Prints: -special-binding -;; Evaluates to: -@result{} a-cont - -x -@result{} normal-binding - -(a-cont #f) -;; Prints: -special-binding -;; Evaluates to: -@result{} a-cont ;; the value of the (define a-cont...) - -x -@result{} normal-binding - -a-cont -@result{} special-binding -@end example -") + "All three arguments must be 0-argument procedures.\n\n" + "@var{in-guard} is called, then @var{thunk}, then @var{out-guard}.\n\n" + "If, any time during the execution of @var{thunk}, the continuation\n" + "of the @code{dynamic-wind} expression is escaped non-locally, @var{out-guard}\n" + "is called. If the continuation of the dynamic-wind is re-entered,\n" + "@var{in-guard} is called. Thus @var{in-guard} and @var{out-guard} may\n" + "be called any number of times.\n\n" + "@example\n" + "(define x 'normal-binding)\n" + "@result{} x\n\n" + "(define a-cont (call-with-current-continuation \n" + " (lambda (escape)\n" + " (let ((old-x x))\n" + " (dynamic-wind\n" + " ;; in-guard:\n" + " ;;\n" + " (lambda () (set! x 'special-binding))\n\n" + " ;; thunk\n" + " ;;\n" + " (lambda () (display x) (newline)\n" + " (call-with-current-continuation escape)\n" + " (display x) (newline)\n" + " x)\n\n" + " ;; out-guard:\n" + " ;;\n" + " (lambda () (set! x old-x)))))))\n\n" + ";; Prints: \n" + "special-binding\n" + ";; Evaluates to:\n" + "@result{} a-cont\n\n" + "x\n" + "@result{} normal-binding\n\n" + "(a-cont #f)\n" + ";; Prints:\n" + "special-binding\n" + ";; Evaluates to:\n" + "@result{} a-cont ;; the value of the (define a-cont...)\n\n" + "x\n" + "@result{} normal-binding\n\n" + "a-cont\n" + "@result{} special-binding\n" + "@end example\n" + "") #define FUNC_NAME s_scm_dynamic_wind { SCM ans; @@ -201,7 +190,7 @@ scm_internal_dynamic_wind (scm_guard_t before, #ifdef GUILE_DEBUG SCM_DEFINE (scm_wind_chain, "wind-chain", 0, 0, 0, (), -"") + "") #define FUNC_NAME s_scm_wind_chain { return scm_dynwinds; diff --git a/libguile/error.c b/libguile/error.c index bb6a1e555..9601d4c70 100644 --- a/libguile/error.c +++ b/libguile/error.c @@ -89,17 +89,17 @@ scm_error (SCM key, const char *subr, const char *message, SCM args, SCM rest) /* Scheme interface to scm_error. */ 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} -is the error message string, possibly containing @code{~S} and @code{~A} -escapes. When an error is reported, these are replaced by formating the -corresponding members of @var{args}: @code{~A} (was @code{%s}) formats using @code{display} -and @code(~S) (was @code{%S}) formats using @code{write}. @var{data} is a -list or @code{#f} depending on @var{key}: if @var{key} is -@code{system-error} then it should be a list -containing the Unix @code{errno} value; If @var{key} is @code{signal} then -it should be a list containing the Unix signal number; otherwise it -will usually be @code{#f}.") + "Raise an error with key @var{key}. @var{subr} can be a string naming\n" + "the procedure associated with the error, or @code{#f}. @var{message}\n" + "is the error message string, possibly containing @code{~S} and @code{~A}\n" + "escapes. When an error is reported, these are replaced by formating the\n" + "corresponding members of @var{args}: @code{~A} (was @code{%s}) formats using @code{display}\n" + "and @code(~S) (was @code{%S}) formats using @code{write}. @var{data} is a\n" + "list or @code{#f} depending on @var{key}: if @var{key} is\n" + "@code{system-error} then it should be a list\n" + "containing the Unix @code{errno} value; If @var{key} is @code{signal} then\n" + "it should be a list containing the Unix signal number; otherwise it\n" + "will usually be @code{#f}.") #define FUNC_NAME s_scm_error_scm { char *szSubr; @@ -116,7 +116,7 @@ will usually be @code{#f}.") SCM_DEFINE (scm_strerror, "strerror", 1, 0, 0, (SCM err), -"Returns the Unix error message corresponding to @var{errno}, an integer.") + "Returns the Unix error message corresponding to @var{errno}, an integer.") #define FUNC_NAME s_scm_strerror { SCM_VALIDATE_INUM (1,err); diff --git a/libguile/eval.c b/libguile/eval.c index 77cffe9bb..9bc21cf44 100644 --- a/libguile/eval.c +++ b/libguile/eval.c @@ -1705,7 +1705,7 @@ scm_option scm_evaluator_trap_table[] = { SCM_DEFINE (scm_eval_options_interface, "eval-options-interface", 0, 1, 0, (SCM setting), -"") + "") #define FUNC_NAME s_scm_eval_options_interface { SCM ans; @@ -1722,7 +1722,7 @@ SCM_DEFINE (scm_eval_options_interface, "eval-options-interface", 0, 1, 0, SCM_DEFINE (scm_evaluator_traps, "evaluator-traps-interface", 0, 1, 0, (SCM setting), -"") + "") #define FUNC_NAME s_scm_evaluator_traps { SCM ans; @@ -3186,7 +3186,7 @@ ret: SCM_DEFINE (scm_nconc2last, "apply:nconc2last", 1, 0, 0, (SCM lst), -"") + "") #define FUNC_NAME s_scm_nconc2last { SCM *lloc; @@ -3705,7 +3705,7 @@ prinprom (SCM exp,SCM port,scm_print_state *pstate) SCM_DEFINE (scm_force, "force", 1, 0, 0, (SCM x), -"") + "") #define FUNC_NAME s_scm_force { SCM_VALIDATE_SMOB (1,x,promise); @@ -3726,8 +3726,8 @@ SCM_DEFINE (scm_force, "force", 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}).") + "Return true if @var{obj} is a promise, i.e. a delayed computation\n" + "(@pxref{Delayed evaluation,,,r4rs.info,The Revised^4 Report on Scheme}).") #define FUNC_NAME s_scm_promise_p { return SCM_BOOL(SCM_NIMP (x) && (SCM_TYP16 (x) == scm_tc16_promise)); @@ -3736,7 +3736,7 @@ SCM_DEFINE (scm_promise_p, "promise?", 1, 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 { SCM p, z; @@ -3753,11 +3753,11 @@ SCM_DEFINE (scm_cons_source, "cons-source", 3, 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 -contents of both pairs and vectors (since both cons cells and vector -cells may point to arbitrary objects), and stops recursing when it hits -any other object.") + "Recursively copy the data tree that is bound to @var{obj}, and return a\n" + "pointer to the new data structure. @code{copy-tree} recurses down the\n" + "contents of both pairs and vectors (since both cons cells and vector\n" + "cells may point to arbitrary objects), and stops recursing when it hits\n" + "any other object.") #define FUNC_NAME s_scm_copy_tree { SCM ans, tl; @@ -3801,9 +3801,9 @@ scm_eval_3 (SCM obj, int copyp, SCM env) 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 -equivalent to @code{(eval2 exp *top-level-lookup-closure*)}.") + "Evaluate @var{exp}, a Scheme expression, in the environment designated\n" + "by @var{lookup}, a symbol-lookup function. @code{(eval exp)} is\n" + "equivalent to @code{(eval2 exp *top-level-lookup-closure*)}.") #define FUNC_NAME s_scm_eval2 { return scm_eval_3 (obj, 1, scm_top_level_env (env_thunk)); @@ -3812,8 +3812,8 @@ equivalent to @code{(eval2 exp *top-level-lookup-closure*)}.") SCM_DEFINE (scm_eval, "eval", 1, 0, 0, (SCM obj), -"Evaluate @var{exp}, a list representing a Scheme expression, in the -top-level environment.") + "Evaluate @var{exp}, a list representing a Scheme expression, in the\n" + "top-level environment.") #define FUNC_NAME s_scm_eval { return scm_eval_3 (obj, diff --git a/libguile/evalext.c b/libguile/evalext.c index 0e9ab9b05..74430acf8 100644 --- a/libguile/evalext.c +++ b/libguile/evalext.c @@ -69,7 +69,7 @@ scm_m_generalized_set_x (SCM xorig, SCM env) 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.") + "Return @code{#t} if @var{sym} is defined in the top-level environment.") #define FUNC_NAME s_scm_definedp { SCM vcell; diff --git a/libguile/gc.c b/libguile/gc.c index 3c56f828a..052090017 100644 --- a/libguile/gc.c +++ b/libguile/gc.c @@ -344,7 +344,7 @@ scm_debug_newcell (void) SCM_DEFINE (scm_gc_stats, "gc-stats", 0, 0, 0, (), -"Returns an association list of statistics about Guile's current use of storage. ") + "Returns an association list of statistics about Guile's current use of storage. ") #define FUNC_NAME s_scm_gc_stats { int i; @@ -409,8 +409,8 @@ scm_gc_end () 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}") + "Return an integer that for the lifetime of @var{obj} is uniquely\n" + "returned by this function for @var{obj}") #define FUNC_NAME s_scm_object_address { return scm_ulong2num ((unsigned long)obj); @@ -420,8 +420,8 @@ returned by this function for @var{obj}") SCM_DEFINE (scm_gc, "gc", 0, 0, 0, (), -"Scans all of SCM objects and reclaims for further use those that are -no longer accessible.") + "Scans all of SCM objects and reclaims for further use those that are\n" + "no longer accessible.") #define FUNC_NAME s_scm_gc { SCM_DEFER_INTS; @@ -1756,7 +1756,7 @@ alloc_some_heap (int ncells, SCM *freelistp) SCM_DEFINE (scm_unhash_name, "unhash-name", 1, 0, 0, (SCM name), -"") + "") #define FUNC_NAME s_scm_unhash_name { int x; diff --git a/libguile/hash.c b/libguile/hash.c index 7c8d379a2..edc1a68d1 100644 --- a/libguile/hash.c +++ b/libguile/hash.c @@ -146,12 +146,12 @@ scm_ihashq (SCM obj, unsigned int n) SCM_DEFINE (scm_hashq, "hashq", 2, 0, 0, (SCM obj, SCM n), -"@deffnx primitive hashv key size -@deffnx primitive hash key size -Default hash functions for Guile hash tables. @var{key} is the -object to be hashed, and @var{size} is the size of the target hash -table. Each function returns an integer in the range 0 to -@var{size}-1.") + "@deffnx primitive hashv key size\n" + "@deffnx primitive hash key size\n" + "Default hash functions for Guile hash tables. @var{key} is the\n" + "object to be hashed, and @var{size} is the size of the target hash\n" + "table. Each function returns an integer in the range 0 to\n" + "@var{size}-1.") #define FUNC_NAME s_scm_hashq { SCM_VALIDATE_INUM_MIN (2,n,0); @@ -178,7 +178,7 @@ scm_ihashv (SCM obj, unsigned int n) SCM_DEFINE (scm_hashv, "hashv", 2, 0, 0, (SCM obj, SCM n), -"") + "") #define FUNC_NAME s_scm_hashv { SCM_VALIDATE_INUM_MIN (2,n,0); @@ -198,7 +198,7 @@ scm_ihash (SCM obj, unsigned int n) SCM_DEFINE (scm_hash, "hash", 2, 0, 0, (SCM obj, SCM n), -"") + "") #define FUNC_NAME s_scm_hash { SCM_VALIDATE_INUM_MIN (2,n,0); diff --git a/libguile/hashtab.c b/libguile/hashtab.c index 51057306d..205ee67cb 100644 --- a/libguile/hashtab.c +++ b/libguile/hashtab.c @@ -166,15 +166,15 @@ scm_hash_fn_remove_x (SCM table,SCM obj,unsigned int (*hash_fn)(),SCM (*assoc_fn 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 -@deffnx primitive hashx-get-handle hasher assoc table key -These procedures are similar to their @code{-ref} cousins, but return a -@dfn{handle} from the hash table rather than the value associated with -@var{key}. By convention, a handle in a hash table is the pair which -associates a key with a value. Where @code{hashq-ref table key} returns -only a @code{value}, @code{hashq-get-handle table key} returns the pair -@code{(key . value)}.") + "@deffnx primitive hashv-get-handle table key\n" + "@deffnx primitive hash-get-handle table key\n" + "@deffnx primitive hashx-get-handle hasher assoc table key\n" + "These procedures are similar to their @code{-ref} cousins, but return a\n" + "@dfn{handle} from the hash table rather than the value associated with\n" + "@var{key}. By convention, a handle in a hash table is the pair which\n" + "associates a key with a value. Where @code{hashq-ref table key} returns\n" + "only a @code{value}, @code{hashq-get-handle table key} returns the pair\n" + "@code{(key . value)}.") #define FUNC_NAME s_scm_hashq_get_handle { return scm_hash_fn_get_handle (table, obj, scm_ihashq, scm_sloppy_assq, 0); @@ -184,12 +184,12 @@ only a @code{value}, @code{hashq-get-handle table key} returns the pair 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 -@deffnx primitive hashx-create-handle! hasher assoc table key init -These functions look up @var{key} in @var{table} and return its handle, -If @var{key} is not already present, a new handle is created which -associates @var{key} with @var{init}.") + "@deffnx primitive hashv-create-handle! table key init\n" + "@deffnx primitive hash-create-handle! table key init\n" + "@deffnx primitive hashx-create-handle! hasher assoc table key init\n" + "These functions look up @var{key} in @var{table} and return its handle,\n" + "If @var{key} is not already present, a new handle is created which\n" + "associates @var{key} with @var{init}.") #define FUNC_NAME s_scm_hashq_create_handle_x { return scm_hash_fn_create_handle_x (table, obj, init, scm_ihashq, scm_sloppy_assq, 0); @@ -199,12 +199,12 @@ associates @var{key} with @var{init}.") 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] -Look up @var{key} in the hash table @var{table}, and return the -value (if any) associated with it. If @var{key} is not found, -return @var{default} (or @code{#f} if no @var{default} argument is -supplied).") + "@deffnx primitive hashv-ref table key [default]\n" + "@deffnx primitive hash-ref table key [default]\n" + "Look up @var{key} in the hash table @var{table}, and return the\n" + "value (if any) associated with it. If @var{key} is not found,\n" + "return @var{default} (or @code{#f} if no @var{default} argument is\n" + "supplied).") #define FUNC_NAME s_scm_hashq_ref { if (dflt == SCM_UNDEFINED) @@ -217,10 +217,10 @@ supplied).") 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 -Find the entry in @var{table} associated with @var{key}, and store -@var{value} there.") + "@deffnx primitive hashv-set! table key value\n" + "@deffnx primitive hash-set! table key value\n" + "Find the entry in @var{table} associated with @var{key}, and store\n" + "@var{value} there.") #define FUNC_NAME s_scm_hashq_set_x { return scm_hash_fn_set_x (table, obj, val, scm_ihashq, scm_sloppy_assq, 0); @@ -231,9 +231,9 @@ Find the entry in @var{table} associated with @var{key}, and store 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 -Remove @var{key} (and any value associated with it) from @var{table}.") + "@deffnx primitive hashv-remove! table key\n" + "@deffnx primitive hash-remove! table key\n" + "Remove @var{key} (and any value associated with it) from @var{table}.") #define FUNC_NAME s_scm_hashq_remove_x { return scm_hash_fn_remove_x (table, obj, scm_ihashq, scm_sloppy_assq, scm_delq_x, 0); @@ -245,7 +245,7 @@ Remove @var{key} (and any value associated with it) from @var{table}.") SCM_DEFINE (scm_hashv_get_handle, "hashv-get-handle", 2, 0, 0, (SCM table, SCM obj), -"") + "") #define FUNC_NAME s_scm_hashv_get_handle { return scm_hash_fn_get_handle (table, obj, scm_ihashv, scm_sloppy_assv, 0); @@ -255,7 +255,7 @@ SCM_DEFINE (scm_hashv_get_handle, "hashv-get-handle", 2, 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 { return scm_hash_fn_create_handle_x (table, obj, init, scm_ihashv, scm_sloppy_assv, 0); @@ -265,7 +265,7 @@ SCM_DEFINE (scm_hashv_create_handle_x, "hashv-create-handle!", 3, 0, 0, SCM_DEFINE (scm_hashv_ref, "hashv-ref", 2, 1, 0, (SCM table, SCM obj, SCM dflt), -"") + "") #define FUNC_NAME s_scm_hashv_ref { if (dflt == SCM_UNDEFINED) @@ -278,7 +278,7 @@ SCM_DEFINE (scm_hashv_ref, "hashv-ref", 2, 1, 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 { return scm_hash_fn_set_x (table, obj, val, scm_ihashv, scm_sloppy_assv, 0); @@ -288,7 +288,7 @@ SCM_DEFINE (scm_hashv_set_x, "hashv-set!", 3, 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 { return scm_hash_fn_remove_x (table, obj, scm_ihashv, scm_sloppy_assv, scm_delv_x, 0); @@ -299,7 +299,7 @@ SCM_DEFINE (scm_hashv_remove_x, "hashv-remove!", 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 { return scm_hash_fn_get_handle (table, obj, scm_ihash, scm_sloppy_assoc, 0); @@ -309,7 +309,7 @@ SCM_DEFINE (scm_hash_get_handle, "hash-get-handle", 2, 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 { return scm_hash_fn_create_handle_x (table, obj, init, scm_ihash, scm_sloppy_assoc, 0); @@ -319,7 +319,7 @@ SCM_DEFINE (scm_hash_create_handle_x, "hash-create-handle!", 3, 0, 0, SCM_DEFINE (scm_hash_ref, "hash-ref", 2, 1, 0, (SCM table, SCM obj, SCM dflt), -"") + "") #define FUNC_NAME s_scm_hash_ref { if (dflt == SCM_UNDEFINED) @@ -332,7 +332,7 @@ SCM_DEFINE (scm_hash_ref, "hash-ref", 2, 1, 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 { return scm_hash_fn_set_x (table, obj, val, scm_ihash, scm_sloppy_assoc, 0); @@ -343,7 +343,7 @@ SCM_DEFINE (scm_hash_set_x, "hash-set!", 3, 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 { return scm_hash_fn_remove_x (table, obj, scm_ihash, scm_sloppy_assoc, scm_delete_x, 0); @@ -407,7 +407,7 @@ scm_delx_x (SCM obj,SCM alist,struct scm_ihashx_closure * closure) 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 { struct scm_ihashx_closure closure; @@ -420,7 +420,7 @@ SCM_DEFINE (scm_hashx_get_handle, "hashx-get-handle", 4, 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 { struct scm_ihashx_closure closure; @@ -434,17 +434,16 @@ SCM_DEFINE (scm_hashx_create_handle_x, "hashx-create-handle!", 5, 0, 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 -These behave the same way as the corresponding @code{ref} and -@code{set!} functions described above, but use @var{hasher} as a -hash function and @var{assoc} to compare keys. @code{hasher} must -be a function that takes two arguments, a key to be hashed and a -table size. @code{assoc} must be an associator function, like -@code{assoc}, @code{assq} or @code{assv}. - -By way of illustration, @code{hashq-ref table key} is equivalent -to @code{hashx-ref hashq assq table key}.") + "@deffnx primitive hashx-set! hasher assoc table key value\n" + "@deffnx primitive hashx-remove! hasher assoc table key\n" + "These behave the same way as the corresponding @code{ref} and\n" + "@code{set!} functions described above, but use @var{hasher} as a\n" + "hash function and @var{assoc} to compare keys. @code{hasher} must\n" + "be a function that takes two arguments, a key to be hashed and a\n" + "table size. @code{assoc} must be an associator function, like\n" + "@code{assoc}, @code{assq} or @code{assv}.\n\n" + "By way of illustration, @code{hashq-ref table key} is equivalent\n" + "to @code{hashx-ref hashq assq table key}.") #define FUNC_NAME s_scm_hashx_ref { struct scm_ihashx_closure closure; @@ -461,7 +460,7 @@ to @code{hashx-ref hashq assq table key}.") 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 { struct scm_ihashx_closure closure; @@ -491,7 +490,7 @@ fold_proc (void *proc, SCM key, SCM data, SCM value) SCM_DEFINE (scm_hash_fold, "hash-fold", 3, 0, 0, (SCM proc, SCM init, SCM table), -"") + "") #define FUNC_NAME s_scm_hash_fold { SCM_VALIDATE_PROC (1,proc); diff --git a/libguile/ioext.c b/libguile/ioext.c index cdfed984a..737fe3a55 100644 --- a/libguile/ioext.c +++ b/libguile/ioext.c @@ -69,19 +69,18 @@ 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?} -is true, store the delimiter character in @var{buf} as well; otherwise, -discard it. If @var{port} is not specified, use the value of -@code{(current-input-port)}. If @var{start} or @var{end} are specified, -store data only into the substring of @var{buf} bounded by @var{start} -and @var{end} (which default to the beginning and end of the buffer, -respectively). - -Return a pair consisting of the delimiter that terminated the string and -the number of characters read. If reading stopped at the end of file, -the delimiter returned is the @var{eof-object}; if the buffer was filled -without encountering a delimiter, this value is @var{#f}.") + "Read characters from @var{port} into @var{buf} until one of the\n" + "characters in the @var{delims} string is encountered. If @var{gobble?}\n" + "is true, store the delimiter character in @var{buf} as well; otherwise,\n" + "discard it. If @var{port} is not specified, use the value of\n" + "@code{(current-input-port)}. If @var{start} or @var{end} are specified,\n" + "store data only into the substring of @var{buf} bounded by @var{start}\n" + "and @var{end} (which default to the beginning and end of the buffer,\n" + "respectively).\n\n" + "Return a pair consisting of the delimiter that terminated the string and\n" + "the number of characters read. If reading stopped at the end of file,\n" + "the delimiter returned is the @var{eof-object}; if the buffer was filled\n" + "without encountering a delimiter, this value is @var{#f}.") #define FUNC_NAME s_scm_read_delimited_x { long j; @@ -229,12 +228,12 @@ scm_do_read_line (SCM port, int *len_p) 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, -and a pair consisting of the line and its delimiter is returned. The -delimiter may be either a newline or the @var{eof-object}; if -@code{%read-line} is called at the end of file, it returns the pair -@code{(#<eof> . #<eof>)}.") + "Read a newline-terminated line from @var{port}, allocating storage as\n" + "necessary. The newline terminator (if any) is removed from the string,\n" + "and a pair consisting of the line and its delimiter is returned. The\n" + "delimiter may be either a newline or the @var{eof-object}; if\n" + "@code{%read-line} is called at the end of file, it returns the pair\n" + "@code{(#<eof> . #<eof>)}.") #define FUNC_NAME s_scm_read_line { scm_port *pt; @@ -282,14 +281,13 @@ delimiter may be either a newline or the @var{eof-object}; if 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 -is equivalent to: - -@smalllisp -(display obj [port]) -(newline [port]) -@end smalllisp") + "Display @var{obj} and a newline character to @var{port}. If @var{port}\n" + "is not specified, @code{(current-output-port)} is used. This function\n" + "is equivalent to:\n\n" + "@smalllisp\n" + "(display obj [port])\n" + "(newline [port])\n" + "@end smalllisp") #define FUNC_NAME s_scm_write_line { scm_display (obj, port); @@ -299,11 +297,11 @@ is equivalent to: 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: -@smalllisp -(seek port 0 SEEK_CUR) -@end smalllisp") + "Returns an integer representing the current position of @var{fd/port},\n" + "measured from the beginning. Equivalent to:\n" + "@smalllisp\n" + "(seek port 0 SEEK_CUR)\n" + "@end smalllisp") #define FUNC_NAME s_scm_ftell { return scm_seek (object, SCM_INUM0, SCM_MAKINUM (SEEK_CUR)); @@ -312,8 +310,8 @@ measured from the beginning. Equivalent to: 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.") + "Obsolete. Almost the same as seek, above, but the return value is\n" + "unspecified.") #define FUNC_NAME s_scm_fseek { scm_seek (object, offset, whence); @@ -323,19 +321,16 @@ unspecified.") 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 -current file descriptor in @var{new-port} will be closed. -After the redirection the two ports will share a file position -and file status flags. - -The return value is unspecified. - -Unexpected behaviour can result if both ports are subsequently used -and the original and/or duplicate ports are buffered. - -This procedure does not have any side effects on other ports or -revealed counts.") + "This procedure takes two ports and duplicates the underlying file\n" + "descriptor from @var{old-port} into @var{new-port}. The\n" + "current file descriptor in @var{new-port} will be closed.\n" + "After the redirection the two ports will share a file position\n" + "and file status flags.\n\n" + "The return value is unspecified.\n\n" + "Unexpected behaviour can result if both ports are subsequently used\n" + "and the original and/or duplicate ports are buffered.\n\n" + "This procedure does not have any side effects on other ports or\n" + "revealed counts.") #define FUNC_NAME s_scm_redirect_port { int ans, oldfd, newfd; @@ -372,7 +367,7 @@ revealed counts.") SCM_DEFINE (scm_dup_to_fdes, "dup->fdes", 1, 1, 0, (SCM fd_or_port, SCM fd), -"Returns an integer file descriptor.") + "Returns an integer file descriptor.") #define FUNC_NAME s_scm_dup_to_fdes { int oldfd, newfd, rv; @@ -411,8 +406,8 @@ SCM_DEFINE (scm_dup_to_fdes, "dup->fdes", 1, 1, 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.") + "Returns the integer file descriptor underlying @var{port}.\n" + "Does not change its revealed count.") #define FUNC_NAME s_scm_fileno { port = SCM_COERCE_OUTPORT (port); @@ -427,8 +422,8 @@ Does not change its revealed count.") if it is not going to assume that the arg is a port */ 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}.") + "Returns @code{#t} if @var{port} is using a serial\n" + "non-file device, otherwise @code{#f}.") #define FUNC_NAME s_scm_isatty_p { int rv; @@ -447,10 +442,10 @@ non-file device, otherwise @code{#f}.") 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 -is initialized to zero. The modes string is the same as that accepted -by @ref{File Ports, open-file}.") + "Returns a new port based on the file descriptor @var{fdes}.\n" + "Modes are given by the string @var{modes}. The revealed count of the port\n" + "is initialized to zero. The modes string is the same as that accepted\n" + "by @ref{File Ports, open-file}.") #define FUNC_NAME s_scm_fdopen { SCM port; @@ -472,12 +467,12 @@ by @ref{File Ports, open-file}.") */ 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}. -Any other ports already using this descriptor will be automatically -shifted to new descriptors and their revealed counts reset to zero. -The return value is @code{#f} if the file descriptor already had the -required value or @code{#t} if it was moved.") + "Moves the underlying file descriptor for @var{port} to the integer\n" + "value @var{fdes} without changing the revealed count of @var{port}.\n" + "Any other ports already using this descriptor will be automatically\n" + "shifted to new descriptors and their revealed counts reset to zero.\n" + "The return value is @code{#f} if the file descriptor already had the\n" + "required value or @code{#t} if it was moved.") #define FUNC_NAME s_scm_primitive_move_to_fdes { struct scm_fport *stream; @@ -509,8 +504,8 @@ required value or @code{#t} if it was moved.") /* Return a list of ports using a given file descriptor. */ 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.") + "Returns a list of existing ports which have @var{fdes} as an\n" + "underlying file descriptor, without changing their revealed counts.") #define FUNC_NAME s_scm_fdes_to_ports { SCM result = SCM_EOL; diff --git a/libguile/keywords.c b/libguile/keywords.c index 509d34644..ca0417fd7 100644 --- a/libguile/keywords.c +++ b/libguile/keywords.c @@ -108,8 +108,8 @@ scm_c_make_keyword (char *s) 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.") + "@code{keyword?} returns @code{#t} if the argument @var{kw} is a keyword;\n" + "it returns @code{#f} otherwise.") #define FUNC_NAME s_scm_keyword_p { return SCM_BOOL(SCM_KEYWORDP (obj)); @@ -119,8 +119,8 @@ it returns @code{#f} otherwise.") 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.]") + "@code{keyword-dash-symbol} [FIXME: have no idea what this does; it is\n" + "not commented.]") #define FUNC_NAME s_scm_keyword_dash_symbol { SCM_VALIDATE_KEYWORD (1,keyword); diff --git a/libguile/list.c b/libguile/list.c index c544352fa..8b9a51abc 100644 --- a/libguile/list.c +++ b/libguile/list.c @@ -234,8 +234,8 @@ SCM_DEFINE (scm_append_x, "append!", 0, 0, 1, SCM_DEFINE (scm_last_pair, "last-pair", 1, 0, 0, (SCM lst), -"Return a pointer to the last pair in @var{lst}, signalling an error if -@var{lst} is circular.") + "Return a pointer to the last pair in @var{lst}, signalling an error if\n" + "@var{lst} is circular.") #define FUNC_NAME s_scm_last_pair { SCM tortoise = lst; @@ -264,7 +264,7 @@ SCM_DEFINE (scm_last_pair, "last-pair", 1, 0, 0, SCM_DEFINE (scm_reverse, "reverse", 1, 0, 0, (SCM lst), -"") + "") #define FUNC_NAME s_scm_reverse { SCM result = SCM_EOL; @@ -289,17 +289,16 @@ SCM_DEFINE (scm_reverse, "reverse", 1, 0, 0, SCM_DEFINE (scm_reverse_x, "reverse!", 1, 1, 0, (SCM lst, SCM new_tail), -"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 -modified to point to the previous list element. Return a pointer to the -head of the reversed list. - -Caveat: because the list is modified in place, the tail of the original -list now becomes its head, and the head of the original list now becomes -the tail. Therefore, the @var{lst} symbol to which the head of the -original list was bound now points to the tail. To ensure that the head -of the modified list is not lost, it is wise to save the return value of -@code{reverse!}") + "A destructive version of @code{reverse} (@pxref{Pairs and Lists,,,r4rs,\n" + "The Revised^4 Report on Scheme}). The cdr of each cell in @var{lst} is\n" + "modified to point to the previous list element. Return a pointer to the\n" + "head of the reversed list.\n\n" + "Caveat: because the list is modified in place, the tail of the original\n" + "list now becomes its head, and the head of the original list now becomes\n" + "the tail. Therefore, the @var{lst} symbol to which the head of the\n" + "original list was bound now points to the tail. To ensure that the head\n" + "of the modified list is not lost, it is wise to save the return value of\n" + "@code{reverse!}") #define FUNC_NAME s_scm_reverse_x { SCM_ASSERT (scm_ilength (lst) >= 0, lst, SCM_ARG1, FUNC_NAME); @@ -325,7 +324,7 @@ of the modified list is not lost, it is wise to save the return value of SCM_DEFINE (scm_list_ref, "list-ref", 2, 0, 0, (SCM lst, SCM k), -"") + "") #define FUNC_NAME s_scm_list_ref { register long i; @@ -343,7 +342,7 @@ SCM_DEFINE (scm_list_ref, "list-ref", 2, 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}.") + "Set the @var{k}th element of @var{lst} to @var{val}.") #define FUNC_NAME s_scm_list_set_x { register long i; @@ -365,12 +364,11 @@ SCM_REGISTER_PROC(s_list_cdr_ref, "list-cdr-ref", 2, 0, 0, scm_list_tail); 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. - -@code{list-cdr-ref} and @code{list-tail} are identical. It may help to -think of @code{list-cdr-ref} as accessing the @var{k}th cdr of the list, -or returning the results of cdring @var{k} times down @var{lst}.") + "Return the \"tail\" of @var{lst} beginning with its @var{k}th element.\n" + "The first element of the list is considered to be element 0.\n\n" + "@code{list-cdr-ref} and @code{list-tail} are identical. It may help to\n" + "think of @code{list-cdr-ref} as accessing the @var{k}th cdr of the list,\n" + "or returning the results of cdring @var{k} times down @var{lst}.") #define FUNC_NAME s_scm_list_tail { register long i; @@ -386,7 +384,7 @@ or returning the results of cdring @var{k} times down @var{lst}.") 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}.") + "Set the @var{k}th cdr of @var{lst} to @var{val}.") #define FUNC_NAME s_scm_list_cdr_set_x { register long i; @@ -409,8 +407,8 @@ erout: 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.") + "Copy the first @var{k} elements from @var{lst} into a new list, and\n" + "return it.") #define FUNC_NAME s_scm_list_head { SCM answer; @@ -434,7 +432,7 @@ return it.") SCM_DEFINE (scm_list_copy, "list-copy", 1, 0, 0, (SCM lst), -"Return a (newly-created) copy of @var{lst}.") + "Return a (newly-created) copy of @var{lst}.") #define FUNC_NAME s_scm_list_copy { SCM newlst; @@ -462,12 +460,12 @@ SCM_DEFINE (scm_list_copy, "list-copy", 1, 0, 0, SCM_DEFINE (scm_sloppy_memq, "sloppy-memq", 2, 0, 0, (SCM x, SCM lst), -"@deffnx primitive sloppy-memv -@deffnx primitive sloppy-member -These procedures behave like @code{memq}, @code{memv} and @code{member} -(@pxref{Pairs and Lists,,,r4rs, The Revised^4 Report on Scheme}), but do -not perform any type or error checking. Their use is recommended only -in writing Guile internals, not for high-level Scheme programs.") + "@deffnx primitive sloppy-memv\n" + "@deffnx primitive sloppy-member\n" + "These procedures behave like @code{memq}, @code{memv} and @code{member}\n" + "(@pxref{Pairs and Lists,,,r4rs, The Revised^4 Report on Scheme}), but do\n" + "not perform any type or error checking. Their use is recommended only\n" + "in writing Guile internals, not for high-level Scheme programs.") #define FUNC_NAME s_scm_sloppy_memq { for(; SCM_CONSP (lst); lst = SCM_CDR(lst)) @@ -482,7 +480,7 @@ in writing Guile internals, not for high-level Scheme programs.") SCM_DEFINE (scm_sloppy_memv, "sloppy-memv", 2, 0, 0, (SCM x, SCM lst), -"") + "") #define FUNC_NAME s_scm_sloppy_memv { for(; SCM_CONSP (lst); lst = SCM_CDR(lst)) @@ -497,7 +495,7 @@ SCM_DEFINE (scm_sloppy_memv, "sloppy-memv", 2, 0, 0, SCM_DEFINE (scm_sloppy_member, "sloppy-member", 2, 0, 0, (SCM x, SCM lst), -"") + "") #define FUNC_NAME s_scm_sloppy_member { for(; SCM_CONSP (lst); lst = SCM_CDR(lst)) @@ -513,7 +511,7 @@ SCM_DEFINE (scm_sloppy_member, "sloppy-member", 2, 0, 0, SCM_DEFINE (scm_memq, "memq", 2, 0, 0, (SCM x, SCM lst), -"") + "") #define FUNC_NAME s_scm_memq { SCM answer; @@ -527,7 +525,7 @@ SCM_DEFINE (scm_memq, "memq", 2, 0, 0, SCM_DEFINE (scm_memv, "memv", 2, 0, 0, (SCM x, SCM lst), -"") + "") #define FUNC_NAME s_scm_memv { SCM answer; @@ -540,7 +538,7 @@ SCM_DEFINE (scm_memv, "memv", 2, 0, 0, SCM_DEFINE (scm_member, "member", 2, 0, 0, (SCM x, SCM lst), -"") + "") #define FUNC_NAME s_scm_member { SCM answer; @@ -556,14 +554,14 @@ SCM_DEFINE (scm_member, "member", 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 -These procedures are destructive versions of @code{delq}, @code{delv} -and @code{delete}: they modify the pointers in the existing @var{lst} -rather than creating a new list. Caveat evaluator: Like other -destructive list functions, these functions cannot modify the binding of -@var{lst}, and so cannot be used to delete the first element of -@var{lst} destructively.") + "@deffnx primitive delv! item lst\n" + "@deffnx primitive delete! item lst\n" + "These procedures are destructive versions of @code{delq}, @code{delv}\n" + "and @code{delete}: they modify the pointers in the existing @var{lst}\n" + "rather than creating a new list. Caveat evaluator: Like other\n" + "destructive list functions, these functions cannot modify the binding of\n" + "@var{lst}, and so cannot be used to delete the first element of\n" + "@var{lst} destructively.") #define FUNC_NAME s_scm_delq_x { SCM walk; @@ -586,7 +584,7 @@ destructive list functions, these functions cannot modify the binding of SCM_DEFINE (scm_delv_x, "delv!", 2, 0, 0, (SCM item, SCM lst), -"") + "") #define FUNC_NAME s_scm_delv_x { SCM walk; @@ -610,7 +608,7 @@ SCM_DEFINE (scm_delv_x, "delv!", 2, 0, 0, SCM_DEFINE (scm_delete_x, "delete!", 2, 0, 0, (SCM item, SCM lst), -"") + "") #define FUNC_NAME s_scm_delete_x { SCM walk; @@ -636,12 +634,12 @@ SCM_DEFINE (scm_delete_x, "delete!", 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 -Return a newly-created copy of @var{lst} with @var{item} removed. These -procedures mirror @code{memq}, @code{memv} and @code{member}: -@code{delq} compares elements of @var{lst} against @var{item} with -@code{eq?}, @code{delv} uses @code{eqv?} and @code{delete} uses @code{equal?}") + "@deffnx primitive delv item lst\n" + "@deffnx primitive delete item lst\n" + "Return a newly-created copy of @var{lst} with @var{item} removed. These\n" + "procedures mirror @code{memq}, @code{memv} and @code{member}:\n" + "@code{delq} compares elements of @var{lst} against @var{item} with\n" + "@code{eq?}, @code{delv} uses @code{eqv?} and @code{delete} uses @code{equal?}") #define FUNC_NAME s_scm_delq { SCM copy = scm_list_copy (lst); @@ -651,7 +649,7 @@ procedures mirror @code{memq}, @code{memv} and @code{member}: SCM_DEFINE (scm_delv, "delv", 2, 0, 0, (SCM item, SCM lst), -"") + "") #define FUNC_NAME s_scm_delv { SCM copy = scm_list_copy (lst); @@ -661,7 +659,7 @@ SCM_DEFINE (scm_delv, "delv", 2, 0, 0, SCM_DEFINE (scm_delete, "delete", 2, 0, 0, (SCM item, SCM lst), -"") + "") #define FUNC_NAME s_scm_delete { SCM copy = scm_list_copy (lst); @@ -672,7 +670,7 @@ SCM_DEFINE (scm_delete, "delete", 2, 0, 0, SCM_DEFINE (scm_delq1_x, "delq1!", 2, 0, 0, (SCM item, SCM lst), -"") + "") #define FUNC_NAME s_scm_delq1_x { SCM walk; @@ -698,7 +696,7 @@ SCM_DEFINE (scm_delq1_x, "delq1!", 2, 0, 0, SCM_DEFINE (scm_delv1_x, "delv1!", 2, 0, 0, (SCM item, SCM lst), -"") + "") #define FUNC_NAME s_scm_delv1_x { SCM walk; @@ -724,7 +722,7 @@ SCM_DEFINE (scm_delv1_x, "delv1!", 2, 0, 0, SCM_DEFINE (scm_delete1_x, "delete1!", 2, 0, 0, (SCM item, SCM lst), -"") + "") #define FUNC_NAME s_scm_delete1_x { SCM walk; diff --git a/libguile/load.c b/libguile/load.c index 316d1c940..4f573672a 100644 --- a/libguile/load.c +++ b/libguile/load.c @@ -99,12 +99,12 @@ load (void *data) 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 -pathname or be a pathname relative to the current directory. If the -variable @code{%load-hook} is defined, it should be bound to a procedure -that will be called before any code is loaded. See documentation for -@code{%load-hook} later in this section.") + "Load @var{file} and evaluate its contents in the top-level environment.\n" + "The load paths are not searched; @var{file} must either be a full\n" + "pathname or be a pathname relative to the current directory. If the\n" + "variable @code{%load-hook} is defined, it should be bound to a procedure\n" + "that will be called before any code is loaded. See documentation for\n" + "@code{%load-hook} later in this section.") #define FUNC_NAME s_scm_primitive_load { SCM hook = *scm_loc_load_hook; @@ -138,9 +138,9 @@ that will be called before any code is loaded. See documentation for #ifdef SCM_PKGDATA_DIR 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 -@samp{/usr/local/share/guile}.") + "Return the name of the directory where Scheme packages, modules and\n" + "libraries are kept. On most Unix systems, this will be\n" + "@samp{/usr/local/share/guile}.") #define FUNC_NAME s_scm_sys_package_data_dir { return scm_makfrom0str (SCM_PKGDATA_DIR); @@ -151,8 +151,8 @@ libraries are kept. On most Unix systems, this will be #ifdef SCM_LIBRARY_DIR 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\".") + "Return the directory where the Guile Scheme library files are installed.\n" + "E.g., may return \"/usr/share/guile/1.3.5\".") #define FUNC_NAME s_scm_sys_library_dir { return scm_makfrom0str(SCM_LIBRARY_DIR); @@ -163,8 +163,8 @@ E.g., may return \"/usr/share/guile/1.3.5\".") #ifdef SCM_SITE_DIR 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\".") + "Return the directory where the Guile site files are installed.\n" + "E.g., may return \"/usr/share/guile/site\".") #define FUNC_NAME s_scm_sys_site_dir { return scm_makfrom0str(SCM_SITE_DIR); @@ -213,7 +213,7 @@ scm_internal_parse_path (char *path, SCM tail) SCM_DEFINE (scm_parse_path, "parse-path", 1, 1, 0, (SCM path, SCM tail), -"") + "") #define FUNC_NAME s_scm_parse_path { SCM_ASSERT (SCM_FALSEP (path) || (SCM_ROSTRINGP (path)), @@ -258,7 +258,7 @@ SCM scm_listofnullstr; in PATH, we search for FILENAME concatenated with each EXTENSION. */ SCM_DEFINE (scm_search_path, "search-path", 2, 1, 0, (SCM path, SCM filename, SCM extensions), -"") + "") #define FUNC_NAME s_scm_search_path { char *filename_chars; @@ -401,12 +401,12 @@ SCM_DEFINE (scm_search_path, "search-path", 2, 1, 0, If FILENAME is absolute, return it unchanged. */ 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 -is an absolute pathname, return its full pathname. Otherwise, return -@code{#f}. Filenames may have any of the optional extensions in the -@code{%load-extensions} list; @code{%search-load-path} will try each -extension automatically.") + "Search @var{%load-path} for @var{file}, which must be readable by the\n" + "current user. If @var{file} is found in the list of paths to search or\n" + "is an absolute pathname, return its full pathname. Otherwise, return\n" + "@code{#f}. Filenames may have any of the optional extensions in the\n" + "@code{%load-extensions} list; @code{%search-load-path} will try each\n" + "extension automatically.") #define FUNC_NAME s_scm_sys_search_load_path { SCM path = *scm_loc_load_path; @@ -425,9 +425,9 @@ extension automatically.") 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 -the list of search paths, an error is signalled.") + "Search @var{%load-path} for @var{file} and load it into the top-level\n" + "environment. If @var{file} is a relative pathname and is not found in\n" + "the list of search paths, an error is signalled.") #define FUNC_NAME s_scm_primitive_load_path { SCM full_filename; @@ -459,10 +459,10 @@ SCM_SYMBOL (scm_end_of_file_key, "end-of-file"); 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 -is left to be read from @var{port}, an @code{end-of-file} error is -signalled.") + "Read a form from @var{port} (standard input by default), and evaluate it\n" + "(memoizing it in the process) in the top-level environment. If no data\n" + "is left to be read from @var{port}, an @code{end-of-file} error is\n" + "signalled.") #define FUNC_NAME s_scm_read_and_eval_x { SCM form = scm_read (port); diff --git a/libguile/macros.c b/libguile/macros.c index b5a0e73f8..9f092f327 100644 --- a/libguile/macros.c +++ b/libguile/macros.c @@ -54,7 +54,7 @@ long scm_tc16_macro; SCM_DEFINE (scm_makacro, "procedure->syntax", 1, 0, 0, (SCM code), -"") + "") #define FUNC_NAME s_scm_makacro { SCM_VALIDATE_PROC (1,code); @@ -65,7 +65,7 @@ SCM_DEFINE (scm_makacro, "procedure->syntax", 1, 0, 0, SCM_DEFINE (scm_makmacro, "procedure->macro", 1, 0, 0, (SCM code), -"") + "") #define FUNC_NAME s_scm_makmacro { SCM_VALIDATE_PROC (1,code); @@ -76,7 +76,7 @@ SCM_DEFINE (scm_makmacro, "procedure->macro", 1, 0, 0, SCM_DEFINE (scm_makmmacro, "procedure->memoizing-macro", 1, 0, 0, (SCM code), -"") + "") #define FUNC_NAME s_scm_makmmacro { SCM_VALIDATE_PROC (1,code); @@ -87,8 +87,8 @@ SCM_DEFINE (scm_makmmacro, "procedure->memoizing-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.") + "Return @code{#t} if @var{obj} is a regular macro, a memoizing macro or a\n" + "syntax transformer.") #define FUNC_NAME s_scm_macro_p { return SCM_BOOL(SCM_NIMP (obj) && SCM_TYP16 (obj) == scm_tc16_macro); @@ -102,10 +102,10 @@ SCM_SYMBOL (scm_sym_mmacro, "macro!"); 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, -or a memoizing macro, respectively. If @var{obj} is not a macro, -@code{#f} is returned.") + "Return one of the symbols @code{syntax}, @code{macro} or @code{macro!},\n" + "depending on whether @var{obj} is a syntax tranformer, a regular macro,\n" + "or a memoizing macro, respectively. If @var{obj} is not a macro,\n" + "@code{#f} is returned.") #define FUNC_NAME s_scm_macro_type { if (!(SCM_NIMP (m) && SCM_TYP16 (m) == scm_tc16_macro)) @@ -123,7 +123,7 @@ or a memoizing macro, respectively. If @var{obj} is not a macro, SCM_DEFINE (scm_macro_name, "macro-name", 1, 0, 0, (SCM m), -"") + "") #define FUNC_NAME s_scm_macro_name { SCM_VALIDATE_SMOB (1,m,macro); @@ -134,7 +134,7 @@ SCM_DEFINE (scm_macro_name, "macro-name", 1, 0, 0, SCM_DEFINE (scm_macro_transformer, "macro-transformer", 1, 0, 0, (SCM m), -"") + "") #define FUNC_NAME s_scm_macro_transformer { SCM_VALIDATE_SMOB (1,m,macro); diff --git a/libguile/net_db.c b/libguile/net_db.c index eedeee8eb..0458d87d9 100644 --- a/libguile/net_db.c +++ b/libguile/net_db.c @@ -84,11 +84,10 @@ extern int inet_aton (); 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. - -@smalllisp -(inet-aton "127.0.0.1") @result{} 2130706433 + "Converts a string containing an Internet host address in the traditional\n" + "dotted decimal notation into an integer.\n\n" + "@smalllisp\n" + "(inet-aton "127.0.0.1") @result{} 2130706433 @end smalllisp") #define FUNC_NAME s_scm_inet_aton @@ -107,11 +106,10 @@ dotted decimal notation into an integer. 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. - -@smalllisp -(inet-ntoa 2130706433) @result{} "127.0.0.1" + "Converts an integer Internet host address into a string with the\n" + "traditional dotted decimal representation.\n\n" + "@smalllisp\n" + "(inet-ntoa 2130706433) @result{} "127.0.0.1" @end smalllisp") #define FUNC_NAME s_scm_inet_ntoa { @@ -128,11 +126,10 @@ traditional dotted decimal representation. #ifdef HAVE_INET_NETOF SCM_DEFINE (scm_inet_netof, "inet-netof", 1, 0, 0, (SCM address), -"Returns the network number part of the given integer Internet address. - -@smalllisp -(inet-netof 2130706433) @result{} 127 -@end smalllisp") + "Returns the network number part of the given integer Internet address.\n\n" + "@smalllisp\n" + "(inet-netof 2130706433) @result{} 127\n" + "@end smalllisp") #define FUNC_NAME s_scm_inet_netof { struct in_addr addr; @@ -145,12 +142,11 @@ SCM_DEFINE (scm_inet_netof, "inet-netof", 1, 0, 0, #ifdef HAVE_INET_LNAOF SCM_DEFINE (scm_lnaof, "inet-lnaof", 1, 0, 0, (SCM address), -"Returns the local-address-with-network part of the given Internet -address. - -@smalllisp -(inet-lnaof 2130706433) @result{} 1 -@end smalllisp") + "Returns the local-address-with-network part of the given Internet\n" + "address.\n\n" + "@smalllisp\n" + "(inet-lnaof 2130706433) @result{} 1\n" + "@end smalllisp") #define FUNC_NAME s_scm_lnaof { struct in_addr addr; @@ -163,12 +159,11 @@ address. #ifdef HAVE_INET_MAKEADDR 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}. - -@smalllisp -(inet-makeaddr 127 1) @result{} 2130706433 -@end smalllisp") + "Makes an Internet host address by combining the network number @var{net}\n" + "with the local-address-within-network number @var{lna}.\n\n" + "@smalllisp\n" + "(inet-makeaddr 127 1) @result{} 2130706433\n" + "@end smalllisp") #define FUNC_NAME s_scm_inet_makeaddr { struct in_addr addr; @@ -241,17 +236,17 @@ static void scm_resolv_error (const char *subr, SCM bad_value) SCM_DEFINE (scm_gethost, "gethost", 0, 1, 0, (SCM name), -"@deffnx procedure gethostbyname hostname -@deffnx procedure gethostbyaddr address -Look up a host by name or address, returning a host object. The -@code{gethost} procedure will accept either a string name or an integer -address; if given no arguments, it behaves like @code{gethostent} (see -below). If a name or address is supplied but the address can not be -found, an error will be thrown to one of the keys: -@code{host-not-found}, @code{try-again}, @code{no-recovery} or -@code{no-data}, corresponding to the equivalent @code{h_error} values. -Unusual conditions may result in errors thrown to the -@code{system-error} or @code{misc_error} keys.") + "@deffnx procedure gethostbyname hostname\n" + "@deffnx procedure gethostbyaddr address\n" + "Look up a host by name or address, returning a host object. The\n" + "@code{gethost} procedure will accept either a string name or an integer\n" + "address; if given no arguments, it behaves like @code{gethostent} (see\n" + "below). If a name or address is supplied but the address can not be\n" + "found, an error will be thrown to one of the keys:\n" + "@code{host-not-found}, @code{try-again}, @code{no-recovery} or\n" + "@code{no-data}, corresponding to the equivalent @code{h_error} values.\n" + "Unusual conditions may result in errors thrown to the\n" + "@code{system-error} or @code{misc_error} keys.") #define FUNC_NAME s_scm_gethost { SCM ans = scm_make_vector (SCM_MAKINUM (5), SCM_UNSPECIFIED); @@ -326,13 +321,13 @@ Unusual conditions may result in errors thrown to the #if defined(HAVE_GETNETENT) && defined(HAVE_GETNETBYNAME) && defined(HAVE_GETNETBYADDR) SCM_DEFINE (scm_getnet, "getnet", 0, 1, 0, (SCM name), -"@deffnx procedure getnetbyname net-name -@deffnx procedure getnetbyaddr net-number -Look up a network by name or net number in the network database. The -@var{net-name} argument must be a string, and the @var{net-number} -argument must be an integer. @code{getnet} will accept either type of -argument, behaving like @code{getnetent} (see below) if no arguments are -given.") + "@deffnx procedure getnetbyname net-name\n" + "@deffnx procedure getnetbyaddr net-number\n" + "Look up a network by name or net number in the network database. The\n" + "@var{net-name} argument must be a string, and the @var{net-number}\n" + "argument must be an integer. @code{getnet} will accept either type of\n" + "argument, behaving like @code{getnetent} (see below) if no arguments are\n" + "given.") #define FUNC_NAME s_scm_getnet { SCM ans; @@ -379,12 +374,12 @@ given.") #ifdef HAVE_GETPROTOENT SCM_DEFINE (scm_getproto, "getproto", 0, 1, 0, (SCM name), -"@deffnx procedure getprotobyname name -@deffnx procedure getprotobynumber number -Look up a network protocol by name or by number. @code{getprotobyname} -takes a string argument, and @code{getprotobynumber} takes an integer -argument. @code{getproto} will accept either type, behaving like -@code{getprotoent} (see below) if no arguments are supplied.") + "@deffnx procedure getprotobyname name\n" + "@deffnx procedure getprotobynumber number\n" + "Look up a network protocol by name or by number. @code{getprotobyname}\n" + "takes a string argument, and @code{getprotobynumber} takes an integer\n" + "argument. @code{getproto} will accept either type, behaving like\n" + "@code{getprotoent} (see below) if no arguments are supplied.") #define FUNC_NAME s_scm_getproto { SCM ans; @@ -445,16 +440,15 @@ scm_return_entry (struct servent *entry) #ifdef HAVE_GETSERVENT SCM_DEFINE (scm_getserv, "getserv", 0, 2, 0, (SCM name, SCM proto), -"@deffnx procedure getservbyname name protocol -@deffnx procedure getservbyport port protocol -Look up a network service by name or by service number, and return a -network service object. The @var{protocol} argument specifies the name -of the desired protocol; if the protocol found in the network service -database does not match this name, a system error is signalled. - -The @code{getserv} procedure will take either a service name or number -as its first argument; if given no arguments, it behaves like -@code{getservent} (see below).") + "@deffnx procedure getservbyname name protocol\n" + "@deffnx procedure getservbyport port protocol\n" + "Look up a network service by name or by service number, and return a\n" + "network service object. The @var{protocol} argument specifies the name\n" + "of the desired protocol; if the protocol found in the network service\n" + "database does not match this name, a system error is signalled.\n\n" + "The @code{getserv} procedure will take either a service name or number\n" + "as its first argument; if given no arguments, it behaves like\n" + "@code{getservent} (see below).") #define FUNC_NAME s_scm_getserv { struct servent *entry; @@ -494,8 +488,8 @@ as its first argument; if given no arguments, it behaves like #if defined(HAVE_SETHOSTENT) && defined(HAVE_ENDHOSTENT) 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}.") + "If @var{stayopen} is omitted, this is equivalent to @code{endhostent}.\n" + "Otherwise it is equivalent to @code{sethostent stayopen}.") #define FUNC_NAME s_scm_sethost { if (SCM_UNBNDP (arg)) @@ -510,8 +504,8 @@ Otherwise it is equivalent to @code{sethostent stayopen}.") #if defined(HAVE_SETNETENT) && defined(HAVE_ENDNETENT) 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}.") + "If @var{stayopen} is omitted, this is equivalent to @code{endnetent}.\n" + "Otherwise it is equivalent to @code{setnetent stayopen}.") #define FUNC_NAME s_scm_setnet { if (SCM_UNBNDP (arg)) @@ -526,8 +520,8 @@ Otherwise it is equivalent to @code{setnetent stayopen}.") #if defined(HAVE_SETPROTOENT) && defined(HAVE_ENDPROTOENT) 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}.") + "If @var{stayopen} is omitted, this is equivalent to @code{endprotoent}.\n" + "Otherwise it is equivalent to @code{setprotoent stayopen}.") #define FUNC_NAME s_scm_setproto { if (SCM_UNBNDP (arg)) @@ -542,8 +536,8 @@ Otherwise it is equivalent to @code{setprotoent stayopen}.") #if defined(HAVE_SETSERVENT) && defined(HAVE_ENDSERVENT) 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}.") + "If @var{stayopen} is omitted, this is equivalent to @code{endservent}.\n" + "Otherwise it is equivalent to @code{setservent stayopen}.") #define FUNC_NAME s_scm_setserv { if (SCM_UNBNDP (arg)) diff --git a/libguile/numbers.c b/libguile/numbers.c index 73793b332..175074d4c 100644 --- a/libguile/numbers.c +++ b/libguile/numbers.c @@ -97,7 +97,7 @@ SCM_DEFINE (scm_exact_p, "exact?", 1, 0, 0, (SCM x), -"") + "") #define FUNC_NAME s_scm_exact_p { if (SCM_INUMP (x)) @@ -112,7 +112,7 @@ SCM_DEFINE (scm_exact_p, "exact?", 1, 0, 0, SCM_DEFINE (scm_odd_p, "odd?", 1, 0, 0, (SCM n), -"") + "") #define FUNC_NAME s_scm_odd_p { #ifdef SCM_BIGDIG @@ -130,7 +130,7 @@ SCM_DEFINE (scm_odd_p, "odd?", 1, 0, 0, SCM_DEFINE (scm_even_p, "even?", 1, 0, 0, (SCM n), -"") + "") #define FUNC_NAME s_scm_even_p { #ifdef SCM_BIGDIG @@ -517,13 +517,12 @@ scm_lcm (SCM n1, SCM n2) SCM_DEFINE1 (scm_logand, "logand", scm_tc7_asubr, (SCM n1, SCM n2), -"Returns the integer which is the bit-wise AND of the two integer -arguments. - -Example: -@lisp -(number->string (logand #b1100 #b1010) 2) - @result{} \"1000\"") + "Returns the integer which is the bit-wise AND of the two integer\n" + "arguments.\n\n" + "Example:\n" + "@lisp\n" + "(number->string (logand #b1100 #b1010) 2)\n" + " @result{} \"1000\"") #define FUNC_NAME s_scm_logand { int i1, i2; @@ -541,14 +540,13 @@ Example: SCM_DEFINE1 (scm_logior, "logior", scm_tc7_asubr, (SCM n1, SCM n2), -"Returns the integer which is the bit-wise OR of the two integer -arguments. - -Example: -@lisp -(number->string (logior #b1100 #b1010) 2) - @result{} \"1110\" -@end lisp") + "Returns the integer which is the bit-wise OR of the two integer\n" + "arguments.\n\n" + "Example:\n" + "@lisp\n" + "(number->string (logior #b1100 #b1010) 2)\n" + " @result{} \"1110\"\n" + "@end lisp") #define FUNC_NAME s_scm_logior { int i1, i2; @@ -566,14 +564,13 @@ Example: SCM_DEFINE1 (scm_logxor, "logxor", scm_tc7_asubr, (SCM n1, SCM n2), -"Returns the integer which is the bit-wise XOR of the two integer -arguments. - -Example: -@lisp -(number->string (logxor #b1100 #b1010) 2) - @result{} \"110\" -@end lisp") + "Returns the integer which is the bit-wise XOR of the two integer\n" + "arguments.\n\n" + "Example:\n" + "@lisp\n" + "(number->string (logxor #b1100 #b1010) 2)\n" + " @result{} \"110\"\n" + "@end lisp") #define FUNC_NAME s_scm_logxor { int i1, i2; @@ -591,12 +588,11 @@ Example: SCM_DEFINE (scm_logtest, "logtest", 2, 0, 0, (SCM n1, SCM n2), -"@example -(logtest j k) @equiv{} (not (zero? (logand j k))) - -(logtest #b0100 #b1011) @result{} #f -(logtest #b0100 #b0111) @result{} #t -@end example") + "@example\n" + "(logtest j k) @equiv{} (not (zero? (logand j k)))\n\n" + "(logtest #b0100 #b1011) @result{} #f\n" + "(logtest #b0100 #b0111) @result{} #t\n" + "@end example") #define FUNC_NAME s_scm_logtest { int i1, i2; @@ -609,15 +605,14 @@ SCM_DEFINE (scm_logtest, "logtest", 2, 0, 0, SCM_DEFINE (scm_logbit_p, "logbit?", 2, 0, 0, (SCM index, SCM j), -"@example -(logbit? index j) @equiv{} (logtest (integer-expt 2 index) j) - -(logbit? 0 #b1101) @result{} #t -(logbit? 1 #b1101) @result{} #f -(logbit? 2 #b1101) @result{} #t -(logbit? 3 #b1101) @result{} #t -(logbit? 4 #b1101) @result{} #f -@end example") + "@example\n" + "(logbit? index j) @equiv{} (logtest (integer-expt 2 index) j)\n\n" + "(logbit? 0 #b1101) @result{} #t\n" + "(logbit? 1 #b1101) @result{} #f\n" + "(logbit? 2 #b1101) @result{} #t\n" + "(logbit? 3 #b1101) @result{} #t\n" + "(logbit? 4 #b1101) @result{} #f\n" + "@end example") #define FUNC_NAME s_scm_logbit_p { int i1, i2; @@ -629,16 +624,15 @@ SCM_DEFINE (scm_logbit_p, "logbit?", 2, 0, 0, SCM_DEFINE (scm_lognot, "lognot", 1, 0, 0, (SCM n), -"Returns the integer which is the 2s-complement of the integer argument. - -Example: -@lisp -(number->string (lognot #b10000000) 2) - @result{} \"-10000001\" -(number->string (lognot #b0) 2) - @result{} \"-1\" -@end lisp -") + "Returns the integer which is the 2s-complement of the integer argument.\n\n" + "Example:\n" + "@lisp\n" + "(number->string (lognot #b10000000) 2)\n" + " @result{} \"-10000001\"\n" + "(number->string (lognot #b0) 2)\n" + " @result{} \"-1\"\n" + "@end lisp\n" + "") #define FUNC_NAME s_scm_lognot { SCM_VALIDATE_INUM (1,n); @@ -648,15 +642,14 @@ Example: SCM_DEFINE (scm_integer_expt, "integer-expt", 2, 0, 0, (SCM n, SCM k), -"Returns @var{n} raised to the non-negative integer exponent @var{k}. - -Example: -@lisp -(integer-expt 2 5) - @result{} 32 -(integer-expt -3 3) - @result{} -27 -@end lisp") + "Returns @var{n} raised to the non-negative integer exponent @var{k}.\n\n" + "Example:\n" + "@lisp\n" + "(integer-expt 2 5)\n" + " @result{} 32\n" + "(integer-expt -3 3)\n" + " @result{} -27\n" + "@end lisp") #define FUNC_NAME s_scm_integer_expt { SCM acc = SCM_MAKINUM (1L); @@ -689,13 +682,12 @@ Example: 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 - -Example: -@lisp -(number->string (ash #b1 3) 2) - @result{} "1000" + "Returns an integer equivalent to\n" + "@code{(inexact->exact (floor (* @var{int} (expt 2 @var{count}))))}.@refill\n\n" + "Example:\n" + "@lisp\n" + "(number->string (ash #b1 3) 2)\n" + " @result{} "1000" (number->string (ash #b1010 -1) 2) @result{} "101" @end lisp") @@ -732,17 +724,16 @@ Example: /* GJB:FIXME: do not use SCMs as integers! */ 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 -the 0-th bit in the result.@refill - -Example: -@lisp -(number->string (bit-extract #b1101101010 0 4) 2) - @result{} \"1010\" -(number->string (bit-extract #b1101101010 4 9) 2) - @result{} \"10110\" -@end lisp") + "Returns the integer composed of the @var{start} (inclusive) through\n" + "@var{end} (exclusive) bits of @var{n}. The @var{start}th bit becomes\n" + "the 0-th bit in the result.@refill\n\n" + "Example:\n" + "@lisp\n" + "(number->string (bit-extract #b1101101010 0 4) 2)\n" + " @result{} \"1010\"\n" + "(number->string (bit-extract #b1101101010 4 9) 2)\n" + " @result{} \"10110\"\n" + "@end lisp") #define FUNC_NAME s_scm_bit_extract { int istart, iend; @@ -770,20 +761,19 @@ static const char scm_logtab[] = { 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 -0-bits in its two's-complement binary representation are counted. If 0, -0 is returned. - -Example: -@lisp -(logcount #b10101010) - @result{} 4 -(logcount 0) - @result{} 0 -(logcount -2) - @result{} 1 -@end lisp") + "Returns the number of bits in integer @var{n}. If integer is positive,\n" + "the 1-bits in its binary representation are counted. If negative, the\n" + "0-bits in its two's-complement binary representation are counted. If 0,\n" + "0 is returned.\n\n" + "Example:\n" + "@lisp\n" + "(logcount #b10101010)\n" + " @result{} 4\n" + "(logcount 0)\n" + " @result{} 0\n" + "(logcount -2)\n" + " @result{} 1\n" + "@end lisp") #define FUNC_NAME s_scm_logcount { register unsigned long c = 0; @@ -820,17 +810,16 @@ static const char scm_ilentab[] = { SCM_DEFINE (scm_integer_length, "integer-length", 1, 0, 0, (SCM n), -"Returns the number of bits neccessary to represent @var{n}. - -Example: -@lisp -(integer-length #b10101010) - @result{} 8 -(integer-length 0) - @result{} 0 -(integer-length #b1111) - @result{} 4 -@end lisp") + "Returns the number of bits neccessary to represent @var{n}.\n\n" + "Example:\n" + "@lisp\n" + "(integer-length #b10101010)\n" + " @result{} 8\n" + "(integer-length 0)\n" + " @result{} 0\n" + "(integer-length #b1111)\n" + " @result{} 4\n" + "@end lisp") #define FUNC_NAME s_scm_integer_length { register unsigned long c = 0; @@ -1781,7 +1770,7 @@ big2str (SCM b, unsigned int radix) SCM_DEFINE (scm_number_to_string, "number->string", 1, 1, 0, (SCM x, SCM radix), -"") + "") #define FUNC_NAME s_scm_number_to_string { int base; @@ -2383,7 +2372,7 @@ scm_istring2number (char *str, long len, long radix) SCM_DEFINE (scm_string_to_number, "string->number", 1, 1, 0, (SCM str, SCM radix), -"") + "") #define FUNC_NAME s_scm_string_to_number { SCM answer; @@ -2467,7 +2456,7 @@ SCM_REGISTER_PROC (s_number_p, "number?", 1, 0, 0, scm_number_p); SCM_DEFINE (scm_number_p, "complex?", 1, 0, 0, (SCM x), -"") + "") #define FUNC_NAME s_scm_number_p { if (SCM_INUMP (x)) @@ -2493,7 +2482,7 @@ SCM_REGISTER_PROC (s_real_p, "real?", 1, 0, 0, scm_real_p); SCM_DEFINE (scm_real_p, "rational?", 1, 0, 0, (SCM x), -"") + "") #define FUNC_NAME s_scm_real_p { if (SCM_INUMP (x)) @@ -2514,7 +2503,7 @@ SCM_DEFINE (scm_real_p, "rational?", 1, 0, 0, SCM_DEFINE (scm_integer_p, "integer?", 1, 0, 0, (SCM x), -"") + "") #define FUNC_NAME s_scm_integer_p { double r; @@ -2543,7 +2532,7 @@ SCM_DEFINE (scm_integer_p, "integer?", 1, 0, 0, SCM_DEFINE (scm_inexact_p, "inexact?", 1, 0, 0, (SCM x), -"") + "") #define FUNC_NAME s_scm_inexact_p { #ifdef SCM_FLOATS @@ -2769,7 +2758,7 @@ scm_less_p (SCM x, SCM y) SCM_DEFINE1 (scm_gr_p, ">", scm_tc7_rpsubr, (SCM x, SCM y), -"") + "") #define FUNC_NAME s_scm_gr_p { return scm_less_p (y, x); @@ -2780,7 +2769,7 @@ SCM_DEFINE1 (scm_gr_p, ">", scm_tc7_rpsubr, SCM_DEFINE1 (scm_leq_p, "<=", scm_tc7_rpsubr, (SCM x, SCM y), -"") + "") #define FUNC_NAME s_scm_leq_p { return SCM_BOOL_NOT (scm_less_p (y, x)); @@ -2791,7 +2780,7 @@ SCM_DEFINE1 (scm_leq_p, "<=", scm_tc7_rpsubr, SCM_DEFINE1 (scm_geq_p, ">=", scm_tc7_rpsubr, (SCM x, SCM y), -"") + "") #define FUNC_NAME s_scm_geq_p { return SCM_BOOL_NOT (scm_less_p (x, y)); @@ -4169,7 +4158,7 @@ scm_two_doubles (SCM z1, SCM z2, const char *sstring, struct dpair *xy) SCM_DEFINE (scm_sys_expt, "$expt", 2, 0, 0, (SCM z1, SCM z2), -"") + "") #define FUNC_NAME s_scm_sys_expt { struct dpair xy; @@ -4182,7 +4171,7 @@ SCM_DEFINE (scm_sys_expt, "$expt", 2, 0, 0, SCM_DEFINE (scm_sys_atan2, "$atan2", 2, 0, 0, (SCM z1, SCM z2), -"") + "") #define FUNC_NAME s_scm_sys_atan2 { struct dpair xy; @@ -4195,7 +4184,7 @@ SCM_DEFINE (scm_sys_atan2, "$atan2", 2, 0, 0, SCM_DEFINE (scm_make_rectangular, "make-rectangular", 2, 0, 0, (SCM z1, SCM z2), -"") + "") #define FUNC_NAME s_scm_make_rectangular { struct dpair xy; @@ -4208,7 +4197,7 @@ SCM_DEFINE (scm_make_rectangular, "make-rectangular", 2, 0, 0, SCM_DEFINE (scm_make_polar, "make-polar", 2, 0, 0, (SCM z1, SCM z2), -"") + "") #define FUNC_NAME s_scm_make_polar { struct dpair xy; @@ -4346,7 +4335,7 @@ scm_angle (SCM z) SCM_DEFINE (scm_inexact_to_exact, "inexact->exact", 1, 0, 0, (SCM z), -"") + "") #define FUNC_NAME s_scm_inexact_to_exact { if (SCM_INUMP (z)) diff --git a/libguile/objprop.c b/libguile/objprop.c index b749e1e43..ac816845c 100644 --- a/libguile/objprop.c +++ b/libguile/objprop.c @@ -58,8 +58,8 @@ SCM_DEFINE (scm_object_properties, "object-properties", 1, 0, 0, (SCM obj), -"@deffnx primitive procedure-properties obj -Return @var{obj}'s property list.") + "@deffnx primitive procedure-properties obj\n" + "Return @var{obj}'s property list.") #define FUNC_NAME s_scm_object_properties { return scm_hashq_ref (scm_object_whash, obj, SCM_EOL); @@ -69,8 +69,8 @@ Return @var{obj}'s property list.") 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}.") + "@deffnx primitive set-procedure-properties! obj alist\n" + "Set @var{obj}'s property list to @var{alist}.") #define FUNC_NAME s_scm_set_object_properties_x { SCM handle = scm_hashq_create_handle_x (scm_object_whash, obj, plist); @@ -81,8 +81,8 @@ Set @var{obj}'s property list to @var{alist}.") 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}.") + "@deffnx primitive procedure-property obj key\n" + "Return the property of @var{obj} with name @var{key}.") #define FUNC_NAME s_scm_object_property { SCM assoc; @@ -93,9 +93,9 @@ Return the property of @var{obj} with name @var{key}.") 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 -@var{value}.") + "@deffnx primitive set-procedure-property! obj key value\n" + "In @var{obj}'s property list, set the property named @var{key} to\n" + "@var{value}.") #define FUNC_NAME s_scm_set_object_property_x { SCM h; diff --git a/libguile/ports.c b/libguile/ports.c index 62edccc26..9a4110131 100644 --- a/libguile/ports.c +++ b/libguile/ports.c @@ -214,7 +214,7 @@ scm_set_port_input_waiting (long tc, int (*input_waiting) (SCM)) SCM_DEFINE (scm_char_ready_p, "char-ready?", 0, 1, 0, (SCM port), -"") + "") #define FUNC_NAME s_scm_char_ready_p { scm_port *pt; @@ -248,8 +248,8 @@ SCM_DEFINE (scm_char_ready_p, "char-ready?", 0, 1, 0, /* Clear a port's read buffers, returning the contents. */ 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.") + "Drains @var{PORT}'s read buffers (including any pushed-back characters)\n" + "and returns the contents as a single string.") #define FUNC_NAME s_scm_drain_input { SCM result; @@ -284,7 +284,7 @@ and returns the contents as a single string.") SCM_DEFINE (scm_current_input_port, "current-input-port", 0, 0, 0, (), -"") + "") #define FUNC_NAME s_scm_current_input_port { return scm_cur_inp; @@ -293,7 +293,7 @@ SCM_DEFINE (scm_current_input_port, "current-input-port", 0, 0, 0, SCM_DEFINE (scm_current_output_port, "current-output-port", 0, 0, 0, (), -"") + "") #define FUNC_NAME s_scm_current_output_port { return scm_cur_outp; @@ -302,8 +302,8 @@ SCM_DEFINE (scm_current_output_port, "current-output-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).") + "Return the port to which errors and warnings should be sent (the\n" + "@dfn{standard error} in Unix and C terminology).") #define FUNC_NAME s_scm_current_error_port { return scm_cur_errp; @@ -312,7 +312,7 @@ SCM_DEFINE (scm_current_error_port, "current-error-port", 0, 0, 0, SCM_DEFINE (scm_current_load_port, "current-load-port", 0, 0, 0, (), -"") + "") #define FUNC_NAME s_scm_current_load_port { return scm_cur_loadp; @@ -321,11 +321,11 @@ SCM_DEFINE (scm_current_load_port, "current-load-port", 0, 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 -Change the ports returned by @code{current-input-port}, -@code{current-output-port} and @code{current-error-port}, respectively, -so that they use the supplied @var{port} for input or output.") + "@deffnx primitive set-current-output-port port\n" + "@deffnx primitive set-current-error-port port\n" + "Change the ports returned by @code{current-input-port},\n" + "@code{current-output-port} and @code{current-error-port}, respectively,\n" + "so that they use the supplied @var{port} for input or output.") #define FUNC_NAME s_scm_set_current_input_port { SCM oinp = scm_cur_inp; @@ -338,7 +338,7 @@ so that they use the supplied @var{port} for input or output.") 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 { SCM ooutp = scm_cur_outp; @@ -352,7 +352,7 @@ SCM_DEFINE (scm_set_current_output_port, "set-current-output-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 { SCM oerrp = scm_cur_errp; @@ -440,7 +440,7 @@ scm_remove_from_port_table (SCM port) SCM_DEFINE (scm_pt_size, "pt-size", 0, 0, 0, (), -"") + "") #define FUNC_NAME s_scm_pt_size { return SCM_MAKINUM (scm_port_table_size); @@ -450,7 +450,7 @@ SCM_DEFINE (scm_pt_size, "pt-size", 0, 0, 0, /* Return the ith member of the port table. */ SCM_DEFINE (scm_pt_member, "pt-member", 1, 0, 0, (SCM member), -"") + "") #define FUNC_NAME s_scm_pt_member { int i; @@ -483,7 +483,7 @@ scm_revealed_count (SCM port) SCM_DEFINE (scm_port_revealed, "port-revealed", 1, 0, 0, (SCM port), -"Returns the revealed count for @var{port}.") + "Returns the revealed count for @var{port}.") #define FUNC_NAME s_scm_port_revealed { port = SCM_COERCE_OUTPORT (port); @@ -495,8 +495,8 @@ SCM_DEFINE (scm_port_revealed, "port-revealed", 1, 0, 0, /* Set the revealed count for a port. */ 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.") + "Sets the revealed count for a port to a given value. \n" + "The return value is unspecified.") #define FUNC_NAME s_scm_set_port_revealed_x { port = SCM_COERCE_OUTPORT (port); @@ -536,10 +536,10 @@ scm_mode_bits (char *modes) 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 -opened, since modes such as \"append\" which are used only during -port creation are not retained.") + "Returns the port modes associated with the open port @var{port}. These\n" + "will not necessarily be identical to the modes used when the port was\n" + "opened, since modes such as \"append\" which are used only during\n" + "port creation are not retained.") #define FUNC_NAME s_scm_port_mode { char modes[3]; @@ -571,12 +571,12 @@ port creation are not retained.") */ 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 -closed. An exception may be raised if an error occurs, for example -when flushing buffered output. -See also @ref{Ports and File Descriptors, close}, for a procedure -which can close file descriptors.") + "Close the specified port object. Returns @code{#t} if it successfully\n" + "closes a port or @code{#f} if it was already\n" + "closed. An exception may be raised if an error occurs, for example\n" + "when flushing buffered output.\n" + "See also @ref{Ports and File Descriptors, close}, for a procedure\n" + "which can close file descriptors.") #define FUNC_NAME s_scm_close_port { scm_sizet i; @@ -600,13 +600,13 @@ which can close file descriptors.") 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 -is intended to be used before an exec call to close file descriptors -which are not needed in the new process.Close all open file ports used by the interpreter -except for those supplied as arguments. This procedure -is intended to be used before an exec call to close file descriptors -which are not needed in the new process.") + "Close all open file ports used by the interpreter\n" + "except for those supplied as arguments. This procedure\n" + "is intended to be used before an exec call to close file descriptors\n" + "which are not needed in the new process.Close all open file ports used by the interpreter\n" + "except for those supplied as arguments. This procedure\n" + "is intended to be used before an exec call to close file descriptors\n" + "which are not needed in the new process.") #define FUNC_NAME s_scm_close_all_ports_except { int i = 0; @@ -642,7 +642,7 @@ which are not needed in the new process.") SCM_DEFINE (scm_input_port_p, "input-port?", 1, 0, 0, (SCM x), -"") + "") #define FUNC_NAME s_scm_input_port_p { if (SCM_IMP (x)) @@ -653,7 +653,7 @@ SCM_DEFINE (scm_input_port_p, "input-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 { if (SCM_IMP (x)) @@ -666,7 +666,7 @@ SCM_DEFINE (scm_output_port_p, "output-port?", 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.") + "Returns @code{#t} if @var{port} is closed or @code{#f} if it is open.") #define FUNC_NAME s_scm_port_closed_p { SCM_VALIDATE_PORT (1,port); @@ -676,7 +676,7 @@ SCM_DEFINE (scm_port_closed_p, "port-closed?", 1, 0, 0, SCM_DEFINE (scm_eof_object_p, "eof-object?", 1, 0, 0, (SCM x), -"") + "") #define FUNC_NAME s_scm_eof_object_p { return SCM_BOOL(SCM_EOF_OBJECT_P (x)); @@ -685,13 +685,12 @@ SCM_DEFINE (scm_eof_object_p, "eof-object?", 1, 0, 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 -underlying port implementation (e.g., in the case of fports, the -data will be written to the file and the output buffer will be cleared.) -It has no effect on an unbuffered port. - -The return value is unspecified.") + "Flush the specified output port, or the current output port if @var{port}\n" + "is omitted. The current output buffer contents are passed to the \n" + "underlying port implementation (e.g., in the case of fports, the\n" + "data will be written to the file and the output buffer will be cleared.)\n" + "It has no effect on an unbuffered port.\n\n" + "The return value is unspecified.") #define FUNC_NAME s_scm_force_output { if (SCM_UNBNDP (port)) @@ -708,8 +707,8 @@ The return value is unspecified.") 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.") + "Equivalent to calling @code{force-output} on\n" + "all open output ports. The return value is unspecified.") #define FUNC_NAME s_scm_flush_all_ports { int i; @@ -725,7 +724,7 @@ all open output ports. The return value is unspecified.") SCM_DEFINE (scm_read_char, "read-char", 0, 1, 0, (SCM port), -"") + "") #define FUNC_NAME s_scm_read_char { int c; @@ -947,7 +946,7 @@ scm_ungets (const char *s, int n, SCM port) SCM_DEFINE (scm_peek_char, "peek-char", 0, 1, 0, (SCM port), -"") + "") #define FUNC_NAME s_scm_peek_char { int c; @@ -965,10 +964,10 @@ SCM_DEFINE (scm_peek_char, "peek-char", 0, 1, 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 -will be read again in last-in first-out order. If @var{port} is -not supplied, the current input port is used.") + "Place @var{char} in @var{port} so that it will be read by the\n" + "next read operation. If called multiple times, the unread characters\n" + "will be read again in last-in first-out order. If @var{port} is\n" + "not supplied, the current input port is used.") #define FUNC_NAME s_scm_unread_char { int c; @@ -988,10 +987,10 @@ not supplied, the current input port is used.") 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 -unread characters will be read again in last-in first-out order. If -@var{port} is not supplied, the current-input-port is used.") + "Place the string @var{str} in @var{port} so that its characters will be\n" + "read in subsequent read operations. If called multiple times, the\n" + "unread characters will be read again in last-in first-out order. If\n" + "@var{port} is not supplied, the current-input-port is used.") #define FUNC_NAME s_scm_unread_string { SCM_VALIDATE_STRING (1,str); @@ -1008,29 +1007,26 @@ unread characters will be read again in last-in first-out order. If 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}. - -One of the following variables should be supplied -for @var{whence}: -@defvar SEEK_SET -Seek from the beginning of the file. -@end defvar -@defvar SEEK_CUR -Seek from the current position. -@end defvar -@defvar SEEK_END -Seek from the end of the file. -@end defvar - -If @var{fd/port} is a file descriptor, the underlying system call is -@code{lseek}. @var{port} may be a string port. - -The value returned is the new position in the file. This means that -the current position of a port can be obtained using: -@smalllisp -(seek port 0 SEEK_CUR) -@end smalllisp") + "Sets the current position of @var{fd/port} to the integer @var{offset},\n" + "which is interpreted according to the value of @var{whence}.\n\n" + "One of the following variables should be supplied\n" + "for @var{whence}:\n" + "@defvar SEEK_SET\n" + "Seek from the beginning of the file.\n" + "@end defvar\n" + "@defvar SEEK_CUR\n" + "Seek from the current position.\n" + "@end defvar\n" + "@defvar SEEK_END\n" + "Seek from the end of the file.\n" + "@end defvar\n\n" + "If @var{fd/port} is a file descriptor, the underlying system call is\n" + "@code{lseek}. @var{port} may be a string port.\n\n" + "The value returned is the new position in the file. This means that\n" + "the current position of a port can be obtained using:\n" + "@smalllisp\n" + "(seek port 0 SEEK_CUR)\n" + "@end smalllisp") #define FUNC_NAME s_scm_seek { off_t off; @@ -1066,13 +1062,12 @@ the current position of a port can be obtained using: 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 -descriptor or a port. @var{size} may be omitted if @var{obj} is not -a file name, in which case the truncation occurs at the current port. -position. - -The return value is unspecified.") + "Truncates the object referred to by @var{obj} to at most @var{size} bytes.\n" + "@var{obj} can be a string containing a file name or an integer file\n" + "descriptor or a port. @var{size} may be omitted if @var{obj} is not\n" + "a file name, in which case the truncation occurs at the current port.\n" + "position.\n\n" + "The return value is unspecified.") #define FUNC_NAME s_scm_truncate_file { int rv; @@ -1126,7 +1121,7 @@ The return value is unspecified.") SCM_DEFINE (scm_port_line, "port-line", 1, 0, 0, (SCM port), -"") + "") #define FUNC_NAME s_scm_port_line { port = SCM_COERCE_OUTPORT (port); @@ -1137,7 +1132,7 @@ SCM_DEFINE (scm_port_line, "port-line", 1, 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 { port = SCM_COERCE_OUTPORT (port); @@ -1149,15 +1144,15 @@ SCM_DEFINE (scm_set_port_line_x, "set-port-line!", 2, 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}, -using the current input port if none is specified. If the number is -unknown, the result is #f. Otherwise, the result is a 0-origin integer -- i.e. the first character of the first line is line 0, column 0. -(However, when you display a file position, for example in an error -message, we recommand you add 1 to get 1-origin integers. This is -because lines and column numbers traditionally start with 1, and that is -what non-programmers will find most natural.)") + "@deffnx primitive port-line [input-port]\n" + "Return the current column number or line number of @var{input-port},\n" + "using the current input port if none is specified. If the number is\n" + "unknown, the result is #f. Otherwise, the result is a 0-origin integer\n" + "- i.e. the first character of the first line is line 0, column 0.\n" + "(However, when you display a file position, for example in an error\n" + "message, we recommand you add 1 to get 1-origin integers. This is\n" + "because lines and column numbers traditionally start with 1, and that is\n" + "what non-programmers will find most natural.)") #define FUNC_NAME s_scm_port_column { port = SCM_COERCE_OUTPORT (port); @@ -1168,9 +1163,9 @@ what non-programmers will find most natural.)") 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 -current input port if none is specified.") + "@deffnx primitive set-port-line! [input-port] line\n" + "Set the current column or line number of @var{input-port}, using the\n" + "current input port if none is specified.") #define FUNC_NAME s_scm_set_port_column_x { port = SCM_COERCE_OUTPORT (port); @@ -1182,8 +1177,8 @@ current input port if none is specified.") 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" + "Return the filename associated with @var{port}. This function returns\n" + "the strings "standard input", "standard output" and "standard error" when called on the current input, output and error ports respectively.") #define FUNC_NAME s_scm_port_filename { @@ -1195,10 +1190,10 @@ when called on the current input, output and error ports respectively.") 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 -source of data, but only the value that is returned by -@code{port-filename} and reported in diagnostic output.") + "Change the filename associated with @var{port}, using the current input\n" + "port if none is specified. Note that this does not change the port's\n" + "source of data, but only the value that is returned by\n" + "@code{port-filename} and reported in diagnostic output.") #define FUNC_NAME s_scm_set_port_filename_x { port = SCM_COERCE_OUTPORT (port); @@ -1303,9 +1298,9 @@ scm_void_port (char *mode_str) 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 -documentation for @code{open-file} in @ref{File Ports}.") + "Create and return a new void port. The @var{mode} argument describes\n" + "the input/output modes for this port; for a description, see the\n" + "documentation for @code{open-file} in @ref{File Ports}.") #define FUNC_NAME s_scm_sys_make_void_port { SCM_VALIDATE_ROSTRING (1,mode); diff --git a/libguile/posix.c b/libguile/posix.c index 3efc6aa02..2ec1fde53 100644 --- a/libguile/posix.c +++ b/libguile/posix.c @@ -168,13 +168,13 @@ SCM_SYMBOL (sym_write_pipe, "write pipe"); 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 -output port. Data written to the output port can be read from the -input port. Note that both ports are buffered so it may be necessary -to flush the output port before data will actually be sent across the pipe. -Alternatively a buffer can be added to the port using @code{setvbuf} -(see below).") + "Creates a pipe which can be used for communication. The return value\n" + "is a pair in which the CAR contains an input port and the CDR an\n" + "output port. Data written to the output port can be read from the\n" + "input port. Note that both ports are buffered so it may be necessary\n" + "to flush the output port before data will actually be sent across the pipe.\n" + "Alternatively a buffer can be added to the port using @code{setvbuf}\n" + "(see below).") #define FUNC_NAME s_scm_pipe { int fd[2], rv; @@ -194,7 +194,7 @@ Alternatively a buffer can be added to the port using @code{setvbuf} #ifdef HAVE_GETGROUPS SCM_DEFINE (scm_getgroups, "getgroups", 0, 0, 0, (), -"Returns a vector of integers representing the current supplimentary group IDs.") + "Returns a vector of integers representing the current supplimentary group IDs.") #define FUNC_NAME s_scm_getgroups { SCM grps, ans; @@ -231,9 +231,9 @@ SCM_DEFINE (scm_getgroups, "getgroups", 0, 0, 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 -or getpwent respectively.") + "Look up an entry in the user database. @var{obj} can be an integer,\n" + "a string, or omitted, giving the behaviour of getpwuid, getpwnam\n" + "or getpwent respectively.") #define FUNC_NAME s_scm_getpwuid { SCM result; @@ -285,9 +285,9 @@ or getpwent respectively.") #ifdef HAVE_SETPWENT 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 -@code{endpwent} procedures are implemented on top of this.") + "If called with a true argument, initialize or reset the password data\n" + "stream. Otherwise, close the stream. The @code{setpwent} and\n" + "@code{endpwent} procedures are implemented on top of this.") #define FUNC_NAME s_scm_setpwent { if (SCM_UNBNDP (arg) || SCM_FALSEP (arg)) @@ -304,9 +304,9 @@ stream. Otherwise, close the stream. The @code{setpwent} and /* Combines getgrgid and getgrnam. */ 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 -or getgrent respectively.") + "Look up an entry in the group database. @var{obj} can be an integer,\n" + "a string, or omitted, giving the behaviour of getgrgid, getgrnam\n" + "or getgrent respectively.") #define FUNC_NAME s_scm_getgrgid { SCM result; @@ -345,9 +345,9 @@ or getgrent respectively.") 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 -@code{endgrent} procedures are implemented on top of this.") + "If called with a true argument, initialize or reset the group data\n" + "stream. Otherwise, close the stream. The @code{setgrent} and\n" + "@code{endgrent} procedures are implemented on top of this.") #define FUNC_NAME s_scm_setgrent { if (SCM_UNBNDP (arg) || SCM_FALSEP (arg)) @@ -362,33 +362,28 @@ stream. Otherwise, close the stream. The @code{setgrent} and SCM_DEFINE (scm_kill, "kill", 2, 0, 0, (SCM pid, SCM sig), -"Sends a signal to the specified process or group of processes. - -@var{pid} specifies the processes to which the signal is sent: - -@table @r -@item @var{pid} greater than 0 -The process whose identifier is @var{pid}. -@item @var{pid} equal to 0 -All processes in the current process group. -@item @var{pid} less than -1 -The process group whose identifier is -@var{pid} -@item @var{pid} equal to -1 -If the process is privileged, all processes except for some special -system processes. Otherwise, all processes with the current effective -user ID. -@end table - -@var{sig} should be specified using a variable corresponding to -the Unix symbolic name, e.g., - -@defvar SIGHUP -Hang-up signal. -@end defvar - -@defvar SIGINT -Interrupt signal. -@end defvar") + "Sends a signal to the specified process or group of processes.\n\n" + "@var{pid} specifies the processes to which the signal is sent:\n\n" + "@table @r\n" + "@item @var{pid} greater than 0\n" + "The process whose identifier is @var{pid}.\n" + "@item @var{pid} equal to 0\n" + "All processes in the current process group.\n" + "@item @var{pid} less than -1\n" + "The process group whose identifier is -@var{pid}\n" + "@item @var{pid} equal to -1\n" + "If the process is privileged, all processes except for some special\n" + "system processes. Otherwise, all processes with the current effective\n" + "user ID.\n" + "@end table\n\n" + "@var{sig} should be specified using a variable corresponding to\n" + "the Unix symbolic name, e.g.,\n\n" + "@defvar SIGHUP\n" + "Hang-up signal.\n" + "@end defvar\n\n" + "@defvar SIGINT\n" + "Interrupt signal.\n" + "@end defvar") #define FUNC_NAME s_scm_kill { SCM_VALIDATE_INUM (1,pid); @@ -403,47 +398,40 @@ Interrupt signal. #ifdef HAVE_WAITPID 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 -suspend the calling process until this can be done. If more than one -child process is eligible then one will be chosen by the operating system. - -The value of @var{pid} determines the behaviour: - -@table @r -@item @var{pid} greater than 0 -Request status information from the specified child process. -@item @var{pid} equal to -1 or WAIT_ANY -Request status information for any child process. -@item @var{pid} equal to 0 or WAIT_MYPGRP -Request status information for any child process in the current process -group. -@item @var{pid} less than -1 -Request status information for any child process whose process group ID -is -@var{PID}. -@end table - -The @var{options} argument, if supplied, should be the bitwise OR of the -values of zero or more of the following variables: - -@defvar WNOHANG -Return immediately even if there are no child processes to be collected. -@end defvar - -@defvar WUNTRACED -Report status information for stopped processes as well as terminated -processes. -@end defvar - -The return value is a pair containing: - -@enumerate -@item -The process ID of the child process, or 0 if @code{WNOHANG} was -specified and no process was collected. -@item -The integer status value. -@end enumerate") + "This procedure collects status information from a child process which\n" + "has terminated or (optionally) stopped. Normally it will\n" + "suspend the calling process until this can be done. If more than one\n" + "child process is eligible then one will be chosen by the operating system.\n\n" + "The value of @var{pid} determines the behaviour:\n\n" + "@table @r\n" + "@item @var{pid} greater than 0\n" + "Request status information from the specified child process.\n" + "@item @var{pid} equal to -1 or WAIT_ANY\n" + "Request status information for any child process.\n" + "@item @var{pid} equal to 0 or WAIT_MYPGRP\n" + "Request status information for any child process in the current process\n" + "group.\n" + "@item @var{pid} less than -1\n" + "Request status information for any child process whose process group ID\n" + "is -@var{PID}.\n" + "@end table\n\n" + "The @var{options} argument, if supplied, should be the bitwise OR of the\n" + "values of zero or more of the following variables:\n\n" + "@defvar WNOHANG\n" + "Return immediately even if there are no child processes to be collected.\n" + "@end defvar\n\n" + "@defvar WUNTRACED\n" + "Report status information for stopped processes as well as terminated\n" + "processes.\n" + "@end defvar\n\n" + "The return value is a pair containing:\n\n" + "@enumerate\n" + "@item\n" + "The process ID of the child process, or 0 if @code{WNOHANG} was\n" + "specified and no process was collected.\n" + "@item\n" + "The integer status value.\n" + "@end enumerate") #define FUNC_NAME s_scm_waitpid { int i; @@ -468,9 +456,9 @@ The integer status value. 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 -call to @code{exit} or @code{_exit}, if any, otherwise @code{#f}.") + "Returns the exit status value, as would be\n" + "set if a process ended normally through a\n" + "call to @code{exit} or @code{_exit}, if any, otherwise @code{#f}.") #define FUNC_NAME s_scm_status_exit_val { int lstatus; @@ -489,8 +477,8 @@ call to @code{exit} or @code{_exit}, if any, otherwise @code{#f}.") 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}.") + "Returns the signal number which terminated the\n" + "process, if any, otherwise @code{#f}.") #define FUNC_NAME s_scm_status_term_sig { int lstatus; @@ -507,8 +495,8 @@ process, if any, otherwise @code{#f}.") 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}.") + "Returns the signal number which stopped the\n" + "process, if any, otherwise @code{#f}.") #define FUNC_NAME s_scm_status_stop_sig { int lstatus; @@ -525,7 +513,7 @@ process, if any, otherwise @code{#f}.") SCM_DEFINE (scm_getppid, "getppid", 0, 0, 0, (), -"Returns an integer representing the process ID of the parent process.") + "Returns an integer representing the process ID of the parent process.") #define FUNC_NAME s_scm_getppid { return SCM_MAKINUM (0L + getppid ()); @@ -536,7 +524,7 @@ SCM_DEFINE (scm_getppid, "getppid", 0, 0, 0, SCM_DEFINE (scm_getuid, "getuid", 0, 0, 0, (), -"Returns an integer representing the current real user ID.") + "Returns an integer representing the current real user ID.") #define FUNC_NAME s_scm_getuid { return SCM_MAKINUM (0L + getuid ()); @@ -547,7 +535,7 @@ SCM_DEFINE (scm_getuid, "getuid", 0, 0, 0, SCM_DEFINE (scm_getgid, "getgid", 0, 0, 0, (), -"Returns an integer representing the current real group ID.") + "Returns an integer representing the current real group ID.") #define FUNC_NAME s_scm_getgid { return SCM_MAKINUM (0L + getgid ()); @@ -558,10 +546,10 @@ SCM_DEFINE (scm_getgid, "getgid", 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 -is returned. @code{(feature? 'EIDs)} reports whether the system -supports effective IDs.") + "Returns an integer representing the current effective user ID.\n" + "If the system does not support effective IDs, then the real ID\n" + "is returned. @code{(feature? 'EIDs)} reports whether the system\n" + "supports effective IDs.") #define FUNC_NAME s_scm_geteuid { #ifdef HAVE_GETEUID @@ -576,10 +564,10 @@ supports effective IDs.") 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 -is returned. @code{(feature? 'EIDs)} reports whether the system -supports effective IDs.") + "Returns an integer representing the current effective group ID.\n" + "If the system does not support effective IDs, then the real ID\n" + "is returned. @code{(feature? 'EIDs)} reports whether the system\n" + "supports effective IDs.") #define FUNC_NAME s_scm_getegid { #ifdef HAVE_GETEUID @@ -593,9 +581,9 @@ supports effective IDs.") 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. -The return value is unspecified.") + "Sets both the real and effective user IDs to the integer @var{id}, provided\n" + "the process has appropriate privileges.\n" + "The return value is unspecified.") #define FUNC_NAME s_scm_setuid { SCM_VALIDATE_INUM (1,id); @@ -607,9 +595,9 @@ The return value is unspecified.") 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. -The return value is unspecified.") + "Sets both the real and effective group IDs to the integer @var{id}, provided\n" + "the process has appropriate privileges.\n" + "The return value is unspecified.") #define FUNC_NAME s_scm_setgid { SCM_VALIDATE_INUM (1,id); @@ -621,11 +609,11 @@ The return value is unspecified.") 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 -real ID is set instead -- @code{(feature? 'EIDs)} reports whether the -system supports effective IDs. -The return value is unspecified.") + "Sets the effective user ID to the integer @var{id}, provided the process\n" + "has appropriate privileges. If effective IDs are not supported, the\n" + "real ID is set instead -- @code{(feature? 'EIDs)} reports whether the\n" + "system supports effective IDs.\n" + "The return value is unspecified.") #define FUNC_NAME s_scm_seteuid { int rv; @@ -645,11 +633,11 @@ The return value is unspecified.") #ifdef HAVE_SETEGID 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 -real ID is set instead -- @code{(feature? 'EIDs)} reports whether the -system supports effective IDs. -The return value is unspecified.") + "Sets the effective group ID to the integer @var{id}, provided the process\n" + "has appropriate privileges. If effective IDs are not supported, the\n" + "real ID is set instead -- @code{(feature? 'EIDs)} reports whether the\n" + "system supports effective IDs.\n" + "The return value is unspecified.") #define FUNC_NAME s_scm_setegid { int rv; @@ -670,8 +658,8 @@ The return value is unspecified.") SCM_DEFINE (scm_getpgrp, "getpgrp", 0, 0, 0, (), -"Returns an integer representing the current process group ID. -This is the POSIX definition, not BSD.") + "Returns an integer representing the current process group ID.\n" + "This is the POSIX definition, not BSD.") #define FUNC_NAME s_scm_getpgrp { int (*fn)(); @@ -683,11 +671,11 @@ This is the POSIX definition, not BSD.") #ifdef HAVE_SETPGID 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 -current process. -Fails on systems that do not support job control. -The return value is unspecified.") + "Move the process @var{pid} into the process group @var{pgid}. @var{pid} or\n" + "@var{pgid} must be integers: they can be zero to indicate the ID of the\n" + "current process.\n" + "Fails on systems that do not support job control.\n" + "The return value is unspecified.") #define FUNC_NAME s_scm_setpgid { SCM_VALIDATE_INUM (1,pid); @@ -703,10 +691,10 @@ The return value is unspecified.") #ifdef HAVE_SETSID 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 -from its controlling terminal if it has one. -The return value is an integer representing the new process group ID.") + "Creates a new session. The current process becomes the session leader\n" + "and is put in a new process group. The process will be detached\n" + "from its controlling terminal if it has one.\n" + "The return value is an integer representing the new process group ID.") #define FUNC_NAME s_scm_setsid { pid_t sid = setsid (); @@ -719,8 +707,8 @@ The return value is an integer representing the new process group ID.") SCM_DEFINE (scm_ttyname, "ttyname", 1, 0, 0, (SCM port), -"Returns a string with the name of the serial terminal device underlying -@var{port}.") + "Returns a string with the name of the serial terminal device underlying\n" + "@var{port}.") #define FUNC_NAME s_scm_ttyname { char *ans; @@ -742,8 +730,8 @@ SCM_DEFINE (scm_ttyname, "ttyname", 1, 0, 0, #ifdef HAVE_CTERMID SCM_DEFINE (scm_ctermid, "ctermid", 0, 0, 0, (), -"Returns a string containing the file name of the controlling terminal -for the current process.") + "Returns a string containing the file name of the controlling terminal\n" + "for the current process.") #define FUNC_NAME s_scm_ctermid { char *result = ctermid (NULL); @@ -757,16 +745,15 @@ for the current process.") #ifdef HAVE_TCGETPGRP 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 -underlying @var{port}. - -If there is no foreground process group, the return value is a -number greater than 1 that does not match the process group ID -of any existing process group. This can happen if all of the -processes in the job that was formerly the foreground job have -terminated, and no other job has yet been moved into the -foreground.") + "Returns the process group ID of the foreground\n" + "process group associated with the terminal open on the file descriptor\n" + "underlying @var{port}.\n\n" + "If there is no foreground process group, the return value is a\n" + "number greater than 1 that does not match the process group ID\n" + "of any existing process group. This can happen if all of the\n" + "processes in the job that was formerly the foreground job have\n" + "terminated, and no other job has yet been moved into the\n" + "foreground.") #define FUNC_NAME s_scm_tcgetpgrp { int fd; @@ -786,11 +773,11 @@ foreground.") #ifdef HAVE_TCSETPGRP 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}. -The calling process -must be a member of the same session as @var{pgid} and must have the same -controlling terminal. The return value is unspecified.") + "Set the foreground process group ID for the terminal used by the file\n" + "descriptor underlying @var{port} to the integer @var{pgid}.\n" + "The calling process\n" + "must be a member of the same session as @var{pgid} and must have the same\n" + "controlling terminal. The return value is unspecified.") #define FUNC_NAME s_scm_tcsetpgrp { int fd; @@ -842,17 +829,15 @@ scm_convert_exec_args (SCM args, int pos, const char *subr) 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 -they are accessable as the @code{argv} argument to @code{main}. -Conventionally the first @var{arg} is the same as @var{path}. -All arguments must be strings. - -If @var{arg} is missing, @var{path} is executed with a null -argument list, which may have system-dependent side-effects. - -This procedure is currently implemented using the @code{execv} system -call, but we call it @code{execl} because of its Scheme calling interface.") + "Executes the file named by @var{path} as a new process image.\n" + "The remaining arguments are supplied to the process; from a C program\n" + "they are accessable as the @code{argv} argument to @code{main}.\n" + "Conventionally the first @var{arg} is the same as @var{path}.\n" + "All arguments must be strings. \n\n" + "If @var{arg} is missing, @var{path} is executed with a null\n" + "argument list, which may have system-dependent side-effects.\n\n" + "This procedure is currently implemented using the @code{execv} system\n" + "call, but we call it @code{execl} because of its Scheme calling interface.") #define FUNC_NAME s_scm_execl { char **execargv; @@ -868,13 +853,12 @@ call, but we call it @code{execl} because of its Scheme calling interface.") 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 -then the file to execute will be located by searching the -directories listed in the @code{PATH} environment variable. - -This procedure is currently implemented using the @code{execlv} system -call, but we call it @code{execlp} because of its Scheme calling interface.") + "Similar to @code{execl}, however if\n" + "@var{filename} does not contain a slash\n" + "then the file to execute will be located by searching the\n" + "directories listed in the @code{PATH} environment variable.\n\n" + "This procedure is currently implemented using the @code{execlv} system\n" + "call, but we call it @code{execlp} because of its Scheme calling interface.") #define FUNC_NAME s_scm_execlp { char **execargv; @@ -924,12 +908,11 @@ environ_list_to_c (SCM envlist, int arg, const char *proc) 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 -@code{environ} procedure. - -This procedure is currently implemented using the @code{execve} system -call, but we call it @code{execle} because of its Scheme calling interface.") + "Similar to @code{execl}, but the environment of the new process is\n" + "specified by @var{env}, which must be a list of strings as returned by the\n" + "@code{environ} procedure.\n\n" + "This procedure is currently implemented using the @code{execve} system\n" + "call, but we call it @code{execle} because of its Scheme calling interface.") #define FUNC_NAME s_scm_execle { char **execargv; @@ -949,12 +932,11 @@ call, but we call it @code{execle} because of its Scheme calling interface.") 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 -the integer process ID of the child. - -This procedure has been renamed from @code{fork} to avoid a naming conflict -with the scsh fork.") + "Creates a new \"child\" process by duplicating the current \"parent\" process.\n" + "In the child the return value is 0. In the parent the return value is\n" + "the integer process ID of the child.\n\n" + "This procedure has been renamed from @code{fork} to avoid a naming conflict\n" + "with the scsh fork.") #define FUNC_NAME s_scm_fork { int pid; @@ -968,8 +950,8 @@ with the scsh fork.") #ifdef HAVE_UNAME SCM_DEFINE (scm_uname, "uname", 0, 0, 0, (), -"Returns an object with some information about the computer system the -program is running on.") + "Returns an object with some information about the computer system the\n" + "program is running on.") #define FUNC_NAME s_scm_uname { struct utsname buf; @@ -993,12 +975,12 @@ program is running on.") 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 -default environment for child processes, to the supplied list of strings. -Each member of @var{env} should be of the form -@code{NAME=VALUE} and values of @code{NAME} should not be duplicated. -If @var{env} is supplied then the return value is unspecified.") + "If @var{env} is omitted, returns the current environment as a list of strings.\n" + "Otherwise it sets the current environment, which is also the\n" + "default environment for child processes, to the supplied list of strings.\n" + "Each member of @var{env} should be of the form\n" + "@code{NAME=VALUE} and values of @code{NAME} should not be duplicated.\n" + "If @var{env} is supplied then the return value is unspecified.") #define FUNC_NAME s_scm_environ { if (SCM_UNBNDP (env)) @@ -1032,9 +1014,9 @@ If @var{env} is supplied then the return value is unspecified.") 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 -the @code{tmpnam} function in the system libraries.") + "Create a new file in the file system with a unique name. The return\n" + "value is the name of the new file. This function is implemented with\n" + "the @code{tmpnam} function in the system libraries.") #define FUNC_NAME s_scm_tmpnam { char name[L_tmpnam]; @@ -1047,21 +1029,18 @@ the @code{tmpnam} function in the system libraries.") 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} -is not supplied, then the current time is used. -@var{actime} and @var{modtime} -must be integer time values as returned by the @code{current-time} -procedure. - -E.g., - -@smalllisp -(utime \"foo\" (- (current-time) 3600)) -@end smalllisp - -will set the access time to one hour in the past and the modification -time to the current time.") + "@code{utime} sets the access and modification times for\n" + "the file named by @var{path}. If @var{actime} or @var{modtime}\n" + "is not supplied, then the current time is used.\n" + "@var{actime} and @var{modtime}\n" + "must be integer time values as returned by the @code{current-time}\n" + "procedure.\n\n" + "E.g.,\n\n" + "@smalllisp\n" + "(utime \"foo\" (- (current-time) 3600))\n" + "@end smalllisp\n\n" + "will set the access time to one hour in the past and the modification\n" + "time to the current time.") #define FUNC_NAME s_scm_utime { int rv; @@ -1088,31 +1067,29 @@ time to the current time.") 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 -has the type of access specified by @var{how}, otherwise -@code{#f}. -@var{how} should be specified -using the values of the variables listed below. Multiple values can -be combined using a bitwise or, in which case @code{#t} will only -be returned if all accesses are granted. - -Permissions are checked using the real id of the current process, -not the effective id, although it's the effective id which determines -whether the access would actually be granted. - -@defvar R_OK -test for read permission. -@end defvar -@defvar W_OK -test for write permission. -@end defvar -@defvar X_OK -test for execute permission. -@end defvar -@defvar F_OK -test for existence of the file. -@end defvar") + "Returns @code{#t} if @var{path} corresponds to an existing\n" + "file and the current process\n" + "has the type of access specified by @var{how}, otherwise \n" + "@code{#f}.\n" + "@var{how} should be specified\n" + "using the values of the variables listed below. Multiple values can\n" + "be combined using a bitwise or, in which case @code{#t} will only\n" + "be returned if all accesses are granted.\n\n" + "Permissions are checked using the real id of the current process,\n" + "not the effective id, although it's the effective id which determines\n" + "whether the access would actually be granted.\n\n" + "@defvar R_OK\n" + "test for read permission.\n" + "@end defvar\n" + "@defvar W_OK\n" + "test for write permission.\n" + "@end defvar\n" + "@defvar X_OK\n" + "test for execute permission.\n" + "@end defvar\n" + "@defvar F_OK\n" + "test for existence of the file.\n" + "@end defvar") #define FUNC_NAME s_scm_access { int rv; @@ -1128,7 +1105,7 @@ test for existence of the file. SCM_DEFINE (scm_getpid, "getpid", 0, 0, 0, (), -"Returns an integer representing the current process ID.") + "Returns an integer representing the current process ID.") #define FUNC_NAME s_scm_getpid { return SCM_MAKINUM ((unsigned long) getpid ()); @@ -1137,17 +1114,15 @@ SCM_DEFINE (scm_getpid, "getpid", 0, 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. - -If @var{string} is of the form @code{NAME=VALUE} then it will be written -directly into the environment, replacing any existing environment string -with -name matching @code{NAME}. If @var{string} does not contain an equal -sign, then any existing string with name matching @var{string} will -be removed. - -The return value is unspecified.") + "Modifies the environment of the current process, which is\n" + "also the default environment inherited by child processes.\n\n" + "If @var{string} is of the form @code{NAME=VALUE} then it will be written\n" + "directly into the environment, replacing any existing environment string\n" + "with\n" + "name matching @code{NAME}. If @var{string} does not contain an equal\n" + "sign, then any existing string with name matching @var{string} will\n" + "be removed.\n\n" + "The return value is unspecified.") #define FUNC_NAME s_scm_putenv { int rv; @@ -1170,16 +1145,15 @@ The return value is unspecified.") #ifdef HAVE_SETLOCALE 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 -as a system-dependent string. -@var{category} should be specified using the values @code{LC_COLLATE}, -@code{LC_ALL} etc. - -Otherwise the specified locale category is set to -the string @var{locale} -and the new value is returned as a system-dependent string. If @var{locale} -is an empty string, the locale will be set using envirionment variables.") + "If @var{locale} is omitted, returns the current value of the specified\n" + "locale category \n" + "as a system-dependent string.\n" + "@var{category} should be specified using the values @code{LC_COLLATE},\n" + "@code{LC_ALL} etc.\n\n" + "Otherwise the specified locale category is set to\n" + "the string @var{locale}\n" + "and the new value is returned as a system-dependent string. If @var{locale}\n" + "is an empty string, the locale will be set using envirionment variables.") #define FUNC_NAME s_scm_setlocale { char *clocale; @@ -1208,18 +1182,17 @@ is an empty string, the locale will be set using envirionment variables.") #ifdef HAVE_MKNOD 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 -be one of the following symbols: -regular, directory, symlink, block-special, char-special, -fifo, or socket. @var{perms} (an integer) specifies the file permissions. -@var{dev} (an integer) specifies which device the special file refers -to. Its exact interpretation depends on the kind of special file -being created. - -E.g., -@example -(mknod "/dev/fd0" 'block-special #o660 (+ (* 2 256) 2)) + "Creates a new special file, such as a file corresponding to a device.\n" + "@var{path} specifies the name of the file. @var{type} should\n" + "be one of the following symbols:\n" + "regular, directory, symlink, block-special, char-special,\n" + "fifo, or socket. @var{perms} (an integer) specifies the file permissions.\n" + "@var{dev} (an integer) specifies which device the special file refers\n" + "to. Its exact interpretation depends on the kind of special file\n" + "being created.\n\n" + "E.g.,\n" + "@example\n" + "(mknod "/dev/fd0" 'block-special #o660 (+ (* 2 256) 2)) @end example The return value is unspecified.") @@ -1265,9 +1238,9 @@ The return value is unspecified.") #ifdef HAVE_NICE 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. -The return value is unspecified.") + "Increment the priority of the current process by @var{incr}. A higher\n" + "priority value means that the process runs less often.\n" + "The return value is unspecified.") #define FUNC_NAME s_scm_nice { SCM_VALIDATE_INUM (1,incr); @@ -1281,8 +1254,8 @@ The return value is unspecified.") #ifdef HAVE_SYNC SCM_DEFINE (scm_sync, "sync", 0, 0, 0, (), -"Flush the operating system disk buffers. -The return value is unspecified.") + "Flush the operating system disk buffers.\n" + "The return value is unspecified.") #define FUNC_NAME s_scm_sync { sync(); diff --git a/libguile/print.c b/libguile/print.c index 94d1ba5c4..746bcb5aa 100644 --- a/libguile/print.c +++ b/libguile/print.c @@ -938,13 +938,13 @@ scm_display (SCM obj, SCM port) SCM_DEFINE (scm_simple_format, "simple-format", 2, 0, 1, (SCM destination, SCM message, SCM args), -"Write MESSAGE to DESTINATION, defaulting to `current-output-port'. -MESSAGE can contain ~A (was %s) and ~S (was %S) escapes. When printed, -the escapes are replaced with corresponding members of ARGS: -~A formats using `display' and ~S formats using `write'. -If DESTINATION is #t, then use the `current-output-port', -if DESTINATION is #f, then return a string containing the formatted text. -Does not add a trailing newline.") + "Write MESSAGE to DESTINATION, defaulting to `current-output-port'.\n" + "MESSAGE can contain ~A (was %s) and ~S (was %S) escapes. When printed,\n" + "the escapes are replaced with corresponding members of ARGS:\n" + "~A formats using `display' and ~S formats using `write'.\n" + "If DESTINATION is #t, then use the `current-output-port',\n" + "if DESTINATION is #f, then return a string containing the formatted text.\n" + "Does not add a trailing newline.") #define FUNC_NAME s_scm_simple_format { SCM answer = SCM_UNSPECIFIED; @@ -999,7 +999,7 @@ Does not add a trailing newline.") SCM_DEFINE (scm_newline, "newline", 0, 1, 0, (SCM port), -"") + "") #define FUNC_NAME s_scm_newline { if (SCM_UNBNDP (port)) @@ -1014,7 +1014,7 @@ SCM_DEFINE (scm_newline, "newline", 0, 1, 0, SCM_DEFINE (scm_write_char, "write-char", 1, 1, 0, (SCM chr, SCM port), -"") + "") #define FUNC_NAME s_scm_write_char { if (SCM_UNBNDP (port)) @@ -1067,7 +1067,7 @@ scm_printer_apply (SCM proc, SCM exp, SCM port, scm_print_state *pstate) 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 { SCM pwps; @@ -1081,7 +1081,7 @@ SCM_DEFINE (scm_port_with_print_state, "port-with-print-state", 2, 0, 0, SCM_DEFINE (scm_get_print_state, "get-print-state", 1, 0, 0, (SCM port), -"") + "") #define FUNC_NAME s_scm_get_print_state { if (SCM_PORT_WITH_PS_P (port)) diff --git a/libguile/procprop.c b/libguile/procprop.c index 5557847b9..529c92d3d 100644 --- a/libguile/procprop.c +++ b/libguile/procprop.c @@ -164,7 +164,7 @@ scm_stand_in_scm_proc(SCM proc) SCM_DEFINE (scm_procedure_properties, "procedure-properties", 1, 0, 0, (SCM proc), -"Return @var{obj}'s property list.") + "Return @var{obj}'s property list.") #define FUNC_NAME s_scm_procedure_properties { SCM_VALIDATE_PROC (1,proc); @@ -177,7 +177,7 @@ SCM_DEFINE (scm_procedure_properties, "procedure-properties", 1, 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}.") + "Set @var{obj}'s property list to @var{alist}.") #define FUNC_NAME s_scm_set_procedure_properties_x { if (!SCM_CLOSUREP (proc)) @@ -190,7 +190,7 @@ SCM_DEFINE (scm_set_procedure_properties_x, "set-procedure-properties!", 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}.") + "Return the property of @var{obj} with name @var{key}.") #define FUNC_NAME s_scm_procedure_property { SCM assoc; @@ -212,8 +212,8 @@ SCM_DEFINE (scm_procedure_property, "procedure-property", 2, 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}.") + "In @var{obj}'s property list, set the property named @var{key} to\n" + "@var{value}.") #define FUNC_NAME s_scm_set_procedure_property_x { SCM assoc; diff --git a/libguile/procs.c b/libguile/procs.c index 403bae8f6..e0041bd56 100644 --- a/libguile/procs.c +++ b/libguile/procs.c @@ -262,10 +262,10 @@ scm_subr_p (SCM obj) 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 -first expression is a string constant, that string is assumed to contain -documentation for that procedure.") + "Return the documentation string associated with @code{proc}. By\n" + "convention, if a procedure contains more than one expression and the\n" + "first expression is a string constant, that string is assumed to contain\n" + "documentation for that procedure.") #define FUNC_NAME s_scm_procedure_documentation { SCM code; @@ -300,7 +300,7 @@ documentation for that procedure.") SCM_DEFINE (scm_procedure_with_setter_p, "procedure-with-setter?", 1, 0, 0, (SCM obj), -"") + "") #define FUNC_NAME s_scm_procedure_with_setter_p { return SCM_BOOL(SCM_PROCEDURE_WITH_SETTER_P (obj)); @@ -309,7 +309,7 @@ SCM_DEFINE (scm_procedure_with_setter_p, "procedure-with-setter?", 1, 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 { SCM z; @@ -326,7 +326,7 @@ SCM_DEFINE (scm_make_procedure_with_setter, "make-procedure-with-setter", 2, 0, SCM_DEFINE (scm_procedure, "procedure", 1, 0, 0, (SCM proc), -"") + "") #define FUNC_NAME s_scm_procedure { SCM_VALIDATE_NIM (1,proc); diff --git a/libguile/ramap.c b/libguile/ramap.c index 0aa6582a7..9eef95f5d 100644 --- a/libguile/ramap.c +++ b/libguile/ramap.c @@ -406,8 +406,8 @@ scm_ramapc (int (*cproc)(), SCM data, SCM ra0, SCM lra, const char *what) 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.") + "Stores @var{fill} in every element of @var{array}. The value returned\n" + "is unspecified.") #define FUNC_NAME s_scm_array_fill_x { SCM_RAMAPC (scm_array_fill_int, fill, ra, SCM_EOL); @@ -777,10 +777,10 @@ SCM_REGISTER_PROC(s_array_copy_in_order_x, "array-copy-in-order!", 2, 0, 0, scm_ 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 -the same rank as @var{source}, and be at least as large in each -dimension. The order is unspecified.") + "Copies every element from vector or array @var{source} to the\n" + "corresponding element of @var{destination}. @var{destination} must have\n" + "the same rank as @var{source}, and be at least as large in each\n" + "dimension. The order is unspecified.") #define FUNC_NAME s_scm_array_copy_x { SCM_RAMAPC (racp, SCM_UNDEFINED, src, scm_cons (dst, SCM_EOL)); @@ -1597,12 +1597,12 @@ SCM_REGISTER_PROC(s_array_map_in_order_x, "array-map-in-order!", 2, 0, 1, scm_ar 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 -for the corresponding index in @var{array0}. @var{proc} is applied to -each tuple of elements of @var{array1} @dots{} and the result is stored -as the corresponding element in @var{array0}. The value returned is -unspecified. The order of application is unspecified.") + "@var{array1}, @dots{} must have the same number of dimensions as\n" + "@var{array0} and have a range for each index which includes the range\n" + "for the corresponding index in @var{array0}. @var{proc} is applied to\n" + "each tuple of elements of @var{array1} @dots{} and the result is stored\n" + "as the corresponding element in @var{array0}. The value returned is\n" + "unspecified. The order of application is unspecified.") #define FUNC_NAME s_scm_array_map_x { SCM_VALIDATE_PROC (2,proc); @@ -1744,8 +1744,8 @@ rafe (SCM ra0,SCM proc,SCM ras) 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.") + "@var{proc} is applied to each tuple of elements of @var{array0} @dots{}\n" + "in row-major order. The value returned is unspecified.") #define FUNC_NAME s_scm_array_for_each { SCM_VALIDATE_PROC (1,proc); @@ -1756,24 +1756,23 @@ in row-major order. The value returned is unspecified.") 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 -returned and the order of application are unspecified. - -One can implement @var{array-indexes} as -@example -(define (array-indexes array) - (let ((ra (apply make-array #f (array-shape array)))) - (array-index-map! ra (lambda x x)) - ra)) -@end example -Another example: -@example -(define (apl:index-generator n) - (let ((v (make-uniform-vector n 1))) - (array-index-map! v (lambda (i) i)) - v)) -@end example") + "applies @var{proc} to the indices of each element of @var{array} in\n" + "turn, storing the result in the corresponding element. The value\n" + "returned and the order of application are unspecified.\n\n" + "One can implement @var{array-indexes} as\n" + "@example\n" + "(define (array-indexes array)\n" + " (let ((ra (apply make-array #f (array-shape array))))\n" + " (array-index-map! ra (lambda x x))\n" + " ra))\n" + "@end example\n" + "Another example:\n" + "@example\n" + "(define (apl:index-generator n)\n" + " (let ((v (make-uniform-vector n 1)))\n" + " (array-index-map! v (lambda (i) i))\n" + " v))\n" + "@end example") #define FUNC_NAME s_scm_array_index_map_x { scm_sizet i; @@ -2044,11 +2043,11 @@ scm_raequal (SCM ra0, SCM ra1) /* GJB:FIXME:: Why not use SCM_DEFINE1 for array-equal? */ SCM_DEFINE1 (scm_array_equal_p, "array-equal?", scm_tc7_rpsubr, (SCM ra0, SCM ra1), -"Returns @code{#t} iff all arguments are arrays with the same shape, the -same type, and have corresponding elements which are either -@code{equal?} or @code{array-equal?}. This function differs from -@code{equal?} in that a one dimensional shared array may be -@var{array-equal?} but not @var{equal?} to a vector or uniform vector.") + "Returns @code{#t} iff all arguments are arrays with the same shape, the\n" + "same type, and have corresponding elements which are either\n" + "@code{equal?} or @code{array-equal?}. This function differs from\n" + "@code{equal?} in that a one dimensional shared array may be\n" + "@var{array-equal?} but not @var{equal?} to a vector or uniform vector.") #define FUNC_NAME s_scm_array_equal_p { } diff --git a/libguile/regex-posix.c b/libguile/regex-posix.c index 40f7f3371..f43a26d06 100644 --- a/libguile/regex-posix.c +++ b/libguile/regex-posix.c @@ -135,8 +135,8 @@ scm_regexp_error_msg (int regerrno, regex_t *rx) 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.") + "Return @code{#t} if @var{obj} is a compiled regular expression, or\n" + "@code{#f} otherwise.") #define FUNC_NAME s_scm_regexp_p { return SCM_BOOL(SCM_RGXP (x)); @@ -145,44 +145,39 @@ SCM_DEFINE (scm_regexp_p, "regexp?", 1, 0, 0, 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 -regular expression, @code{make-regexp} throws a -@code{regular-expression-syntax} error. - -The @var{flag} arguments change the behavior of the compiled regexp. -The following flags may be supplied: - -@table @code -@item regexp/icase -Consider uppercase and lowercase letters to be the same when matching. - -@item regexp/newline -If a newline appears in the target string, then permit the @samp{^} and -@samp{$} operators to match immediately after or immediately before the -newline, respectively. Also, the @samp{.} and @samp{[^...]} operators -will never match a newline character. The intent of this flag is to -treat the target string as a buffer containing many lines of text, and -the regular expression as a pattern that may match a single one of those -lines. - -@item regexp/basic -Compile a basic (``obsolete'') regexp instead of the extended -(``modern'') regexps that are the default. Basic regexps do not -consider @samp{|}, @samp{+} or @samp{?} to be special characters, and -require the @samp{@{...@}} and @samp{(...)} metacharacters to be -backslash-escaped (@pxref{Backslash Escapes}). There are several other -differences between basic and extended regular expressions, but these -are the most significant. - -@item regexp/extended -Compile an extended regular expression rather than a basic regexp. This -is the default behavior; this flag will not usually be needed. If a -call to @code{make-regexp} includes both @code{regexp/basic} and -@code{regexp/extended} flags, the one which comes last will override -the earlier one. -@end table -") + "Compile the regular expression described by @var{str}, and return the\n" + "compiled regexp structure. If @var{str} does not describe a legal\n" + "regular expression, @code{make-regexp} throws a\n" + "@code{regular-expression-syntax} error.\n\n" + "The @var{flag} arguments change the behavior of the compiled regexp.\n" + "The following flags may be supplied:\n\n" + "@table @code\n" + "@item regexp/icase\n" + "Consider uppercase and lowercase letters to be the same when matching.\n\n" + "@item regexp/newline\n" + "If a newline appears in the target string, then permit the @samp{^} and\n" + "@samp{$} operators to match immediately after or immediately before the\n" + "newline, respectively. Also, the @samp{.} and @samp{[^...]} operators\n" + "will never match a newline character. The intent of this flag is to\n" + "treat the target string as a buffer containing many lines of text, and\n" + "the regular expression as a pattern that may match a single one of those\n" + "lines.\n\n" + "@item regexp/basic\n" + "Compile a basic (``obsolete'') regexp instead of the extended\n" + "(``modern'') regexps that are the default. Basic regexps do not\n" + "consider @samp{|}, @samp{+} or @samp{?} to be special characters, and\n" + "require the @samp{@{...@}} and @samp{(...)} metacharacters to be\n" + "backslash-escaped (@pxref{Backslash Escapes}). There are several other\n" + "differences between basic and extended regular expressions, but these\n" + "are the most significant.\n\n" + "@item regexp/extended\n" + "Compile an extended regular expression rather than a basic regexp. This\n" + "is the default behavior; this flag will not usually be needed. If a\n" + "call to @code{make-regexp} includes both @code{regexp/basic} and\n" + "@code{regexp/extended} flags, the one which comes last will override\n" + "the earlier one.\n" + "@end table\n" + "") #define FUNC_NAME s_scm_make_regexp { SCM flag; @@ -225,10 +220,10 @@ the earlier one. 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 -from that position in the string. Return a match structure describing -the results of the match, or @code{#f} if no match could be found.") + "Match the compiled regular expression @var{regexp} against @code{str}.\n" + "If the optional integer @var{start} argument is provided, begin matching\n" + "from that position in the string. Return a match structure describing\n" + "the results of the match, or @code{#f} if no match could be found.") #define FUNC_NAME s_scm_regexp_exec { int status, nmatches, offset; diff --git a/libguile/root.c b/libguile/root.c index 30d80747c..f248528cc 100644 --- a/libguile/root.c +++ b/libguile/root.c @@ -337,48 +337,42 @@ cwdr (SCM proc, SCM a1, SCM args, SCM handler, SCM_STACKITEM *stack_start) 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. - -If an error occurs during evaluation, apply @var{handler} to the -arguments to the throw, just as @code{throw} would. If this happens, -@var{handler} is called outside the scope of the new root -- it is -called in the same dynamic context in which -@code{call-with-dynamic-root} was evaluated. - -If @var{thunk} captures a continuation, the continuation is rooted at -the call to @var{thunk}. In particular, the call to -@code{call-with-dynamic-root} is not captured. Therefore, -@code{call-with-dynamic-root} always returns at most one time. - -Before calling @var{thunk}, the dynamic-wind chain is un-wound back to -the root and a new chain started for @var{thunk}. Therefore, this call -may not do what you expect: - -@example -;; Almost certainly a bug: -(with-output-to-port - some-port - - (lambda () - (call-with-dynamic-root - (lambda () - (display 'fnord) - (newline)) - (lambda (errcode) errcode)))) -@end example - -The problem is, on what port will @samp{fnord\n} be displayed? You -might expect that because of the @code{with-output-to-port} that -it will be displayed on the port bound to @code{some-port}. But it -probably won't -- before evaluating the thunk, dynamic winds are -unwound, including those created by @code{with-output-to-port}. -So, the standard output port will have been re-set to its default value -before @code{display} is evaluated. - -(This function was added to Guile mostly to help calls to functions in C -libraries that can not tolerate non-local exits or calls that return -multiple times. If such functions call back to the interpreter, it should -be under a new dynamic root.)") + "Evaluate @var{(thunk)} in a new dynamic context, returning its value.\n\n" + "If an error occurs during evaluation, apply @var{handler} to the\n" + "arguments to the throw, just as @code{throw} would. If this happens,\n" + "@var{handler} is called outside the scope of the new root -- it is\n" + "called in the same dynamic context in which\n" + "@code{call-with-dynamic-root} was evaluated.\n\n" + "If @var{thunk} captures a continuation, the continuation is rooted at\n" + "the call to @var{thunk}. In particular, the call to\n" + "@code{call-with-dynamic-root} is not captured. Therefore,\n" + "@code{call-with-dynamic-root} always returns at most one time.\n\n" + "Before calling @var{thunk}, the dynamic-wind chain is un-wound back to\n" + "the root and a new chain started for @var{thunk}. Therefore, this call\n" + "may not do what you expect:\n\n" + "@example\n" + ";; Almost certainly a bug:\n" + "(with-output-to-port\n" + " some-port\n\n" + " (lambda ()\n" + " (call-with-dynamic-root\n" + " (lambda ()\n" + " (display 'fnord)\n" + " (newline))\n" + " (lambda (errcode) errcode))))\n" + "@end example\n\n" + "The problem is, on what port will @samp{fnord\n" + "} be displayed? You\n" + "might expect that because of the @code{with-output-to-port} that\n" + "it will be displayed on the port bound to @code{some-port}. But it\n" + "probably won't -- before evaluating the thunk, dynamic winds are\n" + "unwound, including those created by @code{with-output-to-port}.\n" + "So, the standard output port will have been re-set to its default value\n" + "before @code{display} is evaluated.\n\n" + "(This function was added to Guile mostly to help calls to functions in C\n" + "libraries that can not tolerate non-local exits or calls that return\n" + "multiple times. If such functions call back to the interpreter, it should\n" + "be under a new dynamic root.)") #define FUNC_NAME s_scm_call_with_dynamic_root { SCM_STACKITEM stack_place; @@ -388,11 +382,10 @@ be under a new dynamic root.)") SCM_DEFINE (scm_dynamic_root, "dynamic-root", 0, 0, 0, (), -"Return an object representing the current dynamic root. - -These objects are only useful for comparison using @code{eq?}. -They are currently represented as numbers, but your code should -in no way depend on this.") + "Return an object representing the current dynamic root.\n\n" + "These objects are only useful for comparison using @code{eq?}.\n" + "They are currently represented as numbers, but your code should\n" + "in no way depend on this.") #define FUNC_NAME s_scm_dynamic_root { return scm_ulong2num (SCM_SEQ (scm_root->rootcont)); diff --git a/libguile/scmsigs.c b/libguile/scmsigs.c index 83ab0c439..31952da0c 100644 --- a/libguile/scmsigs.c +++ b/libguile/scmsigs.c @@ -181,32 +181,28 @@ sys_deliver_signals (void) /* user interface for installation of signal handlers. */ SCM_DEFINE (scm_sigaction, "sigaction", 1, 2, 0, (SCM signum, SCM handler, SCM flags), -"Install or report the signal hander for a specified signal. - -@var{signum} is the signal number, which can be specified using the value -of variables such as @code{SIGINT}. - -If @var{action} is omitted, @code{sigaction} returns a pair: the -CAR is the current -signal hander, which will be either an integer with the value @code{SIG_DFL} -(default action) or @code{SIG_IGN} (ignore), or the Scheme procedure which -handles the signal, or @code{#f} if a non-Scheme procedure handles the -signal. The CDR contains the current @code{sigaction} flags for the handler. - -If @var{action} is provided, it is installed as the new handler for -@var{signum}. @var{action} can be a Scheme procedure taking one -argument, or the value of @code{SIG_DFL} (default action) or -@code{SIG_IGN} (ignore), or @code{#f} to restore whatever signal handler -was installed before @code{sigaction} was first used. Flags can -optionally be specified for the new handler (@code{SA_RESTART} will -always be added if it's available and the system is using rstartable -system calls.) The return value is a pair with information about the -old handler as described above. - -This interface does not provide access to the \"signal blocking\" -facility. Maybe this is not needed, since the thread support may -provide solutions to the problem of consistent access to data -structures.") + "Install or report the signal hander for a specified signal.\n\n" + "@var{signum} is the signal number, which can be specified using the value\n" + "of variables such as @code{SIGINT}.\n\n" + "If @var{action} is omitted, @code{sigaction} returns a pair: the\n" + "CAR is the current\n" + "signal hander, which will be either an integer with the value @code{SIG_DFL}\n" + "(default action) or @code{SIG_IGN} (ignore), or the Scheme procedure which\n" + "handles the signal, or @code{#f} if a non-Scheme procedure handles the\n" + "signal. The CDR contains the current @code{sigaction} flags for the handler.\n\n" + "If @var{action} is provided, it is installed as the new handler for\n" + "@var{signum}. @var{action} can be a Scheme procedure taking one\n" + "argument, or the value of @code{SIG_DFL} (default action) or\n" + "@code{SIG_IGN} (ignore), or @code{#f} to restore whatever signal handler\n" + "was installed before @code{sigaction} was first used. Flags can\n" + "optionally be specified for the new handler (@code{SA_RESTART} will\n" + "always be added if it's available and the system is using rstartable\n" + "system calls.) The return value is a pair with information about the\n" + "old handler as described above.\n\n" + "This interface does not provide access to the \"signal blocking\"\n" + "facility. Maybe this is not needed, since the thread support may\n" + "provide solutions to the problem of consistent access to data\n" + "structures.") #define FUNC_NAME s_scm_sigaction { int csig; @@ -337,8 +333,8 @@ structures.") 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.") + "Return all signal handlers to the values they had before any call to\n" + "@code{sigaction} was made. The return value is unspecified.") #define FUNC_NAME s_scm_restore_signals { int i; @@ -370,15 +366,14 @@ SCM_DEFINE (scm_restore_signals, "restore-signals", 0, 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 -handler for -@code{SIGALRM} beforehand, since the default action is to terminate -the process. - -The return value indicates the time remaining for the previous alarm, -if any. The new value replaces the previous alarm. If there was -no previous alarm, the return value is zero.") + "Set a timer to raise a @code{SIGALRM} signal after the specified\n" + "number of seconds (an integer). It's advisable to install a signal\n" + "handler for\n" + "@code{SIGALRM} beforehand, since the default action is to terminate\n" + "the process.\n\n" + "The return value indicates the time remaining for the previous alarm,\n" + "if any. The new value replaces the previous alarm. If there was\n" + "no previous alarm, the return value is zero.") #define FUNC_NAME s_scm_alarm { unsigned int j; @@ -391,9 +386,9 @@ no previous alarm, the return value is zero.") #ifdef HAVE_PAUSE 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 -handler procedure. The return value is unspecified.") + "Pause the current process (thread?) until a signal arrives whose\n" + "action is to either terminate the current process or invoke a\n" + "handler procedure. The return value is unspecified.") #define FUNC_NAME s_scm_pause { pause (); @@ -404,9 +399,9 @@ handler procedure. The return value is unspecified.") 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 -of seconds remaining otherwise.") + "Wait for the given number of seconds (an integer) or until a signal\n" + "arrives. The return value is zero if the time elapses or the number\n" + "of seconds remaining otherwise.") #define FUNC_NAME s_scm_sleep { unsigned long j; @@ -423,7 +418,7 @@ of seconds remaining otherwise.") #if defined(USE_THREADS) || defined(HAVE_USLEEP) SCM_DEFINE (scm_usleep, "usleep", 1, 0, 0, (SCM i), -"") + "") #define FUNC_NAME s_scm_usleep { SCM_VALIDATE_INUM_MIN (1,i,0); @@ -451,9 +446,9 @@ SCM_DEFINE (scm_usleep, "usleep", 1, 0, 0, SCM_DEFINE (scm_raise, "raise", 1, 0, 0, (SCM sig), -" -Sends a specified signal @var{sig} to the current process, where -@var{sig} is as described for the kill procedure.") + "\n" + "Sends a specified signal @var{sig} to the current process, where\n" + "@var{sig} is as described for the kill procedure.") #define FUNC_NAME s_scm_raise { SCM_VALIDATE_INUM (1,sig); diff --git a/libguile/socket.c b/libguile/socket.c index b957db9ec..b44cc4529 100644 --- a/libguile/socket.c +++ b/libguile/socket.c @@ -73,9 +73,9 @@ 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 -short integer.") + "Returns a new integer from @var{value} by converting from host to\n" + "network order. @var{value} must be within the range of a C unsigned\n" + "short integer.") #define FUNC_NAME s_scm_htons { unsigned short c_in; @@ -90,9 +90,9 @@ short integer.") 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 -integer.") + "Returns a new integer from @var{value} by converting from network to\n" + "host order. @var{value} must be within the range of a C unsigned short\n" + "integer.") #define FUNC_NAME s_scm_ntohs { unsigned short c_in; @@ -107,9 +107,9 @@ integer.") 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 -long integer.") + "Returns a new integer from @var{value} by converting from host to\n" + "network order. @var{value} must be within the range of a C unsigned\n" + "long integer.") #define FUNC_NAME s_scm_htonl { unsigned long c_in = SCM_NUM2ULONG (1,in); @@ -119,9 +119,9 @@ long integer.") 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 -long integer.") + "Returns a new integer from @var{value} by converting from network to\n" + "host order. @var{value} must be within the range of a C unsigned\n" + "long integer.") #define FUNC_NAME s_scm_ntohl { unsigned long c_in = SCM_NUM2ULONG (1,in); @@ -146,18 +146,16 @@ scm_sock_fd_to_port (int fd, const char *proc) 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 -for @var{family} are the values of @code{AF_UNIX} -and @code{AF_INET}. Typical values for @var{style} are -the values of @code{SOCK_STREAM}, @code{SOCK_DGRAM} and @code{SOCK_RAW}. - -@var{protocol} can be obtained from a protocol name using -@code{getprotobyname}. A value of -zero specifies the default protocol, which is usually right. - -A single socket port cannot by used for communication until -it has been connected to another socket.") + "Returns a new socket port of the type specified by @var{family}, @var{style}\n" + "and @var{protocol}. All three parameters are integers. Typical values\n" + "for @var{family} are the values of @code{AF_UNIX}\n" + "and @code{AF_INET}. Typical values for @var{style} are\n" + "the values of @code{SOCK_STREAM}, @code{SOCK_DGRAM} and @code{SOCK_RAW}.\n\n" + "@var{protocol} can be obtained from a protocol name using\n" + "@code{getprotobyname}. A value of\n" + "zero specifies the default protocol, which is usually right.\n\n" + "A single socket port cannot by used for communication until\n" + "it has been connected to another socket.") #define FUNC_NAME s_scm_socket { int fd; @@ -177,11 +175,11 @@ it has been connected to another socket.") #ifdef HAVE_SOCKETPAIR 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}. -Many systems support only -socket pairs of the @code{AF_UNIX} family. Zero is likely to be -the only meaningful value for @var{protocol}.") + "Returns a pair of connected (but unnamed) socket ports of the type specified\n" + "by @var{family}, @var{style} and @var{protocol}.\n" + "Many systems support only\n" + "socket pairs of the @code{AF_UNIX} family. Zero is likely to be\n" + "the only meaningful value for @var{protocol}.") #define FUNC_NAME s_scm_socketpair { int fam; @@ -207,15 +205,14 @@ the only meaningful value for @var{protocol}.") 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 -being requested, e.g., @code{SOL_SOCKET} for socket-level options. -@var{optname} is an -integer code for the option required and should be specified using one of -the symbols @code{SO_DEBUG}, @code{SO_REUSEADDR} etc. - -The returned value is typically an integer but @code{SO_LINGER} returns a -pair of integers.") + "Returns the value of a particular socket option for the socket\n" + "port @var{socket}. @var{level} is an integer code for type of option\n" + "being requested, e.g., @code{SOL_SOCKET} for socket-level options.\n" + "@var{optname} is an\n" + "integer code for the option required and should be specified using one of\n" + "the symbols @code{SO_DEBUG}, @code{SO_REUSEADDR} etc.\n\n" + "The returned value is typically an integer but @code{SO_LINGER} returns a\n" + "pair of integers.") #define FUNC_NAME s_scm_getsockopt { int fd; @@ -277,17 +274,16 @@ pair of integers.") 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 -being set, e.g., @code{SOL_SOCKET} for socket-level options. -@var{optname} is an -integer code for the option to set and should be specified using one of -the symbols @code{SO_DEBUG}, @code{SO_REUSEADDR} etc. -@var{value} is the value to which the option should be set. For -most options this must be an integer, but for @code{SO_LINGER} it must -be a pair. - -The return value is unspecified.") + "Sets the value of a particular socket option for the socket\n" + "port @var{socket}. @var{level} is an integer code for type of option\n" + "being set, e.g., @code{SOL_SOCKET} for socket-level options.\n" + "@var{optname} is an\n" + "integer code for the option to set and should be specified using one of\n" + "the symbols @code{SO_DEBUG}, @code{SO_REUSEADDR} etc.\n" + "@var{value} is the value to which the option should be set. For\n" + "most options this must be an integer, but for @code{SO_LINGER} it must\n" + "be a pair.\n\n" + "The return value is unspecified.") #define FUNC_NAME s_scm_setsockopt { int fd; @@ -360,23 +356,21 @@ The return value is unspecified.") 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 -connection to be shut down individually, according to the parameter -@var{how}: - -@table @asis -@item 0 -Stop receiving data for this socket. If further data arrives, reject it. -@item 1 -Stop trying to transmit data from this socket. Discard any -data waiting to be sent. Stop looking for acknowledgement of -data already sent; don't retransmit it if it is lost. -@item 2 -Stop both reception and transmission. -@end table - -The return value is unspecified.") + "Sockets can be closed simply by using @code{close-port}. The\n" + "@code{shutdown} procedure allows reception or tranmission on a\n" + "connection to be shut down individually, according to the parameter\n" + "@var{how}:\n\n" + "@table @asis\n" + "@item 0\n" + "Stop receiving data for this socket. If further data arrives, reject it.\n" + "@item 1\n" + "Stop trying to transmit data from this socket. Discard any\n" + "data waiting to be sent. Stop looking for acknowledgement of\n" + "data already sent; don't retransmit it if it is lost.\n" + "@item 2\n" + "Stop both reception and transmission.\n" + "@end table\n\n" + "The return value is unspecified.") #define FUNC_NAME s_scm_shutdown { int fd; @@ -449,20 +443,17 @@ scm_fill_sockaddr (int fam,SCM address,SCM *args,int which_arg,const char *proc, 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 -required for @var{address} -and @var{arg} @dots{} depends on the family of the socket. - -For a socket of family @code{AF_UNIX}, -only @code{address} is specified and must be a string with the -filename where the socket is to be created. - -For a socket of family @code{AF_INET}, -@code{address} must be an integer Internet host address and @var{arg} @dots{} -must be a single integer port number. - -The return value is unspecified.") + "Initiates a connection from @var{socket} to the address\n" + "specified by @var{address} and possibly @var{arg @dots{}}. The format\n" + "required for @var{address}\n" + "and @var{arg} @dots{} depends on the family of the socket.\n\n" + "For a socket of family @code{AF_UNIX},\n" + "only @code{address} is specified and must be a string with the\n" + "filename where the socket is to be created.\n\n" + "For a socket of family @code{AF_INET},\n" + "@code{address} must be an integer Internet host address and @var{arg} @dots{}\n" + "must be a single integer port number.\n\n" + "The return value is unspecified.") #define FUNC_NAME s_scm_connect { int fd; @@ -483,42 +474,33 @@ The return value is unspecified.") 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, -so they know where to look for incoming connections. A socket -without an address will be assigned one automatically when it -starts communicating. - -The format of @var{address} and @var{ARG} @dots{} depends on the family -of the socket. - -For a socket of family @code{AF_UNIX}, only @var{address} -is specified and must -be a string with the filename where the socket is to be created. - -For a socket of family @code{AF_INET}, @var{address} must be an integer -Internet host address and @var{arg} @dots{} must be a single integer -port number. - -The values of the following variables can also be used for @var{address}: - -@defvar INADDR_ANY -Allow connections from any address. -@end defvar - -@defvar INADDR_LOOPBACK -The address of the local host using the loopback device. -@end defvar - -@defvar INADDR_BROADCAST -The broadcast address on the local network. -@end defvar - -@defvar INADDR_NONE -No address. -@end defvar - -The return value is unspecified.") + "Assigns an address to the socket port @var{socket}.\n" + "Generally this only needs to be done for server sockets,\n" + "so they know where to look for incoming connections. A socket\n" + "without an address will be assigned one automatically when it\n" + "starts communicating.\n\n" + "The format of @var{address} and @var{ARG} @dots{} depends on the family\n" + "of the socket.\n\n" + "For a socket of family @code{AF_UNIX}, only @var{address}\n" + "is specified and must \n" + "be a string with the filename where the socket is to be created.\n\n" + "For a socket of family @code{AF_INET}, @var{address} must be an integer\n" + "Internet host address and @var{arg} @dots{} must be a single integer\n" + "port number.\n\n" + "The values of the following variables can also be used for @var{address}:\n\n" + "@defvar INADDR_ANY\n" + "Allow connections from any address.\n" + "@end defvar\n\n" + "@defvar INADDR_LOOPBACK\n" + "The address of the local host using the loopback device.\n" + "@end defvar\n\n" + "@defvar INADDR_BROADCAST\n" + "The broadcast address on the local network.\n" + "@end defvar\n\n" + "@defvar INADDR_NONE\n" + "No address.\n" + "@end defvar\n\n" + "The return value is unspecified.") #define FUNC_NAME s_scm_bind { int rv; @@ -541,13 +523,12 @@ The return value is unspecified.") 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 -the maximum length of the queue for pending connections. -If the queue fills, new clients will fail to connect until the -server calls @code{accept} to accept a connection from the queue. - -The return value is unspecified.") + "This procedure enables @var{socket} to accept connection\n" + "requests. @var{backlog} is an integer specifying\n" + "the maximum length of the queue for pending connections.\n" + "If the queue fills, new clients will fail to connect until the\n" + "server calls @code{accept} to accept a connection from the queue.\n\n" + "The return value is unspecified.") #define FUNC_NAME s_scm_listen { int fd; @@ -618,20 +599,17 @@ scm_init_addr_buffer (void) 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 -one is available unless the non-blocking option has been set on the -socket. - -The return value is a -pair in which the CAR is a new socket port for the connection and -the CDR is an object with address information about the client which -initiated the connection. - -If the address is not available then the CDR will be an empty vector. - -@var{socket} does not become part of the -connection and will continue to accept new requests.") + "Accepts a connection on a bound, listening socket @var{socket}. If there\n" + "are no pending connections in the queue, it waits until\n" + "one is available unless the non-blocking option has been set on the\n" + "socket.\n\n" + "The return value is a\n" + "pair in which the CAR is a new socket port for the connection and\n" + "the CDR is an object with address information about the client which\n" + "initiated the connection.\n\n" + "If the address is not available then the CDR will be an empty vector.\n\n" + "@var{socket} does not become part of the\n" + "connection and will continue to accept new requests.") #define FUNC_NAME s_scm_accept { int fd; @@ -657,9 +635,9 @@ connection and will continue to accept new requests.") 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 -in the @code{AF_FILE} namespace cannot be read.") + "Returns the address of @var{socket}, in the same form as the object\n" + "returned by @code{accept}. On many systems the address of a socket\n" + "in the @code{AF_FILE} namespace cannot be read.") #define FUNC_NAME s_scm_getsockname { int tmp_size; @@ -681,10 +659,10 @@ in the @code{AF_FILE} namespace cannot be read.") 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 -returned by @code{accept}. On many systems the address of a socket -in the @code{AF_FILE} namespace cannot be read.") + "Returns the address of the socket that the socket @var{socket} is connected to,\n" + "in the same form as the object\n" + "returned by @code{accept}. On many systems the address of a socket\n" + "in the @code{AF_FILE} namespace cannot be read.") #define FUNC_NAME s_scm_getpeername { int tmp_size; @@ -706,21 +684,17 @@ in the @code{AF_FILE} namespace cannot be read.") 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. -@var{buf} is a string into which -the data will be written. The size of @var{buf} limits the amount of -data which can be received: in the case of packet -protocols, if a packet larger than this limit is encountered then some data -will be irrevocably lost. - -The optional @var{flags} argument is a value or -bitwise OR of MSG_OOB, MSG_PEEK, MSG_DONTROUTE etc. - -The value returned is the number of bytes read from the socket. - -Note that the data is read directly from the socket file descriptor: -any unread buffered port data is ignored.") + "Receives data from the socket port @var{socket}. @var{socket} must already\n" + "be bound to the address from which data is to be received.\n" + "@var{buf} is a string into which\n" + "the data will be written. The size of @var{buf} limits the amount of\n" + "data which can be received: in the case of packet\n" + "protocols, if a packet larger than this limit is encountered then some data\n" + "will be irrevocably lost.\n\n" + "The optional @var{flags} argument is a value or\n" + "bitwise OR of MSG_OOB, MSG_PEEK, MSG_DONTROUTE etc.\n\n" + "The value returned is the number of bytes read from the socket.\n\n" + "Note that the data is read directly from the socket file descriptor:any unread buffered port data is ignored.") #define FUNC_NAME s_scm_recv { int rv; @@ -742,15 +716,14 @@ any unread buffered port data is ignored.") 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 -value returned is the number of bytes transmitted -- it's possible for -this to be less than the length of @var{message} if the socket is -set to be non-blocking. The optional @var{flags} argument is a value or -bitwise OR of MSG_OOB, MSG_PEEK, MSG_DONTROUTE etc. - -Note that the data is written directly to the socket file descriptor: -any unflushed buffered port data is ignored.") + "Transmits the string @var{message} on the socket port @var{socket}. \n" + "@var{socket} must already be bound to a destination address. The\n" + "value returned is the number of bytes transmitted -- it's possible for\n" + "this to be less than the length of @var{message} if the socket is\n" + "set to be non-blocking. The optional @var{flags} argument is a value or\n" + "bitwise OR of MSG_OOB, MSG_PEEK, MSG_DONTROUTE etc.\n\n" + "Note that the data is written directly to the socket file descriptor:\n" + "any unflushed buffered port data is ignored.") #define FUNC_NAME s_scm_send { int rv; @@ -772,27 +745,23 @@ any unflushed buffered port data is ignored.") 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 -be bound to the address from which data is to be received. -@code{buf}, is a string into which -the data will be written. The size of @var{buf} limits the amount of -data which can be received: in the case of packet -protocols, if a packet larger than this limit is encountered then some data -will be irrevocably lost. - -The optional @var{flags} argument is a value or -bitwise OR of MSG_OOB, MSG_PEEK, MSG_DONTROUTE etc. - -The value returned is a pair: the CAR is the number of bytes read from -the socket and the CDR an address object in the same form as returned by -@code{accept}. - -The @var{start} and @var{end} arguments specify a substring of @var{buf} -to which the data should be written. - -Note that the data is read directly from the socket file descriptor: -any unread buffered port data is ignored.") + "Returns data from the socket port @var{socket} and also information about\n" + "where the data was received from. @var{socket} must already\n" + "be bound to the address from which data is to be received.\n" + "@code{buf}, is a string into which\n" + "the data will be written. The size of @var{buf} limits the amount of\n" + "data which can be received: in the case of packet\n" + "protocols, if a packet larger than this limit is encountered then some data\n" + "will be irrevocably lost.\n\n" + "The optional @var{flags} argument is a value or\n" + "bitwise OR of MSG_OOB, MSG_PEEK, MSG_DONTROUTE etc.\n\n" + "The value returned is a pair: the CAR is the number of bytes read from\n" + "the socket and the CDR an address object in the same form as returned by\n" + "@code{accept}.\n\n" + "The @var{start} and @var{end} arguments specify a substring of @var{buf}\n" + "to which the data should be written.\n\n" + "Note that the data is read directly from the socket file descriptor:\n" + "any unread buffered port data is ignored.") #define FUNC_NAME s_scm_recvfrom { int rv; @@ -852,17 +821,16 @@ any unread buffered port data is ignored.") 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 -@var{arg} arguments, in a similar way to the @code{connect} -procedure. The -value returned is the number of bytes transmitted -- it's possible for -this to be less than the length of @var{message} if the socket is -set to be non-blocking. The optional @var{flags} argument is a value or -bitwise OR of MSG_OOB, MSG_PEEK, MSG_DONTROUTE etc. - -Note that the data is written directly to the socket file descriptor: -any unflushed buffered port data is ignored.") + "Transmits the string @var{message} on the socket port @var{socket}. The\n" + "destination address is specified using the @var{family}, @var{address} and\n" + "@var{arg} arguments, in a similar way to the @code{connect}\n" + "procedure. The\n" + "value returned is the number of bytes transmitted -- it's possible for\n" + "this to be less than the length of @var{message} if the socket is\n" + "set to be non-blocking. The optional @var{flags} argument is a value or\n" + "bitwise OR of MSG_OOB, MSG_PEEK, MSG_DONTROUTE etc.\n\n" + "Note that the data is written directly to the socket file descriptor:\n" + "any unflushed buffered port data is ignored.") #define FUNC_NAME s_scm_sendto { int rv; diff --git a/libguile/stacks.c b/libguile/stacks.c index ce2e5f466..7483f0d12 100644 --- a/libguile/stacks.c +++ b/libguile/stacks.c @@ -410,7 +410,7 @@ SCM scm_stack_type; SCM_DEFINE (scm_stack_p, "stack?", 1, 0, 0, (SCM obj), -"Return @code{#t} if @var{obj} is a calling stack.") + "Return @code{#t} if @var{obj} is a calling stack.") #define FUNC_NAME s_scm_stack_p { return SCM_BOOL(SCM_STACKP (obj)); @@ -419,7 +419,7 @@ SCM_DEFINE (scm_stack_p, "stack?", 1, 0, 0, SCM_DEFINE (scm_make_stack, "make-stack", 0, 0, 1, (SCM args), -"") + "") #define FUNC_NAME s_scm_make_stack { int n, maxp, size; @@ -512,7 +512,7 @@ SCM_DEFINE (scm_make_stack, "make-stack", 0, 0, 1, SCM_DEFINE (scm_stack_id, "stack-id", 1, 0, 0, (SCM stack), -"Return the identifier given to @var{stack} by @code{start-stack}.") + "Return the identifier given to @var{stack} by @code{start-stack}.") #define FUNC_NAME s_scm_stack_id { scm_debug_frame *dframe; @@ -548,7 +548,7 @@ SCM_DEFINE (scm_stack_id, "stack-id", 1, 0, 0, SCM_DEFINE (scm_stack_ref, "stack-ref", 2, 0, 0, (SCM stack, SCM i), -"") + "") #define FUNC_NAME s_scm_stack_ref { SCM_VALIDATE_STACK (1,stack); @@ -562,7 +562,7 @@ SCM_DEFINE (scm_stack_ref, "stack-ref", 2, 0, 0, SCM_DEFINE (scm_stack_length, "stack-length", 1, 0, 0, (SCM stack), -"") + "") #define FUNC_NAME s_scm_stack_length { SCM_VALIDATE_STACK (1,stack); @@ -575,7 +575,7 @@ SCM_DEFINE (scm_stack_length, "stack-length", 1, 0, 0, SCM_DEFINE (scm_frame_p, "frame?", 1, 0, 0, (SCM obj), -"") + "") #define FUNC_NAME s_scm_frame_p { return SCM_BOOL(SCM_FRAMEP (obj)); @@ -584,7 +584,7 @@ SCM_DEFINE (scm_frame_p, "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 { scm_debug_frame *dframe; @@ -625,7 +625,7 @@ SCM_DEFINE (scm_last_stack_frame, "last-stack-frame", 1, 0, 0, SCM_DEFINE (scm_frame_number, "frame-number", 1, 0, 0, (SCM frame), -"") + "") #define FUNC_NAME s_scm_frame_number { SCM_VALIDATE_FRAME (1,frame); @@ -635,7 +635,7 @@ SCM_DEFINE (scm_frame_number, "frame-number", 1, 0, 0, SCM_DEFINE (scm_frame_source, "frame-source", 1, 0, 0, (SCM frame), -"") + "") #define FUNC_NAME s_scm_frame_source { SCM_VALIDATE_FRAME (1,frame); @@ -645,7 +645,7 @@ SCM_DEFINE (scm_frame_source, "frame-source", 1, 0, 0, SCM_DEFINE (scm_frame_procedure, "frame-procedure", 1, 0, 0, (SCM frame), -"") + "") #define FUNC_NAME s_scm_frame_procedure { SCM_VALIDATE_FRAME (1,frame); @@ -657,7 +657,7 @@ SCM_DEFINE (scm_frame_procedure, "frame-procedure", 1, 0, 0, SCM_DEFINE (scm_frame_arguments, "frame-arguments", 1, 0, 0, (SCM frame), -"") + "") #define FUNC_NAME s_scm_frame_arguments { SCM_VALIDATE_FRAME (1,frame); @@ -667,7 +667,7 @@ SCM_DEFINE (scm_frame_arguments, "frame-arguments", 1, 0, 0, SCM_DEFINE (scm_frame_previous, "frame-previous", 1, 0, 0, (SCM frame), -"") + "") #define FUNC_NAME s_scm_frame_previous { int n; @@ -682,7 +682,7 @@ SCM_DEFINE (scm_frame_previous, "frame-previous", 1, 0, 0, SCM_DEFINE (scm_frame_next, "frame-next", 1, 0, 0, (SCM frame), -"") + "") #define FUNC_NAME s_scm_frame_next { int n; @@ -697,7 +697,7 @@ SCM_DEFINE (scm_frame_next, "frame-next", 1, 0, 0, SCM_DEFINE (scm_frame_real_p, "frame-real?", 1, 0, 0, (SCM frame), -"") + "") #define FUNC_NAME s_scm_frame_real_p { SCM_VALIDATE_FRAME (1,frame); @@ -707,7 +707,7 @@ SCM_DEFINE (scm_frame_real_p, "frame-real?", 1, 0, 0, SCM_DEFINE (scm_frame_procedure_p, "frame-procedure?", 1, 0, 0, (SCM frame), -"") + "") #define FUNC_NAME s_scm_frame_procedure_p { SCM_VALIDATE_FRAME (1,frame); @@ -717,7 +717,7 @@ SCM_DEFINE (scm_frame_procedure_p, "frame-procedure?", 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 { SCM_VALIDATE_FRAME (1,frame); @@ -727,7 +727,7 @@ SCM_DEFINE (scm_frame_evaluating_args_p, "frame-evaluating-args?", 1, 0, 0, SCM_DEFINE (scm_frame_overflow_p, "frame-overflow?", 1, 0, 0, (SCM frame), -"") + "") #define FUNC_NAME s_scm_frame_overflow_p { SCM_VALIDATE_FRAME (1,frame); diff --git a/libguile/stime.c b/libguile/stime.c index aa7d4d073..45bb11dee 100644 --- a/libguile/stime.c +++ b/libguile/stime.c @@ -131,7 +131,7 @@ struct timeb scm_your_base = {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.") + "Returns the number of time units since the interpreter was started.") #define FUNC_NAME s_scm_get_internal_real_time { struct timeb time_buffer; @@ -155,7 +155,7 @@ timet scm_your_base = 0; SCM_DEFINE (scm_get_internal_real_time, "get-internal-real-time", 0, 0, 0, (), -"") + "") #define FUNC_NAME s_scm_get_internal_real_time { return scm_long2num((time((timet*)0) - scm_your_base) * (int)CLKTCK); @@ -167,25 +167,24 @@ SCM_DEFINE (scm_get_internal_real_time, "get-internal-real-time", 0, 0, 0, #ifdef HAVE_TIMES 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 -return a selected component: - -@table @code -@item tms:clock -The current real time, expressed as time units relative to an -arbitrary base. -@item tms:utime -The CPU time units used by the calling process. -@item tms:stime -The CPU time units used by the system on behalf of the calling process. -@item tms:cutime -The CPU time units used by terminated child processes of the calling -process, whose status has been collected (e.g., using @code{waitpid}). -@item tms:cstime -Similarly, the CPU times units used by the system on behalf of -terminated child processes. -@end table") + "Returns an object with information about real and processor time.\n" + "The following procedures accept such an object as an argument and\n" + "return a selected component:\n\n" + "@table @code\n" + "@item tms:clock\n" + "The current real time, expressed as time units relative to an\n" + "arbitrary base.\n" + "@item tms:utime\n" + "The CPU time units used by the calling process.\n" + "@item tms:stime\n" + "The CPU time units used by the system on behalf of the calling process.\n" + "@item tms:cutime\n" + "The CPU time units used by terminated child processes of the calling\n" + "process, whose status has been collected (e.g., using @code{waitpid}).\n" + "@item tms:cstime\n" + "Similarly, the CPU times units used by the system on behalf of \n" + "terminated child processes.\n" + "@end table") #define FUNC_NAME s_scm_times { struct tms t; @@ -209,8 +208,8 @@ static long scm_my_base = 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 + "Returns the number of time units of processor time used by the interpreter.\n" + "Both "system" and "user" time are included but subprocesses are not.") #define FUNC_NAME s_scm_get_internal_run_time { @@ -220,8 +219,7 @@ are included but subprocesses are not.") 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.") + "Returns the number of seconds since 1970-01-01 00:00:00 UTC, excludingleap seconds.") #define FUNC_NAME s_scm_current_time { timet timv; diff --git a/libguile/strings.c b/libguile/strings.c index 3e3312d55..f1db720ab 100644 --- a/libguile/strings.c +++ b/libguile/strings.c @@ -57,7 +57,7 @@ SCM_DEFINE (scm_string_p, "string?", 1, 0, 0, (SCM x), -"") + "") #define FUNC_NAME s_scm_string_p { if (SCM_IMP (x)) @@ -68,18 +68,15 @@ SCM_DEFINE (scm_string_p, "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, - -This illustrates the difference between @code{string?} and -@code{read-only-string?}: - -@example -(string? \"a string\") @result{} #t -(string? 'a-symbol) @result{} #f - -(read-only-string? \"a string\") @result{} #t -(read-only-string? 'a-symbol) @result{} #t -@end example") + "Return true of OBJ can be read as a string,\n\n" + "This illustrates the difference between @code{string?} and\n" + "@code{read-only-string?}:\n\n" + "@example\n" + "(string? \"a string\") @result{} #t\n" + "(string? 'a-symbol) @result{} #f\n\n" + "(read-only-string? \"a string\") @result{} #t\n" + "(read-only-string? 'a-symbol) @result{} #t\n" + "@end example") #define FUNC_NAME s_scm_read_only_string_p { if (SCM_IMP (x)) @@ -93,7 +90,7 @@ SCM_REGISTER_PROC(s_list_to_string, "list->string", 1, 0, 0, scm_string); SCM_DEFINE (scm_string, "string", 0, 0, 1, (SCM chrs), -"") + "") #define FUNC_NAME s_scm_string { SCM res; @@ -249,7 +246,7 @@ scm_makfrom0str_opt (const char *src) SCM_DEFINE (scm_make_string, "make-string", 1, 1, 0, (SCM k, SCM chr), -"") + "") #define FUNC_NAME s_scm_make_string { SCM res; @@ -272,7 +269,7 @@ SCM_DEFINE (scm_make_string, "make-string", 1, 1, 0, SCM_DEFINE (scm_string_length, "string-length", 1, 0, 0, (SCM str), -"") + "") #define FUNC_NAME s_scm_string_length { SCM_VALIDATE_ROSTRING (1,str); @@ -282,7 +279,7 @@ SCM_DEFINE (scm_string_length, "string-length", 1, 0, 0, SCM_DEFINE (scm_string_ref, "string-ref", 1, 1, 0, (SCM str, SCM k), -"") + "") #define FUNC_NAME s_scm_string_ref { SCM_VALIDATE_ROSTRING (1,str); @@ -294,7 +291,7 @@ SCM_DEFINE (scm_string_ref, "string-ref", 1, 1, 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 { SCM_VALIDATE_RWSTRING (1,str); @@ -309,7 +306,7 @@ SCM_DEFINE (scm_string_set_x, "string-set!", 3, 0, 0, SCM_DEFINE (scm_substring, "substring", 2, 1, 0, (SCM str, SCM start, SCM end), -"") + "") #define FUNC_NAME s_scm_substring { long l; @@ -326,7 +323,7 @@ SCM_DEFINE (scm_substring, "substring", 2, 1, 0, SCM_DEFINE (scm_string_append, "string-append", 0, 0, 1, (SCM args), -"") + "") #define FUNC_NAME s_scm_string_append { SCM res; @@ -352,13 +349,13 @@ SCM_DEFINE (scm_string_append, "string-append", 0, 0, 1, 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 -includes all of the text from @var{str} between indexes @var{start} -(inclusive) and @var{end} (exclusive). If @var{end} is omitted, it -defaults to the end of @var{str}. The shared substring returned by -@code{make-shared-substring} occupies the same storage space as -@var{str}.") + "Return a shared substring of @var{str}. The semantics are the same as\n" + "for the @code{substring} function: the shared substring returned\n" + "includes all of the text from @var{str} between indexes @var{start}\n" + "(inclusive) and @var{end} (exclusive). If @var{end} is omitted, it\n" + "defaults to the end of @var{str}. The shared substring returned by\n" + "@code{make-shared-substring} occupies the same storage space as\n" + "@var{str}.") #define FUNC_NAME s_scm_make_shared_substring { long f; diff --git a/libguile/strop.c b/libguile/strop.c index 18448f468..c4171bd4f 100644 --- a/libguile/strop.c +++ b/libguile/strop.c @@ -88,10 +88,10 @@ scm_i_index (SCM *str, SCM chr, int direction, SCM sub_start, 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 -a portion of the string. This procedure essentially implements the -@code{index} or @code{strchr} functions from the C library.") + "Return the index of the first occurrence of @var{chr} in @var{str}. The\n" + "optional integer arguments @var{frm} and @var{to} limit the search to\n" + "a portion of the string. This procedure essentially implements the\n" + "@code{index} or @code{strchr} functions from the C library.") #define FUNC_NAME s_scm_string_index { int pos; @@ -109,9 +109,9 @@ a portion of the string. This procedure essentially implements the 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 -@code{rindex} or @code{strrchr} functions from the C library.") + "Like @code{string-index}, but search from the right of the string rather\n" + "than from the left. This procedure essentially implements the\n" + "@code{rindex} or @code{strrchr} functions from the C library.") #define FUNC_NAME s_scm_string_rindex { int pos; @@ -134,22 +134,21 @@ SCM_REGISTER_PROC(s_substring_move_right_x, "substring-move-right!", 5, 0, 0, sc 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}. -@code{substring-move-right!} begins copying from the rightmost character -and moves left, and @code{substring-move-left!} copies from the leftmost -character moving right. - -It is useful to have two functions that copy in different directions so -that substrings can be copied back and forth within a single string. If -you wish to copy text from the left-hand side of a string to the -right-hand side of the same string, and the source and destination -overlap, you must be careful to copy the rightmost characters of the -text first, to avoid clobbering your data. Hence, when @var{str1} and -@var{str2} are the same string, you should use -@code{substring-move-right!} when moving text from left to right, and -@code{substring-move-left!} otherwise. If @code{str1} and @samp{str2} -are different strings, it does not matter which function you use.") + "Copy the substring of @var{str1} bounded by @var{start1} and @var{end1}\n" + "into @var{str2} beginning at position @var{end2}.\n" + "@code{substring-move-right!} begins copying from the rightmost character\n" + "and moves left, and @code{substring-move-left!} copies from the leftmost\n" + "character moving right.\n\n" + "It is useful to have two functions that copy in different directions so\n" + "that substrings can be copied back and forth within a single string. If\n" + "you wish to copy text from the left-hand side of a string to the\n" + "right-hand side of the same string, and the source and destination\n" + "overlap, you must be careful to copy the rightmost characters of the\n" + "text first, to avoid clobbering your data. Hence, when @var{str1} and\n" + "@var{str2} are the same string, you should use\n" + "@code{substring-move-right!} when moving text from left to right, and\n" + "@code{substring-move-left!} otherwise. If @code{str1} and @samp{str2}\n" + "are different strings, it does not matter which function you use.") #define FUNC_NAME s_scm_substring_move_x { long s1, s2, e, len; @@ -177,8 +176,8 @@ are different strings, it does not matter which function you use.") 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}.") + "Change every character in @var{str} between @var{start} and @var{end} to\n" + "@var{fill-char}.") #define FUNC_NAME s_scm_substring_fill_x { long i, e; @@ -197,8 +196,8 @@ SCM_DEFINE (scm_substring_fill_x, "substring-fill!", 4, 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.") + "Return @code{#t} if @var{str}'s length is nonzero, and @code{#f}\n" + "otherwise.") #define FUNC_NAME s_scm_string_null_p { SCM_VALIDATE_ROSTRING (1,str); @@ -209,7 +208,7 @@ otherwise.") SCM_DEFINE (scm_string_to_list, "string->list", 1, 0, 0, (SCM str), -"") + "") #define FUNC_NAME s_scm_string_to_list { long i; @@ -226,7 +225,7 @@ SCM_DEFINE (scm_string_to_list, "string->list", 1, 0, 0, SCM_DEFINE (scm_string_copy, "string-copy", 1, 0, 0, (SCM str), -"") + "") #define FUNC_NAME s_scm_string_copy { SCM_VALIDATE_STRINGORSUBSTR (1,str); @@ -237,7 +236,7 @@ SCM_DEFINE (scm_string_copy, "string-copy", 1, 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 { register char *dst, c; @@ -251,8 +250,8 @@ SCM_DEFINE (scm_string_fill_x, "string-fill!", 2, 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.") + "@deffnx primitive string-downcase! str\n" + "Upcase or downcase every character in @code{str}, respectively.") #define FUNC_NAME s_scm_string_upcase_x { register long k; @@ -276,7 +275,7 @@ Upcase or downcase every character in @code{str}, respectively.") SCM_DEFINE (scm_string_upcase, "string-upcase", 1, 0, 0, (SCM str), -"") + "") #define FUNC_NAME s_scm_string_upcase { return scm_string_upcase_x(scm_string_copy(str)); @@ -285,7 +284,7 @@ SCM_DEFINE (scm_string_upcase, "string-upcase", 1, 0, 0, SCM_DEFINE (scm_string_downcase_x, "string-downcase!", 1, 0, 0, (SCM v), -"") + "") #define FUNC_NAME s_scm_string_downcase_x { register long k; @@ -308,7 +307,7 @@ SCM_DEFINE (scm_string_downcase_x, "string-downcase!", 1, 0, 0, SCM_DEFINE (scm_string_downcase, "string-downcase", 1, 0, 0, (SCM str), -"") + "") #define FUNC_NAME s_scm_string_downcase { SCM_VALIDATE_STRING (1,str); @@ -318,7 +317,7 @@ SCM_DEFINE (scm_string_downcase, "string-downcase", 1, 0, 0, SCM_DEFINE (scm_string_capitalize_x, "string-capitalize!", 1, 0, 0, (SCM s), -"") + "") #define FUNC_NAME s_scm_string_capitalize_x { char *str; @@ -343,7 +342,7 @@ SCM_DEFINE (scm_string_capitalize_x, "string-capitalize!", 1, 0, 0, SCM_DEFINE (scm_string_capitalize, "string-capitalize", 1, 0, 0, (SCM s), -"") + "") #define FUNC_NAME s_scm_string_capitalize { SCM_VALIDATE_STRING (1,s); @@ -353,7 +352,7 @@ SCM_DEFINE (scm_string_capitalize, "string-capitalize", 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 { return scm_string_to_symbol (SCM_CASE_INSENSITIVE_P diff --git a/libguile/strports.c b/libguile/strports.c index 85d6a1dde..1ab0aebc6 100644 --- a/libguile/strports.c +++ b/libguile/strports.c @@ -297,9 +297,9 @@ SCM scm_strport_to_string (SCM port) 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 -written into the port is returned.") + "Calls the one-argument procedure @var{proc} with a newly created output\n" + "port. When the function returns, the string composed of the characters\n" + "written into the port is returned.") #define FUNC_NAME s_scm_call_with_output_string { SCM p; @@ -339,9 +339,9 @@ scm_strprint_obj (SCM obj) 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 -by the @var{proc} is returned.") + "Calls the one-argument procedure @var{proc} with a newly created input\n" + "port from which @var{string}'s contents may be read. The value yielded\n" + "by the @var{proc} is returned.") #define FUNC_NAME s_scm_call_with_input_string { SCM p = scm_mkstrport(SCM_INUM0, str, SCM_OPN | SCM_RDNG, FUNC_NAME); @@ -380,8 +380,8 @@ scm_eval_0str (const char *expr) 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.") + "Evaluate @var{string} as the text representation of a Scheme form\n" + "or forms, and return whatever value they produce.") #define FUNC_NAME s_scm_eval_string { SCM port = scm_mkstrport (SCM_INUM0, string, SCM_OPN | SCM_RDNG, diff --git a/libguile/struct.c b/libguile/struct.c index a920179e3..f70039fb0 100644 --- a/libguile/struct.c +++ b/libguile/struct.c @@ -68,16 +68,15 @@ SCM scm_struct_table; SCM_DEFINE (scm_make_struct_layout, "make-struct-layout", 1, 0, 0, (SCM fields), -"Return a new structure layout object. - -@var{fields} must be a read-only string made up of pairs of characters -strung together. The first character of each pair describes a field -type, the second a field protection. Allowed types are 'p' for -GC-protected Scheme data, 'u' for unprotected binary data, and 's' for -fields that should point to the structure itself. Allowed protections -are 'w' for mutable fields, 'r' for read-only fields, and 'o' for opaque -fields. The last field protection specification may be capitalized to -indicate that the field is a tail-array.") + "Return a new structure layout object.\n\n" + "@var{fields} must be a read-only string made up of pairs of characters\n" + "strung together. The first character of each pair describes a field\n" + "type, the second a field protection. Allowed types are 'p' for\n" + "GC-protected Scheme data, 'u' for unprotected binary data, and 's' for\n" + "fields that should point to the structure itself. Allowed protections\n" + "are 'w' for mutable fields, 'r' for read-only fields, and 'o' for opaque \n" + "fields. The last field protection specification may be capitalized to\n" + "indicate that the field is a tail-array.") #define FUNC_NAME s_scm_make_struct_layout { SCM new_sym; @@ -242,7 +241,7 @@ scm_struct_init (SCM handle, int tail_elts, SCM inits) SCM_DEFINE (scm_struct_p, "struct?", 1, 0, 0, (SCM x), -"Return #t iff @var{obj} is a structure object, else #f.") + "Return #t iff @var{obj} is a structure object, else #f.") #define FUNC_NAME s_scm_struct_p { return SCM_BOOL(SCM_STRUCTP (x)); @@ -251,7 +250,7 @@ SCM_DEFINE (scm_struct_p, "struct?", 1, 0, 0, SCM_DEFINE (scm_struct_vtable_p, "struct-vtable?", 1, 0, 0, (SCM x), -"Return #t iff obj is a vtable structure.") + "Return #t iff obj is a vtable structure.") #define FUNC_NAME s_scm_struct_vtable_p { SCM layout; @@ -369,19 +368,16 @@ scm_struct_free_entity (SCM *vtable, SCM *data) SCM_DEFINE (scm_make_struct, "make-struct", 2, 0, 1, (SCM vtable, SCM tail_array_size, SCM init), -"Create a new structure. - -@var{type} must be a vtable structure (@xref{Vtables}). - -@var{tail-elts} must be a non-negative integer. If the layout -specification indicated by @var{type} includes a tail-array, -this is the number of elements allocated to that array. - -The @var{inits} are optional arguments describing how successive fields -of the structure should be initialized. Only fields with protection 'r' -or 'w' can be initialized -- fields of protection 's' are automatically -initialized to point to the new structure itself; fields of protection 'o' -can not be initialized by Scheme programs.") + "Create a new structure.\n\n" + "@var{type} must be a vtable structure (@xref{Vtables}).\n\n" + "@var{tail-elts} must be a non-negative integer. If the layout\n" + "specification indicated by @var{type} includes a tail-array,\n" + "this is the number of elements allocated to that array.\n\n" + "The @var{inits} are optional arguments describing how successive fields\n" + "of the structure should be initialized. Only fields with protection 'r'\n" + "or 'w' can be initialized -- fields of protection 's' are automatically\n" + "initialized to point to the new structure itself; fields of protection 'o'\n" + "can not be initialized by Scheme programs.") #define FUNC_NAME s_scm_make_struct { SCM layout; @@ -422,71 +418,60 @@ can not be initialized by Scheme programs.") 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. - -@var{new-fields} is a layout specification describing fields -of the resulting structure beginning at the position bound to -@code{vtable-offset-user}. - -@var{tail-size} specifies the size of the tail-array (if any) of -this vtable. - -@var{inits} initializes the fields of the vtable. Minimally, one -initializer must be provided: the layout specification for instances -of the type this vtable will describe. If a second initializer is -provided, it will be interpreted as a print call-back function. - -@example -;;; loading ,a... -(define x - (make-vtable-vtable (make-struct-layout (quote pw)) - 0 - 'foo)) - -(struct? x) -@result{} #t -(struct-vtable? x) -@result{} #t -(eq? x (struct-vtable x)) -@result{} #t -(struct-ref x vtable-offset-user) -@result{} foo -(struct-ref x 0) -@result{} pruosrpwpw - - -(define y - (make-struct x - 0 - (make-struct-layout (quote pwpwpw)) - 'bar)) - -(struct? y) -@result{} #t -(struct-vtable? y) -@result{} #t -(eq? x y) -@result{} () -(eq? x (struct-vtable y)) -@result{} #t -(struct-ref y 0) -@result{} pwpwpw -(struct-ref y vtable-offset-user) -@result{} bar - - -(define z (make-struct y 0 'a 'b 'c)) - -(struct? z) -@result{} #t -(struct-vtable? z) -@result{} () -(eq? y (struct-vtable z)) -@result{} #t -(map (lambda (n) (struct-ref z n)) '(0 1 2)) -@result{} (a b c) -@end example -") + "Return a new, self-describing vtable structure.\n\n" + "@var{new-fields} is a layout specification describing fields\n" + "of the resulting structure beginning at the position bound to\n" + "@code{vtable-offset-user}.\n\n" + "@var{tail-size} specifies the size of the tail-array (if any) of\n" + "this vtable.\n\n" + "@var{inits} initializes the fields of the vtable. Minimally, one\n" + "initializer must be provided: the layout specification for instances\n" + "of the type this vtable will describe. If a second initializer is\n" + "provided, it will be interpreted as a print call-back function.\n\n" + "@example\n" + ";;; loading ,a...\n" + "(define x\n" + " (make-vtable-vtable (make-struct-layout (quote pw))\n" + " 0\n" + " 'foo))\n\n" + "(struct? x)\n" + "@result{} #t\n" + "(struct-vtable? x)\n" + "@result{} #t\n" + "(eq? x (struct-vtable x))\n" + "@result{} #t\n" + "(struct-ref x vtable-offset-user)\n" + "@result{} foo\n" + "(struct-ref x 0)\n" + "@result{} pruosrpwpw\n\n\n" + "(define y\n" + " (make-struct x\n" + " 0\n" + " (make-struct-layout (quote pwpwpw))\n" + " 'bar))\n\n" + "(struct? y)\n" + "@result{} #t\n" + "(struct-vtable? y)\n" + "@result{} #t\n" + "(eq? x y)\n" + "@result{} ()\n" + "(eq? x (struct-vtable y))\n" + "@result{} #t\n" + "(struct-ref y 0)\n" + "@result{} pwpwpw\n" + "(struct-ref y vtable-offset-user)\n" + "@result{} bar\n\n\n" + "(define z (make-struct y 0 'a 'b 'c))\n\n" + "(struct? z)\n" + "@result{} #t\n" + "(struct-vtable? z)\n" + "@result{} ()\n" + "(eq? y (struct-vtable z))\n" + "@result{} #t\n" + "(map (lambda (n) (struct-ref z n)) '(0 1 2))\n" + "@result{} (a b c)\n" + "@end example\n" + "") #define FUNC_NAME s_scm_make_vtable_vtable { SCM fields; @@ -524,13 +509,11 @@ provided, it will be interpreted as a print call-back function. 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}. - -If the field is of type 'p', then it can be set to an arbitrary value. - -If the field is of type 'u', then it can only be set to a non-negative -integer value small enough to fit in one machine word.") + "@deffnx primitive struct-set! struct n value\n" + "Access (or modify) the @var{n}th field of @var{struct}.\n\n" + "If the field is of type 'p', then it can be set to an arbitrary value.\n\n" + "If the field is of type 'u', then it can only be set to a non-negative\n" + "integer value small enough to fit in one machine word.") #define FUNC_NAME s_scm_struct_ref { SCM answer = SCM_UNDEFINED; @@ -609,7 +592,7 @@ integer value small enough to fit in one machine word.") 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 { SCM * data; @@ -683,7 +666,7 @@ SCM_DEFINE (scm_struct_set_x, "struct-set!", 3, 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}.") + "Return the vtable structure that describes the type of @var{struct}.") #define FUNC_NAME s_scm_struct_vtable { SCM_VALIDATE_STRUCT (1,handle); @@ -694,7 +677,7 @@ SCM_DEFINE (scm_struct_vtable, "struct-vtable", 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 { SCM_VALIDATE_VTABLE (1,handle); @@ -733,7 +716,7 @@ scm_struct_create_handle (SCM obj) SCM_DEFINE (scm_struct_vtable_name, "struct-vtable-name", 1, 0, 0, (SCM vtable), -"") + "") #define FUNC_NAME s_scm_struct_vtable_name { SCM_VALIDATE_VTABLE (1,vtable); @@ -743,7 +726,7 @@ SCM_DEFINE (scm_struct_vtable_name, "struct-vtable-name", 1, 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 { SCM_VALIDATE_VTABLE (1,vtable); diff --git a/libguile/symbols.c b/libguile/symbols.c index f45b0ce5c..9e0d70e10 100644 --- a/libguile/symbols.c +++ b/libguile/symbols.c @@ -503,9 +503,9 @@ table; instead, simply return @code{#f}.") 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 -with this name is already present.") + "Add a new symbol to @var{obarray} with name @var{string}, bound to an\n" + "unspecified initial value. The symbol table is not modified if a symbol\n" + "with this name is already present.") #define FUNC_NAME s_scm_intern_symbol { scm_sizet hval; @@ -540,9 +540,9 @@ with this name is already present.") 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} -otherwise.") + "Remove the symbol with name @var{string} from @var{obarray}. This\n" + "function returns @code{#t} if the symbol was present and @code{#f}\n" + "otherwise.") #define FUNC_NAME s_scm_unintern_symbol { scm_sizet hval; @@ -580,10 +580,10 @@ otherwise.") 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}, -use the global symbol table. If @var{string} is not interned in -@var{obarray}, an error is signalled.") + "Look up in @var{obarray} the symbol whose name is @var{string}, and\n" + "return the value to which it is bound. If @var{obarray} is @code{#f},\n" + "use the global symbol table. If @var{string} is not interned in\n" + "@var{obarray}, an error is signalled.") #define FUNC_NAME s_scm_symbol_binding { SCM vcell; @@ -599,8 +599,8 @@ use the global symbol table. If @var{string} is not interned in 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.") + "Return @var{#t} if @var{obarray} contains a symbol with name\n" + "@var{string}, and @var{#f} otherwise.") #define FUNC_NAME s_scm_symbol_interned_p { SCM vcell; @@ -620,11 +620,11 @@ SCM_DEFINE (scm_symbol_interned_p, "symbol-interned?", 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 -@var{symbol-bound?} in that the mere mention of a symbol usually causes -it to be interned; @code{symbol-bound?} determines whether a symbol has -been given any meaningful value.") + "Return @var{#t} if @var{obarray} contains a symbol with name\n" + "@var{string} bound to a defined value. This differs from\n" + "@var{symbol-bound?} in that the mere mention of a symbol usually causes\n" + "it to be interned; @code{symbol-bound?} determines whether a symbol has\n" + "been given any meaningful value.") #define FUNC_NAME s_scm_symbol_bound_p { SCM vcell; @@ -643,9 +643,9 @@ been given any meaningful value.") 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 -in @var{obarray}.") + "Find the symbol in @var{obarray} whose name is @var{string}, and rebind\n" + "it to @var{value}. An error is signalled if @var{string} is not present\n" + "in @var{obarray}.") #define FUNC_NAME s_scm_symbol_set_x { SCM vcell; @@ -678,7 +678,7 @@ msymbolize (SCM s) SCM_DEFINE (scm_symbol_fref, "symbol-fref", 1, 0, 0, (SCM s), -"Return the contents of @var{symbol}'s @dfn{function slot}.") + "Return the contents of @var{symbol}'s @dfn{function slot}.") #define FUNC_NAME s_scm_symbol_fref { SCM_VALIDATE_SYMBOL (1,s); @@ -693,7 +693,7 @@ SCM_DEFINE (scm_symbol_fref, "symbol-fref", 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}.") + "Return the @dfn{property list} currently associated with @var{symbol}.") #define FUNC_NAME s_scm_symbol_pref { SCM_VALIDATE_SYMBOL (1,s); @@ -708,7 +708,7 @@ SCM_DEFINE (scm_symbol_pref, "symbol-pref", 1, 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.") + "Change the binding of @var{symbol}'s function slot.") #define FUNC_NAME s_scm_symbol_fset_x { SCM_VALIDATE_SYMBOL (1,s); @@ -724,7 +724,7 @@ SCM_DEFINE (scm_symbol_fset_x, "symbol-fset!", 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.") + "Change the binding of @var{symbol}'s property slot.") #define FUNC_NAME s_scm_symbol_pset_x { SCM_VALIDATE_SYMBOL (1,s); @@ -740,8 +740,8 @@ SCM_DEFINE (scm_symbol_pset_x, "symbol-pset!", 2, 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.") + "Return the hash value derived from @var{symbol}'s name, i.e. the integer\n" + "index into @var{symbol}'s obarray at which it is stored.") #define FUNC_NAME s_scm_symbol_hash { SCM_VALIDATE_SYMBOL (1,s); @@ -779,8 +779,8 @@ copy_and_prune_obarray (SCM from, SCM to) SCM_DEFINE (scm_builtin_bindings, "builtin-bindings", 0, 0, 0, (), -"Create and return a copy of the global symbol table, removing all -unbound symbols.") + "Create and return a copy of the global symbol table, removing all\n" + "unbound symbols.") #define FUNC_NAME s_scm_builtin_bindings { int length = SCM_LENGTH (scm_symhash); @@ -793,7 +793,7 @@ unbound symbols.") SCM_DEFINE (scm_builtin_weak_bindings, "builtin-weak-bindings", 0, 0, 0, (), -"") + "") #define FUNC_NAME s_scm_builtin_weak_bindings { int length = SCM_LENGTH (scm_weak_symhash); @@ -809,9 +809,9 @@ static SCM gensym_prefix; /* :FIXME:OPTIMIZE */ 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 -prefix for the new symbol's name. The default prefix is @code{%%gensym}.") + "Create a new, unique symbol in @var{obarray}, using the global symbol\n" + "table by default. If @var{name} is specified, it should be used as a\n" + "prefix for the new symbol's name. The default prefix is @code{%%gensym}.") #define FUNC_NAME s_scm_gensym { SCM new; diff --git a/libguile/throw.c b/libguile/throw.c index 0fa41a83d..06214fa34 100644 --- a/libguile/throw.c +++ b/libguile/throw.c @@ -528,25 +528,20 @@ scm_handle_by_throw (void *handler_data, SCM tag, SCM args) 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}, -then @var{handler} is invoked this way: - -@example -(handler key args ...) -@end example - -@var{key} is a symbol or #t. - -@var{thunk} takes no arguments. If @var{thunk} returns normally, that -is the return value of @code{catch}. - -Handler is invoked outside the scope of its own @code{catch}. If -@var{handler} again throws to the same key, a new handler from further -up the call chain is invoked. - -If the key is @code{#t}, then a throw to @emph{any} symbol will match -this call to @code{catch}.") + "Invoke @var{thunk} in the dynamic context of @var{handler} for\n" + "exceptions matching @var{key}. If thunk throws to the symbol @var{key},\n" + "then @var{handler} is invoked this way:\n\n" + "@example\n" + "(handler key args ...)\n" + "@end example\n\n" + "@var{key} is a symbol or #t.\n\n" + "@var{thunk} takes no arguments. If @var{thunk} returns normally, that\n" + "is the return value of @code{catch}.\n\n" + "Handler is invoked outside the scope of its own @code{catch}. If\n" + "@var{handler} again throws to the same key, a new handler from further\n" + "up the call chain is invoked.\n\n" + "If the key is @code{#t}, then a throw to @emph{any} symbol will match\n" + "this call to @code{catch}.") #define FUNC_NAME s_scm_catch { struct scm_body_thunk_data c; @@ -571,7 +566,7 @@ this call to @code{catch}.") SCM_DEFINE (scm_lazy_catch, "lazy-catch", 3, 0, 0, (SCM tag, SCM thunk, SCM handler), -"") + "") #define FUNC_NAME s_scm_lazy_catch { struct scm_body_thunk_data c; @@ -600,13 +595,11 @@ SCM_DEFINE (scm_lazy_catch, "lazy-catch", 3, 0, 0, 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}. - -@var{key} is a symbol. It will match catches of the same symbol or of -#t. - -If there is no handler at all, an error is signaled.") + "Invoke the catch form matching @var{key}, passing @var{args} to the\n" + "@var{handler}. \n\n" + "@var{key} is a symbol. It will match catches of the same symbol or of\n" + "#t.\n\n" + "If there is no handler at all, an error is signaled.") #define FUNC_NAME s_scm_throw { SCM_VALIDATE_SYMBOL (1,key); diff --git a/libguile/unif.c b/libguile/unif.c index 85325d408..9948bed28 100644 --- a/libguile/unif.c +++ b/libguile/unif.c @@ -239,7 +239,7 @@ scm_make_uve (long k, SCM prot) SCM_DEFINE (scm_uniform_vector_length, "uniform-vector-length", 1, 0, 0, (SCM v), -"Returns the number of elements in @var{uve}.") + "Returns the number of elements in @var{uve}.") #define FUNC_NAME s_scm_uniform_vector_length { SCM_ASRTGO (SCM_NIMP (v), badarg1); @@ -269,10 +269,9 @@ SCM_DEFINE (scm_uniform_vector_length, "uniform-vector-length", 1, 0, 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. - -The @var{prototype} argument is used with uniform arrays and is described -elsewhere.") + "Returns @code{#t} if the @var{obj} is an array, and @code{#f} if not.\n\n" + "The @var{prototype} argument is used with uniform arrays and is described\n" + "elsewhere.") #define FUNC_NAME s_scm_array_p { int nprot; @@ -337,8 +336,8 @@ loop: 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.") + "Returns the number of dimensions of @var{obj}. If @var{obj} is not an\n" + "array, @code{0} is returned.") #define FUNC_NAME s_scm_array_rank { if (SCM_IMP (ra)) @@ -372,11 +371,11 @@ array, @code{0} is returned.") 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: -@example -(array-dimensions (make-array 'foo '(-1 3) 5)) @result{} ((-1 3) 5) -@end example") + "@code{Array-dimensions} is similar to @code{array-shape} but replaces\n" + "elements with a @code{0} minimum with one greater than the maximum. So:\n" + "@example\n" + "(array-dimensions (make-array 'foo '(-1 3) 5)) @result{} ((-1 3) 5)\n" + "@end example") #define FUNC_NAME s_scm_array_dimensions { SCM res = SCM_EOL; @@ -510,11 +509,11 @@ scm_shap2ra (SCM args, const char *what) 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 -@var{prototype} with dimensions @var{dims} or length @var{length}. If -@var{fill} is supplied, it's used to fill the array, otherwise -@var{prototype} is used.") + "@deffnx primitive make-uniform-vector length prototype [fill]\n" + "Creates and returns a uniform array or vector of type corresponding to\n" + "@var{prototype} with dimensions @var{dims} or length @var{length}. If\n" + "@var{fill} is supplied, it's used to fill the array, otherwise \n" + "@var{prototype} is used.") #define FUNC_NAME s_scm_dimensions_to_uniform_array { scm_sizet k, vlen = 1; @@ -621,21 +620,21 @@ scm_ra_set_contp (SCM ra) 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 -the new array into coordinates in the old array. A @var{mapper} must be -linear, and its range must stay within the bounds of the old array, but -it can be otherwise arbitrary. A simple example: -@example -(define fred (make-array #f 8 8)) -(define freds-diagonal - (make-shared-array fred (lambda (i) (list i i)) 8)) -(array-set! freds-diagonal 'foo 3) -(array-ref fred 3 3) @result{} foo -(define freds-center - (make-shared-array fred (lambda (i j) (list (+ 3 i) (+ 3 j))) 2 2)) -(array-ref freds-center 0 0) @result{} foo -@end example") + "@code{make-shared-array} can be used to create shared subarrays of other\n" + "arrays. The @var{mapper} is a function that translates coordinates in\n" + "the new array into coordinates in the old array. A @var{mapper} must be\n" + "linear, and its range must stay within the bounds of the old array, but\n" + "it can be otherwise arbitrary. A simple example:\n" + "@example\n" + "(define fred (make-array #f 8 8))\n" + "(define freds-diagonal\n" + " (make-shared-array fred (lambda (i) (list i i)) 8))\n" + "(array-set! freds-diagonal 'foo 3)\n" + "(array-ref fred 3 3) @result{} foo\n" + "(define freds-center\n" + " (make-shared-array fred (lambda (i j) (list (+ 3 i) (+ 3 j))) 2 2))\n" + "(array-ref freds-center 0 0) @result{} foo\n" + "@end example") #define FUNC_NAME s_scm_make_shared_array { SCM ra; @@ -747,25 +746,23 @@ it can be otherwise arbitrary. A simple example: /* args are RA . DIMS */ 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 -each dimension of @var{array}. @var{dim0}, @var{dim1}, @dots{} should -be integers between 0 and the rank of the array to be returned. Each -integer in that range must appear at least once in the argument list. - -The values of @var{dim0}, @var{dim1}, @dots{} correspond to dimensions -in the array to be returned, their positions in the argument list to -dimensions of @var{array}. Several @var{dim}s may have the same value, -in which case the returned array will have smaller rank than -@var{array}. - -examples: -@example -(transpose-array '#2((a b) (c d)) 1 0) @result{} #2((a c) (b d)) -(transpose-array '#2((a b) (c d)) 0 0) @result{} #1(a d) -(transpose-array '#3(((a b c) (d e f)) ((1 2 3) (4 5 6))) 1 1 0) @result{} - #2((a 4) (b 5) (c 6)) -@end example") + "Returns an array sharing contents with @var{array}, but with dimensions\n" + "arranged in a different order. There must be one @var{dim} argument for\n" + "each dimension of @var{array}. @var{dim0}, @var{dim1}, @dots{} should\n" + "be integers between 0 and the rank of the array to be returned. Each\n" + "integer in that range must appear at least once in the argument list.\n\n" + "The values of @var{dim0}, @var{dim1}, @dots{} correspond to dimensions\n" + "in the array to be returned, their positions in the argument list to\n" + "dimensions of @var{array}. Several @var{dim}s may have the same value,\n" + "in which case the returned array will have smaller rank than\n" + "@var{array}.\n\n" + "examples:\n" + "@example\n" + "(transpose-array '#2((a b) (c d)) 1 0) @result{} #2((a c) (b d))\n" + "(transpose-array '#2((a b) (c d)) 0 0) @result{} #1(a d)\n" + "(transpose-array '#3(((a b c) (d e f)) ((1 2 3) (4 5 6))) 1 1 0) @result{}\n" + " #2((a 4) (b 5) (c 6))\n" + "@end example") #define FUNC_NAME s_scm_transpose_array { SCM ra, res, vargs, *ve = &vargs; @@ -859,27 +856,24 @@ examples: /* args are RA . AXES */ 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 -resembling an array of shared arrays. The dimensions of each shared -array are the same as the @var{dim}th dimensions of the original array, -the dimensions of the outer array are the same as those of the original -array that did not match a @var{dim}. - -An enclosed array is not a general Scheme array. Its elements may not -be set using @code{array-set!}. Two references to the same element of -an enclosed array will be @code{equal?} but will not in general be -@code{eq?}. The value returned by @var{array-prototype} when given an -enclosed array is unspecified. - -examples: -@example -(enclose-array '#3(((a b c) (d e f)) ((1 2 3) (4 5 6))) 1) @result{} - #<enclosed-array (#1(a d) #1(b e) #1(c f)) (#1(1 4) #1(2 5) #1(3 6))> - -(enclose-array '#3(((a b c) (d e f)) ((1 2 3) (4 5 6))) 1 0) @result{} - #<enclosed-array #2((a 1) (d 4)) #2((b 2) (e 5)) #2((c 3) (f 6))> -@end example") + "@var{dim0}, @var{dim1} @dots{} should be nonnegative integers less than\n" + "the rank of @var{array}. @var{enclose-array} returns an array\n" + "resembling an array of shared arrays. The dimensions of each shared\n" + "array are the same as the @var{dim}th dimensions of the original array,\n" + "the dimensions of the outer array are the same as those of the original\n" + "array that did not match a @var{dim}.\n\n" + "An enclosed array is not a general Scheme array. Its elements may not\n" + "be set using @code{array-set!}. Two references to the same element of\n" + "an enclosed array will be @code{equal?} but will not in general be\n" + "@code{eq?}. The value returned by @var{array-prototype} when given an\n" + "enclosed array is unspecified.\n\n" + "examples:\n" + "@example\n" + "(enclose-array '#3(((a b c) (d e f)) ((1 2 3) (4 5 6))) 1) @result{}\n" + " #<enclosed-array (#1(a d) #1(b e) #1(c f)) (#1(1 4) #1(2 5) #1(3 6))>\n\n" + "(enclose-array '#3(((a b c) (d e f)) ((1 2 3) (4 5 6))) 1 0) @result{}\n" + " #<enclosed-array #2((a 1) (d 4)) #2((b 2) (e 5)) #2((c 3) (f 6))>\n" + "@end example") #define FUNC_NAME s_scm_enclose_array { SCM axv, ra, res, ra_inr; @@ -962,7 +956,7 @@ examples: 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.") + "Returns @code{#t} if its arguments would be acceptable to array-ref.") #define FUNC_NAME s_scm_array_in_bounds_p { SCM v, ind = SCM_EOL; @@ -1045,7 +1039,7 @@ SCM_REGISTER_PROC(s_array_ref, "array-ref", 1, 0, 1, scm_uniform_vector_ref); 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}.") + "Returns the element at the @code{(index1, index2)} element in @var{array}.") #define FUNC_NAME s_scm_uniform_vector_ref { long pos; @@ -1239,8 +1233,8 @@ SCM_REGISTER_PROC(s_uniform_array_set1_x, "uniform-array-set1!", 3, 0, 0, scm_ar PROC is used (and it's called from C too). */ 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.") + "Sets the element at the @code{(index1, index2)} element in @var{array} to\n" + "@var{new-value}. The value returned by array-set! is unspecified.") #define FUNC_NAME s_scm_array_set_x { long pos = 0; @@ -1345,17 +1339,16 @@ SCM_DEFINE (scm_array_set_x, "array-set!", 2, 0, 1, wouldn't have contiguous elements. */ 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 -without changing their order (last subscript changing fastest), then -@code{array-contents} returns that shared array, otherwise it returns -@code{#f}. All arrays made by @var{make-array} and -@var{make-uniform-array} may be unrolled, some arrays made by -@var{make-shared-array} may not be. - -If the optional argument @var{strict} is provided, a shared array will -be returned only if its elements are stored internally contiguous in -memory.") + "@deffnx primitive array-contents array strict\n" + "If @var{array} may be @dfn{unrolled} into a one dimensional shared array\n" + "without changing their order (last subscript changing fastest), then\n" + "@code{array-contents} returns that shared array, otherwise it returns\n" + "@code{#f}. All arrays made by @var{make-array} and\n" + "@var{make-uniform-array} may be unrolled, some arrays made by\n" + "@var{make-shared-array} may not be.\n\n" + "If the optional argument @var{strict} is provided, a shared array will\n" + "be returned only if its elements are stored internally contiguous in\n" + "memory.") #define FUNC_NAME s_scm_array_contents { SCM sra; @@ -1451,21 +1444,19 @@ scm_ra2contig (SCM ra, int copy) 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 -binary objects from @var{port-or-fdes}. -If an end of file is encountered during -uniform-array-read! the objects up to that point only are put into @var{ura} -(starting at the beginning) and the remainder of the array is -unchanged. - -The optional arguments @var{start} and @var{end} allow -a specified region of a vector (or linearized array) to be read, -leaving the remainder of the vector unchanged. - -@code{uniform-array-read!} returns the number of objects read. -@var{port-or-fdes} may be omitted, in which case it defaults to the value -returned by @code{(current-input-port)}.") + "@deffnx primitive uniform-vector-read! uve [port-or-fdes] [start] [end]\n" + "Attempts to read all elements of @var{ura}, in lexicographic order, as\n" + "binary objects from @var{port-or-fdes}.\n" + "If an end of file is encountered during\n" + "uniform-array-read! the objects up to that point only are put into @var{ura}\n" + "(starting at the beginning) and the remainder of the array is\n" + "unchanged.\n\n" + "The optional arguments @var{start} and @var{end} allow\n" + "a specified region of a vector (or linearized array) to be read,\n" + "leaving the remainder of the vector unchanged.\n\n" + "@code{uniform-array-read!} returns the number of objects read.\n" + "@var{port-or-fdes} may be omitted, in which case it defaults to the value\n" + "returned by @code{(current-input-port)}.") #define FUNC_NAME s_scm_uniform_array_read_x { SCM cra = SCM_UNDEFINED, v = ra; @@ -1609,18 +1600,16 @@ loop: 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 -@var{port-or-fdes}. - -The optional arguments @var{start} -and @var{end} allow -a specified region of a vector (or linearized array) to be written. - -The number of objects actually written is returned. -@var{port-or-fdes} may be -omitted, in which case it defaults to the value returned by -@code{(current-output-port)}.") + "@deffnx primitive uniform-vector-write uve [port-or-fdes] [start] [end]\n" + "Writes all elements of @var{ura} as binary objects to\n" + "@var{port-or-fdes}.\n\n" + "The optional arguments @var{start}\n" + "and @var{end} allow\n" + "a specified region of a vector (or linearized array) to be written.\n\n" + "The number of objects actually written is returned. \n" + "@var{port-or-fdes} may be\n" + "omitted, in which case it defaults to the value returned by\n" + "@code{(current-output-port)}.") #define FUNC_NAME s_scm_uniform_array_write { long sz, vlen, ans; @@ -1734,7 +1723,7 @@ static char cnt_tab[16] = SCM_DEFINE (scm_bit_count, "bit-count", 2, 0, 0, (SCM item, SCM seq), -"Returns the number occurrences of @var{bool} in @var{bv}.") + "Returns the number occurrences of @var{bool} in @var{bv}.") #define FUNC_NAME s_scm_bit_count { long i; @@ -1769,9 +1758,9 @@ SCM_DEFINE (scm_bit_count, "bit-count", 2, 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 -range @code{#f} is returned.") + "Returns the minimum index of an occurrence of @var{bool} in @var{bv}\n" + "which is at least @var{k}. If no @var{bool} occurs within the specified\n" + "range @code{#f} is returned.") #define FUNC_NAME s_scm_bit_position { long i, lenw, xbits, pos; @@ -1837,15 +1826,13 @@ range @code{#f} is returned.") 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 -inversion of uve is AND'ed into @var{bv}. - -If uve is a unsigned integer vector all the elements of uve must be -between 0 and the @code{LENGTH} of @var{bv}. The bits of @var{bv} -corresponding to the indexes in uve are set to @var{bool}. - -The return value is unspecified.") + "If uve is a bit-vector @var{bv} and uve must be of the same length. If\n" + "@var{bool} is @code{#t}, uve is OR'ed into @var{bv}; If @var{bool} is @code{#f}, the\n" + "inversion of uve is AND'ed into @var{bv}.\n\n" + "If uve is a unsigned integer vector all the elements of uve must be\n" + "between 0 and the @code{LENGTH} of @var{bv}. The bits of @var{bv}\n" + "corresponding to the indexes in uve are set to @var{bool}.\n\n" + "The return value is unspecified.") #define FUNC_NAME s_scm_bit_set_star_x { register long i, k, vlen; @@ -1899,11 +1886,11 @@ The return value is unspecified.") SCM_DEFINE (scm_bit_count_star, "bit-count*", 3, 0, 0, (SCM v, SCM kv, SCM obj), -"Returns -@example -(bit-count (bit-set*! (if bool bv (bit-invert! bv)) uve #t) #t). -@end example -@var{bv} is not modified.") + "Returns\n" + "@example\n" + "(bit-count (bit-set*! (if bool bv (bit-invert! bv)) uve #t) #t).\n" + "@end example\n" + "@var{bv} is not modified.") #define FUNC_NAME s_scm_bit_count_star { register long i, vlen, count = 0; @@ -1967,7 +1954,7 @@ SCM_DEFINE (scm_bit_count_star, "bit-count*", 3, 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.") + "Modifies @var{bv} by replacing each element with its negation.") #define FUNC_NAME s_scm_bit_invert_x { register long k; @@ -2050,7 +2037,7 @@ ra2l (SCM ra,scm_sizet base,scm_sizet k) 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}.") + "Returns a list consisting of all the elements, in order, of @var{array}.") #define FUNC_NAME s_scm_array_to_list { SCM res = SCM_EOL; @@ -2157,10 +2144,10 @@ static int l2ra(SCM lst, SCM ra, scm_sizet base, scm_sizet k); 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} -with elements the same as those of @var{lst}. Elements must be of the -appropriate type, no coercions are done.") + "@deffnx procedure list->uniform-vector prot lst\n" + "Returns a uniform array of the type indicated by prototype @var{prot}\n" + "with elements the same as those of @var{lst}. Elements must be of the\n" + "appropriate type, no coercions are done.") #define FUNC_NAME s_scm_list_to_uniform_array { SCM shp = SCM_EOL; @@ -2512,9 +2499,9 @@ tail: 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 -@code{make-uniform-array}.") + "Returns an object that would produce an array of the same type as\n" + "@var{array}, if used as the @var{prototype} for\n" + "@code{make-uniform-array}.") #define FUNC_NAME s_scm_array_prototype { int enclosed = 0; diff --git a/libguile/vectors.c b/libguile/vectors.c index e8f04d043..7417ec8b6 100644 --- a/libguile/vectors.c +++ b/libguile/vectors.c @@ -267,7 +267,7 @@ scm_vector_equal_p(SCM x, SCM y) 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!}.") + "Vector version of @code{substring-move-left!}.") #define FUNC_NAME s_scm_vector_move_left_x { long i; @@ -290,7 +290,7 @@ SCM_DEFINE (scm_vector_move_left_x, "vector-move-left!", 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!}.") + "Vector version of @code{substring-move-right!}.") #define FUNC_NAME s_scm_vector_move_right_x { long i; diff --git a/libguile/weaks.c b/libguile/weaks.c index 3c1a14b0b..1836de13e 100644 --- a/libguile/weaks.c +++ b/libguile/weaks.c @@ -57,9 +57,9 @@ 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 -@var{fill}. The default value for @var{fill} is the empty list.") + "Return a weak vector with @var{size} elements. If the optional\n" + "argument @var{fill} is given, all entries in the vector will be set to\n" + "@var{fill}. The default value for @var{fill} is the empty list.") #define FUNC_NAME s_scm_make_weak_vector { SCM v; @@ -79,11 +79,11 @@ SCM_REGISTER_PROC(s_list_to_weak_vector, "list->weak-vector", 1, 0, 0, scm_weak_ 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 -its arguments while @code{list->weak-vector} uses its only argument -@var{l} (a list) to construct a weak vector the same way -@code{vector->list} would.") + "@deffnx primitive list->weak-vector l\n" + "Construct a weak vector from a list: @code{weak-vector} uses the list of\n" + "its arguments while @code{list->weak-vector} uses its only argument\n" + "@var{l} (a list) to construct a weak vector the same way\n" + "@code{vector->list} would.") #define FUNC_NAME s_scm_weak_vector { SCM res; @@ -105,8 +105,8 @@ its arguments while @code{list->weak-vector} uses its only argument 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.") + "Return @var{#t} if @var{obj} is a weak vector. Note that all weak\n" + "hashes are also weak vectors.") #define FUNC_NAME s_scm_weak_vector_p { return SCM_BOOL(SCM_WVECTP (x) && !SCM_IS_WHVEC (x)); @@ -121,13 +121,12 @@ hashes are also weak vectors.") 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 -Return a weak hash table with @var{size} buckets. As with any hash -table, choosing a good size for the table requires some caution. - -You can modify weak hash tables in exactly the same way you would modify -regular hash tables. (@pxref{Hash Tables})") + "@deffnx primitive make-weak-value-hash-table size\n" + "@deffnx primitive make-doubly-weak-hash-table size\n" + "Return a weak hash table with @var{size} buckets. As with any hash\n" + "table, choosing a good size for the table requires some caution.\n\n" + "You can modify weak hash tables in exactly the same way you would modify\n" + "regular hash tables. (@pxref{Hash Tables})") #define FUNC_NAME s_scm_make_weak_key_hash_table { SCM v; @@ -143,7 +142,7 @@ regular hash tables. (@pxref{Hash Tables})") 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 { SCM v; @@ -160,7 +159,7 @@ SCM_DEFINE (scm_make_weak_value_hash_table, "make-weak-value-hash-table", 1, 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 { SCM v; @@ -175,11 +174,11 @@ SCM_DEFINE (scm_make_doubly_weak_hash_table, "make-doubly-weak-hash-table", 1, 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 -Return @var{#t} if @var{obj} is the specified weak hash table. Note -that a doubly weak hash table is neither a weak key nor a weak value -hash table.") + "@deffnx primitive weak-value-hash-table? obj\n" + "@deffnx primitive doubly-weak-hash-table? obj\n" + "Return @var{#t} if @var{obj} is the specified weak hash table. Note\n" + "that a doubly weak hash table is neither a weak key nor a weak value\n" + "hash table.") #define FUNC_NAME s_scm_weak_key_hash_table_p { return SCM_BOOL(SCM_WVECTP (x) && SCM_IS_WHVEC(x)); @@ -189,7 +188,7 @@ hash table.") 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 { return SCM_BOOL(SCM_WVECTP (x) && SCM_IS_WHVEC_V(x)); @@ -199,7 +198,7 @@ SCM_DEFINE (scm_weak_value_hash_table_p, "weak-value-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 { return SCM_BOOL(SCM_WVECTP (x) && SCM_IS_WHVEC_B (x)); |