[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
More docstrings
From: |
Martin Grabmueller |
Subject: |
More docstrings |
Date: |
Tue, 30 Jan 2001 23:17:49 +0100 |
Hello again,
as promised, here are even more docstring patches. After applying this
patch, the sources are nearly remaining-docs-needed-clean, except for
16 docstrings in goops.c.
Please note: I did my best to figure out what all these procedures are
supposed to do, but it was not always easy, and I am not sure that I
got it right for every single procedure.
I hope that someone with more internals wisdom could have a look at
the docstrings for at least the files `stacks.c', `backtrace.c' and
`throw.c'. I'm sorry, but I really could not figure out what some
procedures in `goops.c' do. Maybe someone can give me a hint, and I
can fix the remaining procedures.
(Hopefully, nobody gets hurt by this gigantic patch...)
Regards,
'martin
ChangeLog entry:
****************
2001-01-30 Martin Grabmueller <address@hidden>
* numbers.c (scm_lognot), random.c (s_scm_random,
scm_random_normal, scm_random_solid_sphere_x,
scm_random_hollow_sphere_x, scm_random_normal_vector_x,
scm_random_exp), dynwind.c
(scm_dynamic_wind): Removed unnecessary "" from docstring.
* goops.c (scm_sys_initialize_object, scm_instance_p,
scm_class_name, scm_class_precedence_list, scm_class_slots,
scm_class_environment, scm_generic_function_name,
scm_generic_function_methods, scm_method_generic_function,
scm_method_specializers, scm_method_procedure, scm_make_unbound,
scm_unbound_p, scm_assert_bound, scm_at_assert_bound_ref,
scm_sys_fast_slot_ref, scm_sys_fast_slot_set_x, scm_slot_ref,
scm_slot_set_x, _scm_slot_bound_p, scm_slots_exists_p,
scm_sys_allocate_instance, scm_make, scm_pure_generic_p,
scm_class_direct_supers, scm_class_direct_slots,
scm_class_direct_subclasses, scm_class_direct_methods,
scm_accessor_method_slot_definition, scm_sys_goops_loaded),
debug.c (scm_with_traps, scm_memoized_p, scm_make_gloc,
scm_gloc_p, scm_make_iloc, scm_iloc_p, scm_memcons,
scm_mem_to_proc, scm_proc_to_mem, scm_unmemoize,
scm_memoized_environment, scm_procedure_name,
scm_procedure_source, scm_procedure_environment, scm_debug_hang),
objects.c
(s_scm_class_of, scm_entity_p, scm_operator_p,
scm_set_object_procedure_x, scm_object_procedure,
scm_make_class_object), hooks.c (s_scm_make_hook_with_name,
scm_make_hook, scm_hook_p, scm_hook_empty_p, scm_add_hook_x,
scm_remove_hook_x, scm_reset_hook_x, scm_run_hook,
scm_hook_to_list), lang.c
(scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null, scm_nil_eq),
numbers.c (scm_sys_expt, scm_sys_atan2), macros.c
(scm_macro_name, scm_macro_transformer), print.c
(scm_print_options, scm_port_with_print_state,
scm_get_print_state), procs.c (scm_make_cclo, scm_procedure_p,
scm_closure_p, scm_thunk_p, scm_procedure_with_setter_p,
scm_make_procedure_with_setter, scm_procedure), throw.c
(scm_lazy_catch), modules.c (scm_standard_eval_closure), load.c
(scm_parse_path, scm_search_path), stacks.c (scm_make_stack,
scm_stack_ref, scm_stack_length, scm_frame_p,
scm_last_stack_frame, scm_frame_number, scm_frame_source,
scm_frame_procedure, scm_frame_arguments, scm_frame_previous,
scm_frame_next, scm_frame_real_p, scm_frame_procedure_p,
scm_frame_evaluating_args_p, scm_frame_overflow_p), filesys.c
(scm_dirname, scm_basename), dynwind.c
(scm_wind_chain), read.c (scm_read_options, scm_read,
scm_read_hash_extend), gc.c
(scm_unhash_name), eval.c (scm_eval_options_interface,
scm_evaluator_traps, s_scm_nconc2last), backtrace.c
(scm_display_error, scm_set_print_params_x,
scm_display_application, scm_display_backtrace, scm_backtrace),
async.c (scm_async, scm_system_async, scm_async_mark,
scm_system_async_mark, scm_run_asyncs, scm_noop,
scm_set_tick_rate, scm_set_switch_rate, scm_unmask_signals,
scm_mask_signals): Added docstrings.
Patch:
******
Index: async.c
===================================================================
RCS file: /cvs/guile/guile-core/libguile/async.c,v
retrieving revision 1.53
diff -u -r1.53 async.c
--- async.c 2000/12/08 17:32:56 1.53
+++ async.c 2001/01/30 22:07:07
@@ -287,8 +287,8 @@
SCM_DEFINE (scm_async, "async", 1, 0, 0,
- (SCM thunk),
-"")
+ (SCM thunk),
+ "Create a new async for the procedure @var{thunk}.")
#define FUNC_NAME s_scm_async
{
SCM_RETURN_NEWSMOB (tc16_async, SCM_UNPACK (thunk));
@@ -297,7 +297,8 @@
SCM_DEFINE (scm_system_async, "system-async", 1, 0, 0,
(SCM thunk),
-"")
+ "Create a new async for the procedure @var{thunk}. Also\n"
+ "add it to the system's list of active async objects.")
#define FUNC_NAME s_scm_system_async
{
SCM it;
@@ -314,7 +315,7 @@
SCM_DEFINE (scm_async_mark, "async-mark", 1, 0, 0,
(SCM a),
-"")
+ "Mark the async @var{a} for future execution.")
#define FUNC_NAME s_scm_async_mark
{
VALIDATE_ASYNC (1, a);
@@ -330,7 +331,7 @@
SCM_DEFINE (scm_system_async_mark, "system-async-mark", 1, 0, 0,
(SCM a),
-"")
+ "Mark the async @var{a} for future execution.")
#define FUNC_NAME s_scm_system_async_mark
{
VALIDATE_ASYNC (1, a);
@@ -349,8 +350,8 @@
SCM_DEFINE (scm_run_asyncs, "run-asyncs", 1, 0, 0,
- (SCM list_of_a),
-"")
+ (SCM list_of_a),
+ "Execute all thunks from the asyncs of the list @var{list_of_a}.")
#define FUNC_NAME s_scm_run_asyncs
{
#ifdef GUILE_OLD_ASYNC_CLICK
@@ -382,8 +383,9 @@
SCM_DEFINE (scm_noop, "noop", 0, 0, 1,
- (SCM args),
-"")
+ (SCM args),
+ "Do nothing. When called without arguments, return @code{#f},\n"
+ "otherwise return the first argument.")
#define FUNC_NAME s_scm_noop
{
SCM_VALIDATE_REST_ARGUMENT (args);
@@ -397,8 +399,9 @@
#ifdef GUILE_OLD_ASYNC_CLICK
SCM_DEFINE (scm_set_tick_rate, "set-tick-rate", 1, 0, 0,
- (SCM n),
-"")
+ (SCM n),
+ "Set the rate of async ticks to @var{n}. Return the old rate\n"
+ "value.")
#define FUNC_NAME s_scm_set_tick_rate
{
unsigned int old_n = scm_tick_rate;
@@ -414,8 +417,9 @@
SCM_DEFINE (scm_set_switch_rate, "set-switch-rate", 1, 0, 0,
- (SCM n),
-"")
+ (SCM n),
+ "Set the async switch rate to @var{n}. Return the old value\n"
+ "of the switch rate.")
#define FUNC_NAME s_scm_set_switch_rate
{
unsigned int old_n = scm_switch_rate;
@@ -432,8 +436,8 @@
SCM_DEFINE (scm_unmask_signals, "unmask-signals", 0, 0, 0,
- (),
-"")
+ (),
+ "Unmask signals. The returned value is not specified.")
#define FUNC_NAME s_scm_unmask_signals
{
scm_mask_ints = 0;
@@ -443,8 +447,8 @@
SCM_DEFINE (scm_mask_signals, "mask-signals", 0, 0, 0,
- (),
-"")
+ (),
+ "Mask signals. The returned value is not specified.")
#define FUNC_NAME s_scm_mask_signals
{
scm_mask_ints = 1;
Index: backtrace.c
===================================================================
RCS file: /cvs/guile/guile-core/libguile/backtrace.c,v
retrieving revision 1.59
diff -u -r1.59 backtrace.c
--- backtrace.c 2001/01/25 23:34:31 1.59
+++ backtrace.c 2001/01/30 22:07:10
@@ -254,7 +254,13 @@
SCM_DEFINE (scm_display_error, "display-error", 6, 0, 0,
(SCM stack, SCM port, SCM subr, SCM message, SCM args, SCM rest),
- "")
+ "Display an error message to the output port @var{port}.\n"
+ "@var{stack} is the saved stack for the error, @var{subr} is\n"
+ "the name of the procedure in which the error occured and\n"
+ "@var{message} is the actual error message, which may contain\n"
+ "formatting instructions. These will format the arguments in\n"
+ "the list @var{args} accordingly. @var{rest} is currently\n"
+ "ignored.")
#define FUNC_NAME s_scm_display_error
{
SCM_VALIDATE_OUTPUT_PORT (2, port);
@@ -283,7 +289,9 @@
#ifdef GUILE_DEBUG
SCM_DEFINE (scm_set_print_params_x, "set-print-params!", 1, 0, 0,
(SCM params),
-"")
+ "Set the print parameters to the values from @var{params}.\n"
+ "@var{params} must be a list of two-element lists which must\n"
+ "hold two integer values.")
#define FUNC_NAME s_scm_set_print_params_x
{
int i;
@@ -387,7 +395,9 @@
SCM_DEFINE (scm_display_application, "display-application", 1, 2, 0,
(SCM frame, SCM port, SCM indent),
-"")
+ "Display a procedure application @var{frame} to the output port\n"
+ "@var{port}. @var{indent} specifies the indentation of the\n"
+ "output.")
#define FUNC_NAME s_scm_display_application
{
SCM_VALIDATE_FRAME (1,frame);
@@ -600,8 +610,12 @@
#undef FUNC_NAME
SCM_DEFINE (scm_display_backtrace, "display-backtrace", 2, 2, 0,
- (SCM stack, SCM port, SCM first, SCM depth),
-"")
+ (SCM stack, SCM port, SCM first, SCM depth),
+ "Display a backtrace to the output port @var{port}. @var{stack}\n"
+ "is the stack to take the backtrace from, @var{first} specifies\n"
+ "where in the stack to start and @var{depth} how much frames\n"
+ "to display. Both @var{first} and @var{depth} can be @code{#f},\n"
+ "which means that default values will be used.")
#define FUNC_NAME s_scm_display_backtrace
{
struct display_backtrace_args a;
@@ -622,8 +636,9 @@
SCM_VCELL (scm_has_shown_backtrace_hint_p_var, "has-shown-backtrace-hint?");
SCM_DEFINE (scm_backtrace, "backtrace", 0, 0, 0,
- (),
-"")
+ (),
+ "Display a backtrace of the stack saved by the last error\n"
+ "to the current output port.")
#define FUNC_NAME s_scm_backtrace
{
SCM the_last_stack = scm_fluid_ref (SCM_CDR (scm_the_last_stack_fluid));
Index: debug.c
===================================================================
RCS file: /cvs/guile/guile-core/libguile/debug.c,v
retrieving revision 1.79
diff -u -r1.79 debug.c
--- debug.c 2000/12/11 14:48:23 1.79
+++ debug.c 2001/01/30 22:07:13
@@ -76,7 +76,9 @@
SCM_DEFINE (scm_debug_options, "debug-options-interface", 0, 1, 0,
(SCM setting),
-"")
+ "Option interface for the debug options. Instead of using\n"
+ "this procedure directly, use the procedures @code{debug-enable},\n"
+ "@code{debug-disable}, @code{debug-set!} and @var{debug-options}.")
#define FUNC_NAME s_scm_debug_options
{
SCM ans;
@@ -124,7 +126,7 @@
SCM_DEFINE (scm_with_traps, "with-traps", 1, 0, 0,
(SCM thunk),
-"")
+ "Call @var{thunk} with traps enabled.")
#define FUNC_NAME s_scm_with_traps
{
int trap_flag;
@@ -166,7 +168,7 @@
SCM_DEFINE (scm_memoized_p, "memoized?", 1, 0, 0,
(SCM obj),
-"")
+ "Return @code{#t} if @var{obj} is memoized.")
#define FUNC_NAME s_scm_memoized_p
{
return SCM_BOOL(SCM_MEMOIZEDP (obj));
@@ -255,7 +257,8 @@
SCM_DEFINE (scm_make_gloc, "make-gloc", 1, 1, 0,
(SCM var, SCM env),
-"")
+ "Create a gloc for variable @var{var} in the environment\n"
+ "@var{env}.")
#define FUNC_NAME s_scm_make_gloc
{
#if 1 /* Unsafe */
@@ -274,7 +277,7 @@
SCM_DEFINE (scm_gloc_p, "gloc?", 1, 0, 0,
(SCM obj),
-"")
+ "Return @code{#t} if @var{obj} is a gloc.")
#define FUNC_NAME s_scm_gloc_p
{
return SCM_BOOL((SCM_MEMOIZEDP (obj)
@@ -284,7 +287,8 @@
SCM_DEFINE (scm_make_iloc, "make-iloc", 3, 0, 0,
(SCM frame, SCM binding, SCM cdrp),
-"")
+ "Return a new iloc with frame offset @var{frame}, binding\n"
+ "offset @var{binding} and the cdr flag @var{cdrp}.")
#define FUNC_NAME s_scm_make_iloc
{
SCM_VALIDATE_INUM (1,frame);
@@ -298,7 +302,7 @@
SCM_DEFINE (scm_iloc_p, "iloc?", 1, 0, 0,
(SCM obj),
-"")
+ "Return @code{#t} if @var{obj} is an iloc.")
#define FUNC_NAME s_scm_iloc_p
{
return SCM_BOOL(SCM_ILOCP (obj));
@@ -307,7 +311,8 @@
SCM_DEFINE (scm_memcons, "memcons", 2, 1, 0,
(SCM car, SCM cdr, SCM env),
-"")
+ "Return a new memoized cons cell with @var{car} and @var{cdr}\n"
+ "as members and @var{env} as the environment.")
#define FUNC_NAME s_scm_memcons
{
if (SCM_MEMOIZEDP (car))
@@ -339,7 +344,8 @@
SCM_DEFINE (scm_mem_to_proc, "mem->proc", 1, 0, 0,
(SCM obj),
-"")
+ "Convert a memoized object (which must be a lambda expression)\n"
+ "to a procedure.")
#define FUNC_NAME s_scm_mem_to_proc
{
SCM env;
@@ -355,7 +361,7 @@
SCM_DEFINE (scm_proc_to_mem, "proc->mem", 1, 0, 0,
(SCM obj),
-"")
+ "Convert a procedure to a memoized object.")
#define FUNC_NAME s_scm_proc_to_mem
{
SCM_VALIDATE_CLOSURE (1, obj);
@@ -368,7 +374,7 @@
SCM_DEFINE (scm_unmemoize, "unmemoize", 1, 0, 0,
(SCM m),
-"")
+ "Unmemoize the memoized expression @var{m},")
#define FUNC_NAME s_scm_unmemoize
{
SCM_VALIDATE_MEMOIZED (1,m);
@@ -378,7 +384,7 @@
SCM_DEFINE (scm_memoized_environment, "memoized-environment", 1, 0, 0,
(SCM m),
-"")
+ "Return the environment of the memoized expression @var{m}.")
#define FUNC_NAME s_scm_memoized_environment
{
SCM_VALIDATE_MEMOIZED (1,m);
@@ -388,7 +394,7 @@
SCM_DEFINE (scm_procedure_name, "procedure-name", 1, 0, 0,
(SCM proc),
-"")
+ "Return the name of the procedure @var{proc}")
#define FUNC_NAME s_scm_procedure_name
{
SCM_VALIDATE_PROC (1,proc);
@@ -414,7 +420,7 @@
SCM_DEFINE (scm_procedure_source, "procedure-source", 1, 0, 0,
(SCM proc),
-"")
+ "Return the source of the procedure @var{proc}.")
#define FUNC_NAME s_scm_procedure_source
{
SCM_VALIDATE_NIM (1,proc);
@@ -448,7 +454,7 @@
SCM_DEFINE (scm_procedure_environment, "procedure-environment", 1, 0, 0,
(SCM proc),
-"")
+ "Return the environment of the procedure @var{proc}.")
#define FUNC_NAME s_scm_procedure_environment
{
SCM_VALIDATE_NIM (1,proc);
@@ -567,7 +573,7 @@
SCM_DEFINE (scm_debug_object_p, "debug-object?", 1, 0, 0,
(SCM obj),
- "")
+ "Return @code{#t} if @var{obj} is a debug object.")
#define FUNC_NAME s_scm_debug_object_p
{
return SCM_BOOL(SCM_DEBUGOBJP (obj));
@@ -593,7 +599,8 @@
#ifdef GUILE_DEBUG
SCM_DEFINE (scm_debug_hang, "debug-hang", 0, 1, 0,
(SCM obj),
- "")
+ "Go into an endless loop, which can be only terminated with\n"
+ "a debugger.")
#define FUNC_NAME s_scm_debug_hang
{
int go = 0;
Index: dynwind.c
===================================================================
RCS file: /cvs/guile/guile-core/libguile/dynwind.c,v
retrieving revision 1.32
diff -u -r1.32 dynwind.c
--- dynwind.c 2000/12/08 17:32:56 1.32
+++ dynwind.c 2001/01/30 22:07:14
@@ -113,8 +113,7 @@
"@result{} normal-binding\n\n"
"a-cont\n"
"@result{} special-binding\n"
- "@end example\n"
- "")
+ "@end example\n")
#define FUNC_NAME s_scm_dynamic_wind
{
SCM ans;
@@ -172,7 +171,9 @@
#ifdef GUILE_DEBUG
SCM_DEFINE (scm_wind_chain, "wind-chain", 0, 0, 0,
(),
- "")
+ "Return the current wind chain. The wind chain contains all\n"
+ "information required by @code{dynamic-wind} to call its\n"
+ "argument thunks when entering/exiting its scope.")
#define FUNC_NAME s_scm_wind_chain
{
return scm_dynwinds;
Index: eval.c
===================================================================
RCS file: /cvs/guile/guile-core/libguile/eval.c,v
retrieving revision 1.192
diff -u -r1.192 eval.c
--- eval.c 2001/01/29 18:23:34 1.192
+++ eval.c 2001/01/30 22:07:28
@@ -1672,7 +1672,9 @@
SCM_DEFINE (scm_eval_options_interface, "eval-options-interface", 0, 1, 0,
(SCM setting),
- "")
+ "Option interface for the evaluation options. Instead of using\n"
+ "this procedure directly, use the procedures @code{eval-enable},\n"
+ "@code{eval-disable}, @code{eval-set!} and @var{eval-options}.")
#define FUNC_NAME s_scm_eval_options_interface
{
SCM ans;
@@ -1689,7 +1691,7 @@
SCM_DEFINE (scm_evaluator_traps, "evaluator-traps-interface", 0, 1, 0,
(SCM setting),
- "")
+ "Option interface for the evaluator trap options.")
#define FUNC_NAME s_scm_evaluator_traps
{
SCM ans;
@@ -3163,8 +3165,14 @@
they're referring to, send me a patch to this comment. */
SCM_DEFINE (scm_nconc2last, "apply:nconc2last", 1, 0, 0,
- (SCM lst),
- "")
+ (SCM lst),
+ "Given a list (@var{arg1} @dots{} @var{args}), this function\n"
+ "conses the @var{arg1} @dots{} arguments onto the front of\n"
+ "@var{args}, and returns the resulting list. Note that\n"
+ "@var{args} is a list; thus, the argument to this function is\n"
+ "a list whose last element is a list.\n"
+ "Note: Rather than do new consing, @code{apply:nconc2last}\n"
+ "destroys its argument, so use with care.")
#define FUNC_NAME s_scm_nconc2last
{
SCM *lloc;
Index: filesys.c
===================================================================
RCS file: /cvs/guile/guile-core/libguile/filesys.c,v
retrieving revision 1.90
diff -u -r1.90 filesys.c
--- filesys.c 2001/01/24 21:45:09 1.90
+++ filesys.c 2001/01/30 22:07:34
@@ -1352,7 +1352,9 @@
SCM_DEFINE (scm_dirname, "dirname", 1, 0, 0,
(SCM filename),
- "")
+ "Return the directory name component of the file name\n"
+ "@var{filename}. If @var{filename} does not contain a directory\n"
+ "component, @code{.} is returned.")
#define FUNC_NAME s_scm_dirname
{
char *s;
@@ -1382,7 +1384,10 @@
SCM_DEFINE (scm_basename, "basename", 1, 1, 0,
(SCM filename, SCM suffix),
- "")
+ "Return the base name of the file name @var{filename}. The\n"
+ "base name is the file name without any directory components.\n"
+ "If @var{suffix} is privided, and is equal to the end of\n"
+ "@var{basename}, it is removed also.")
#define FUNC_NAME s_scm_basename
{
char *f, *s = 0;
Index: gc.c
===================================================================
RCS file: /cvs/guile/guile-core/libguile/gc.c,v
retrieving revision 1.177
diff -u -r1.177 gc.c
--- gc.c 2001/01/11 21:03:18 1.177
+++ gc.c 2001/01/30 22:07:44
@@ -2271,7 +2271,8 @@
SCM_DEFINE (scm_unhash_name, "unhash-name", 1, 0, 0,
(SCM name),
- "")
+ "Flushes the glocs for @var{name}, or all glocs if @var{name}\n"
+ "is @code{#t}.")
#define FUNC_NAME s_scm_unhash_name
{
int x;
Index: goops.c
===================================================================
RCS file: /cvs/guile/guile-core/libguile/goops.c,v
retrieving revision 1.14
diff -u -r1.14 goops.c
--- goops.c 2001/01/27 00:13:55 1.14
+++ goops.c 2001/01/30 22:07:55
@@ -393,7 +393,8 @@
SCM_DEFINE (scm_sys_initialize_object, "%initialize-object", 2, 0, 0,
(SCM obj, SCM initargs),
- "")
+ "Initialize the object @var{obj} with the given arguments\n"
+ "@var{initargs}.")
#define FUNC_NAME s_scm_sys_initialize_object
{
SCM tmp, get_n_set, slots;
@@ -778,7 +779,7 @@
SCM_DEFINE (scm_instance_p, "instance?", 1, 0, 0,
(SCM obj),
- "")
+ "Return @code{#t} if @var{obj} is an instance.")
#define FUNC_NAME s_scm_instance_p
{
return SCM_BOOL (SCM_INSTANCEP (obj));
@@ -793,7 +794,7 @@
******************************************************************************/
SCM_DEFINE (scm_class_name, "class-name", 1, 0, 0,
(SCM obj),
- "")
+ "Return the class name of @var{obj}.")
#define FUNC_NAME s_scm_class_name
{
SCM_VALIDATE_CLASS (1, obj);
@@ -803,7 +804,7 @@
SCM_DEFINE (scm_class_direct_supers, "class-direct-supers", 1, 0, 0,
(SCM obj),
- "")
+ "Return the direct superclasses of the class @var{obj}.")
#define FUNC_NAME s_scm_class_direct_supers
{
SCM_VALIDATE_CLASS (1, obj);
@@ -813,7 +814,7 @@
SCM_DEFINE (scm_class_direct_slots, "class-direct-slots", 1, 0, 0,
(SCM obj),
- "")
+ "Return the direct slots of the class @var{obj}.")
#define FUNC_NAME s_scm_class_direct_slots
{
SCM_VALIDATE_CLASS (1, obj);
@@ -823,7 +824,7 @@
SCM_DEFINE (scm_class_direct_subclasses, "class-direct-subclasses", 1, 0, 0,
(SCM obj),
- "")
+ "Return the direct subclasses of the class @var{obj}.")
#define FUNC_NAME s_scm_class_direct_subclasses
{
SCM_VALIDATE_CLASS (1, obj);
@@ -833,7 +834,7 @@
SCM_DEFINE (scm_class_direct_methods, "class-direct-methods", 1, 0, 0,
(SCM obj),
- "")
+ "Return the direct methods of the class @var{obj}")
#define FUNC_NAME s_scm_class_direct_methods
{
SCM_VALIDATE_CLASS (1, obj);
@@ -843,7 +844,7 @@
SCM_DEFINE (scm_class_precedence_list, "class-precedence-list", 1, 0, 0,
(SCM obj),
- "")
+ "Return the class precedence list of the class @var{obj}.")
#define FUNC_NAME s_scm_class_precedence_list
{
SCM_VALIDATE_CLASS (1, obj);
@@ -853,7 +854,7 @@
SCM_DEFINE (scm_class_slots, "class-slots", 1, 0, 0,
(SCM obj),
- "")
+ "Return the slot list of the class @var{obj}.")
#define FUNC_NAME s_scm_class_slots
{
SCM_VALIDATE_CLASS (1, obj);
@@ -863,7 +864,7 @@
SCM_DEFINE (scm_class_environment, "class-environment", 1, 0, 0,
(SCM obj),
- "")
+ "Return the environment of the class @var{obj}.")
#define FUNC_NAME s_scm_class_environment
{
SCM_VALIDATE_CLASS (1, obj);
@@ -874,7 +875,7 @@
SCM_DEFINE (scm_generic_function_name, "generic-function-name", 1, 0, 0,
(SCM obj),
- "")
+ "Return the name of the generic function @var{obj}.")
#define FUNC_NAME s_scm_generic_function_name
{
SCM_VALIDATE_GENERIC (1, obj);
@@ -884,7 +885,7 @@
SCM_DEFINE (scm_generic_function_methods, "generic-function-methods", 1, 0, 0,
(SCM obj),
- "")
+ "Return the methods of the generic function @var{obj}.")
#define FUNC_NAME s_scm_generic_function_methods
{
SCM_VALIDATE_GENERIC (1, obj);
@@ -895,7 +896,7 @@
SCM_DEFINE (scm_method_generic_function, "method-generic-function", 1, 0, 0,
(SCM obj),
- "")
+ "Return the generic function fot the method @var{obj}.")
#define FUNC_NAME s_scm_method_generic_function
{
SCM_VALIDATE_METHOD (1, obj);
@@ -905,7 +906,7 @@
SCM_DEFINE (scm_method_specializers, "method-specializers", 1, 0, 0,
(SCM obj),
- "")
+ "Return specializers of the method @var{obj}.")
#define FUNC_NAME s_scm_method_specializers
{
SCM_VALIDATE_METHOD (1, obj);
@@ -915,7 +916,7 @@
SCM_DEFINE (scm_method_procedure, "method-procedure", 1, 0, 0,
(SCM obj),
- "")
+ "Return the procedure of the method @var{obj}.")
#define FUNC_NAME s_scm_method_procedure
{
SCM_VALIDATE_METHOD (1, obj);
@@ -925,7 +926,7 @@
SCM_DEFINE (scm_accessor_method_slot_definition,
"accessor-method-slot-definition", 1, 0, 0,
(SCM obj),
- "")
+ "Return the slot definition of the accessor @var{obj}.")
#define FUNC_NAME s_scm_accessor_method_slot_definition
{
SCM_VALIDATE_ACCESSOR (1, obj);
@@ -942,7 +943,7 @@
SCM_DEFINE (scm_make_unbound, "make-unbound", 0, 0, 0,
(),
- "")
+ "Return the unbound value.")
#define FUNC_NAME s_scm_make_unbound
{
return SCM_GOOPS_UNBOUND;
@@ -951,7 +952,7 @@
SCM_DEFINE (scm_unbound_p, "unbound?", 1, 0, 0,
(SCM obj),
- "")
+ "Return @code{#t} if @var{obj} is unbound.")
#define FUNC_NAME s_scm_unbound_p
{
return SCM_GOOPS_UNBOUNDP (obj) ? SCM_BOOL_T : SCM_BOOL_F;
@@ -960,7 +961,8 @@
SCM_DEFINE (scm_assert_bound, "assert-bound", 2, 0, 0,
(SCM value, SCM obj),
- "")
+ "Return @var{value} if it is bound, and invoke the\n"
+ "@var{slot-unbound} method of @var{obj} if it is not.")
#define FUNC_NAME s_scm_assert_bound
{
if (SCM_GOOPS_UNBOUNDP (value))
@@ -971,7 +973,8 @@
SCM_DEFINE (scm_at_assert_bound_ref, "@assert-bound-ref", 2, 0, 0,
(SCM obj, SCM index),
- "")
+ "Like @code{assert-bound}, but use @var{index} for accessing\n"
+ "the value from @var{obj}.")
#define FUNC_NAME s_scm_at_assert_bound_ref
{
SCM value = SCM_SLOT (obj, SCM_INUM (index));
@@ -983,7 +986,7 @@
SCM_DEFINE (scm_sys_fast_slot_ref, "%fast-slot-ref", 2, 0, 0,
(SCM obj, SCM index),
- "")
+ "Return the slot value with index @var{index} from @var{obj}.")
#define FUNC_NAME s_scm_sys_fast_slot_ref
{
register long i;
@@ -999,7 +1002,8 @@
SCM_DEFINE (scm_sys_fast_slot_set_x, "%fast-slot-set!", 3, 0, 0,
(SCM obj, SCM index, SCM value),
- "")
+ "Set the slot with index @var{index} in @var{obj} to\n"
+ "@var{value}.")
#define FUNC_NAME s_scm_sys_fast_slot_set_x
{
register long i;
@@ -1190,7 +1194,8 @@
SCM_DEFINE (scm_slot_ref, "slot-ref", 2, 0, 0,
(SCM obj, SCM slot_name),
- "")
+ "Return the value from @var{obj}'s slot with the name\n"
+ "@var{slot_name}.")
#define FUNC_NAME s_scm_slot_ref
{
SCM res, class;
@@ -1207,7 +1212,7 @@
SCM_DEFINE (scm_slot_set_x, "slot-set!", 3, 0, 0,
(SCM obj, SCM slot_name, SCM value),
- "")
+ "Set the slot named @var{slot_name} of @var{obj} to @var{value}.")
#define FUNC_NAME s_scm_slot_set_x
{
SCM class;
@@ -1223,7 +1228,8 @@
SCM_DEFINE (scm_slot_bound_p, "slot-bound?", 2, 0, 0,
(SCM obj, SCM slot_name),
- "")
+ "Return @code{#t} if the slot named @var{slot_name} of @var{obj}\n"
+ "is bound.")
#define FUNC_NAME s_scm_slot_bound_p
{
SCM class;
@@ -1241,7 +1247,7 @@
SCM_DEFINE (scm_slots_exists_p, "slot-exists?", 2, 0, 0,
(SCM obj, SCM slot_name),
- "")
+ "Return @code{#t} if @var{obj} has a slot named @var{slot_name}.")
#define FUNC_NAME s_scm_slots_exists_p
{
SCM class;
@@ -1283,7 +1289,8 @@
SCM_DEFINE (scm_sys_allocate_instance, "%allocate-instance", 2, 0, 0,
(SCM class, SCM initargs),
- "")
+ "Create a new instance of class @var{class} and initialize it\n"
+ "from the arguments @var{initargs}.")
#define FUNC_NAME s_scm_sys_allocate_instance
{
SCM *m;
@@ -1963,7 +1970,8 @@
SCM_DEFINE (scm_make, "make", 0, 0, 1,
(SCM args),
- "")
+ "Make a new object. @var{args} mist contain the class and\n"
+ "all necessary initialization information.")
#define FUNC_NAME s_scm_make
{
SCM class, z;
@@ -2597,7 +2605,7 @@
SCM_DEFINE (scm_pure_generic_p, "pure-generic?", 1, 0, 0,
(SCM obj),
- "")
+ "Return @code{#t} if @var{obj} is a pure generic.")
#define FUNC_NAME s_scm_pure_generic_p
{
return SCM_BOOL (SCM_PUREGENERICP (obj));
@@ -2612,7 +2620,8 @@
SCM_DEFINE (scm_sys_goops_loaded, "%goops-loaded", 0, 0, 0,
(),
- "")
+ "Announce that GOOPS is loaded and perform initialization\n"
+ "on the C level which depends on the loaded GOOPS modules.")
#define FUNC_NAME s_scm_sys_goops_loaded
{
goops_loaded_p = 1;
Index: hooks.c
===================================================================
RCS file: /cvs/guile/guile-core/libguile/hooks.c,v
retrieving revision 1.9
diff -u -r1.9 hooks.c
--- hooks.c 2000/12/12 14:07:06 1.9
+++ hooks.c 2001/01/30 22:07:57
@@ -212,7 +212,8 @@
SCM_DEFINE (scm_make_hook_with_name, "make-hook-with-name", 1, 1, 0,
(SCM name, SCM n_args),
-"")
+ "Create a named hook with the name @var{name} for storing\n"
+ "procedures of arity @var{n_args}.")
#define FUNC_NAME s_scm_make_hook_with_name
{
SCM hook = make_hook (n_args, FUNC_NAME);
@@ -226,7 +227,7 @@
SCM_DEFINE (scm_make_hook, "make-hook", 0, 1, 0,
(SCM n_args),
-"")
+ "Create a hook for storing procedure of arity @var{n_args}.")
#define FUNC_NAME s_scm_make_hook
{
return make_hook (n_args, FUNC_NAME);
@@ -236,7 +237,7 @@
SCM_DEFINE (scm_hook_p, "hook?", 1, 0, 0,
(SCM x),
-"")
+ "Return @code{#t} if @var{x} is a hook.")
#define FUNC_NAME s_scm_hook_p
{
return SCM_BOOL (SCM_HOOKP (x));
@@ -246,7 +247,7 @@
SCM_DEFINE (scm_hook_empty_p, "hook-empty?", 1, 0, 0,
(SCM hook),
-"")
+ "Return @code{#t} if @var{hook} is an empty hook.")
#define FUNC_NAME s_scm_hook_empty_p
{
SCM_VALIDATE_HOOK (1, hook);
@@ -257,7 +258,9 @@
SCM_DEFINE (scm_add_hook_x, "add-hook!", 2, 1, 0,
(SCM hook, SCM proc, SCM append_p),
-"")
+ "Add the procedure @var{proc} to the hook @var{hook}. The\n"
+ "procedure is added to the end if @var{append_p} is true,\n"
+ "otherwise it is added to the front.")
#define FUNC_NAME s_scm_add_hook_x
{
SCM arity, rest;
@@ -283,7 +286,7 @@
SCM_DEFINE (scm_remove_hook_x, "remove-hook!", 2, 0, 0,
(SCM hook, SCM proc),
-"")
+ "Remove the procedure @var{proc} from the hook @var{hook}.")
#define FUNC_NAME s_scm_remove_hook_x
{
SCM_VALIDATE_HOOK (1, hook);
@@ -296,7 +299,7 @@
SCM_DEFINE (scm_reset_hook_x, "reset-hook!", 1, 0, 0,
(SCM hook),
-"")
+ "Remove all procedures from the hook @var{hook}.")
#define FUNC_NAME s_scm_reset_hook_x
{
SCM_VALIDATE_HOOK (1,hook);
@@ -308,7 +311,8 @@
SCM_DEFINE (scm_run_hook, "run-hook", 1, 0, 1,
(SCM hook, SCM args),
-"")
+ "Apply all procedures from the hook @var{hook} to the arguments\n"
+ "@var{args}.")
#define FUNC_NAME s_scm_run_hook
{
SCM_VALIDATE_HOOK (1,hook);
@@ -335,7 +339,7 @@
SCM_DEFINE (scm_hook_to_list, "hook->list", 1, 0, 0,
(SCM hook),
-"")
+ "Convert the procedure list of @var{hook} to a list.")
#define FUNC_NAME s_scm_hook_to_list
{
SCM_VALIDATE_HOOK (1, hook);
Index: lang.c
===================================================================
RCS file: /cvs/guile/guile-core/libguile/lang.c,v
retrieving revision 1.18
diff -u -r1.18 lang.c
--- lang.c 2000/11/17 16:25:04 1.18
+++ lang.c 2001/01/30 22:07:57
@@ -66,7 +66,9 @@
SCM_DEFINE (scm_nil_cons, "nil-cons", 2, 0, 0,
(SCM x, SCM y),
-"")
+ "Create a new cons cell with @var{x} as the car and @var{y} as\n"
+ "the cdr, but convert @var{y} to Scheme's end-of-list if it is\n"
+ "a LISP nil.")
#define FUNC_NAME s_scm_nil_cons
{
register SCM z;
@@ -80,7 +82,8 @@
SCM_DEFINE (scm_nil_car, "nil-car", 1, 0, 0,
(SCM x),
-"")
+ "Return the car of @var{x}, but convert it to LISP nil if it\n"
+ "is Scheme's end-of-list.")
#define FUNC_NAME s_scm_nil_car
{
if (SCM_NILP (x))
@@ -92,7 +95,8 @@
SCM_DEFINE (scm_nil_cdr, "nil-cdr", 1, 0, 0,
(SCM x),
-"")
+ "Return the cdr of @var{x}, but convert it to LISP nil if it\n"
+ "is Scheme's end-of-list.")
#define FUNC_NAME s_scm_nil_cdr
{
if (SCM_NILP (x))
@@ -106,7 +110,8 @@
Could use SCM_BOOL, below, otherwise */
SCM_DEFINE (scm_null, "null", 1, 0, 0,
(SCM x),
-"")
+ "Return LISP's @code{t} if @var{x} is nil in the LISP sense,\n"
+ "return LISP's nil otherwise.")
#define FUNC_NAME s_scm_null
{
return (SCM_NILP (x) || SCM_NULLP (x) || SCM_FALSEP (x)) ? scm_lisp_t :
scm_lisp_nil;
@@ -134,7 +139,8 @@
Could use SCM_BOOL, below, otherwise */
SCM_DEFINE1 (scm_nil_eq, "nil-eq", scm_tc7_rpsubr,
(SCM x, SCM y),
-"")
+ "Compare @var{x} and @var{y} and return LISP's t if they are\n"
+ "@code{eq?}, return LISP's nil otherwise.")
#define FUNC_NAME s_scm_nil_eq
{
return ((SCM_EQ_P (x, y)
Index: load.c
===================================================================
RCS file: /cvs/guile/guile-core/libguile/load.c,v
retrieving revision 1.50
diff -u -r1.50 load.c
--- load.c 2001/01/26 17:30:54 1.50
+++ load.c 2001/01/30 22:08:00
@@ -224,7 +224,10 @@
SCM_DEFINE (scm_parse_path, "parse-path", 1, 1, 0,
(SCM path, SCM tail),
- "")
+ "Parse @var{path}, which is expected to be a colon-separated\n"
+ "string, into a list and return the resulting list with\n"
+ "@var{tail} appended. If @var{path} is @code{#f}, @var{tail}\n"
+ "is returned.")
#define FUNC_NAME s_scm_parse_path
{
SCM_ASSERT (SCM_FALSEP (path) || (SCM_STRINGP (path)),
@@ -269,7 +272,13 @@
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),
- "")
+ "Search @var{path} for a directory containing a file named\n"
+ "@var{filename}. The file must be readable, and not a directory.\n"
+ "If we find one, return its full filename; otherwise, return\n"
+ "@code{#f}. If @var{filename} is absolute, return it unchanged.\n"
+ "If given, @var{extensions} is a list of strings; for each\n"
+ "directory in @var{path}, we search for @var{filename}\n"
+ "concatenated with each @var{extension}.")
#define FUNC_NAME s_scm_search_path
{
char *filename_chars;
Index: macros.c
===================================================================
RCS file: /cvs/guile/guile-core/libguile/macros.c,v
retrieving revision 1.24
diff -u -r1.24 macros.c
--- macros.c 2000/12/08 17:32:56 1.24
+++ macros.c 2001/01/30 22:08:01
@@ -148,7 +148,7 @@
SCM_DEFINE (scm_macro_name, "macro-name", 1, 0, 0,
(SCM m),
- "")
+ "Return the name of the macro @var{m}.")
#define FUNC_NAME s_scm_macro_name
{
SCM_VALIDATE_SMOB (1,m,macro);
@@ -159,7 +159,7 @@
SCM_DEFINE (scm_macro_transformer, "macro-transformer", 1, 0, 0,
(SCM m),
- "")
+ "Return the transformer of the macro @var{m}.")
#define FUNC_NAME s_scm_macro_transformer
{
SCM_VALIDATE_SMOB (1,m,macro);
Index: modules.c
===================================================================
RCS file: /cvs/guile/guile-core/libguile/modules.c,v
retrieving revision 1.17
diff -u -r1.17 modules.c
--- modules.c 2000/12/08 17:32:56 1.17
+++ modules.c 2001/01/30 22:08:06
@@ -259,7 +259,7 @@
SCM_DEFINE (scm_standard_eval_closure, "standard-eval-closure", 1, 0, 0,
(SCM module),
- "")
+ "Return an eval closure for the module @var{module}.")
#define FUNC_NAME s_scm_standard_eval_closure
{
SCM_RETURN_NEWSMOB (scm_tc16_eval_closure, SCM_UNPACK (module));
Index: numbers.c
===================================================================
RCS file: /cvs/guile/guile-core/libguile/numbers.c,v
retrieving revision 1.111
diff -u -r1.111 numbers.c
--- numbers.c 2001/01/17 18:15:30 1.111
+++ numbers.c 2001/01/30 22:08:16
@@ -1081,8 +1081,7 @@
" @result{} \"-10000001\"\n"
"(number->string (lognot #b0) 2)\n"
" @result{} \"-1\"\n"
- "@end lisp\n"
- "")
+ "@end lisp\n")
#define FUNC_NAME s_scm_lognot
{
return scm_difference (SCM_MAKINUM (-1L), n);
@@ -3980,7 +3979,8 @@
SCM_DEFINE (scm_sys_expt, "$expt", 2, 0, 0,
(SCM z1, SCM z2),
- "")
+ "Return @var{z1} raised to the power or @var{z2}. This\n"
+ "procedure does not accept complex arguments.")
#define FUNC_NAME s_scm_sys_expt
{
struct dpair xy;
@@ -3992,7 +3992,11 @@
SCM_DEFINE (scm_sys_atan2, "$atan2", 2, 0, 0,
(SCM z1, SCM z2),
- "")
+ "Return the arc tangent of the two arguments @var{z1} and\n"
+ "@var{z2}. This is similar to calculating the arc tangent of\n"
+ "@var{z1} / @var{z2}, except that the signs of both arguments\n"
+ "are used to determine the quadrant of the result. This\n"
+ "procedure does not accept complex arguments.")
#define FUNC_NAME s_scm_sys_atan2
{
struct dpair xy;
Index: objects.c
===================================================================
RCS file: /cvs/guile/guile-core/libguile/objects.c,v
retrieving revision 1.54
diff -u -r1.54 objects.c
--- objects.c 2000/12/16 20:25:08 1.54
+++ objects.c 2001/01/30 22:08:18
@@ -85,7 +85,7 @@
/* This function is used for efficient type dispatch. */
SCM_DEFINE (scm_class_of, "class-of", 1, 0, 0,
(SCM x),
- "")
+ "Return the class of @var{x}.")
#define FUNC_NAME s_scm_class_of
{
switch (SCM_ITAG3 (x))
@@ -356,7 +356,7 @@
SCM_DEFINE (scm_entity_p, "entity?", 1, 0, 0,
(SCM obj),
-"")
+ "Return @code{#t} if @var{obj} is an entity.")
#define FUNC_NAME s_scm_entity_p
{
return SCM_BOOL(SCM_STRUCTP (obj) && SCM_I_ENTITYP (obj));
@@ -365,7 +365,7 @@
SCM_DEFINE (scm_operator_p, "operator?", 1, 0, 0,
(SCM obj),
-"")
+ "Return @code{#t} if @var{obj} is an operator.")
#define FUNC_NAME s_scm_operator_p
{
return SCM_BOOL(SCM_STRUCTP (obj)
@@ -376,7 +376,8 @@
SCM_DEFINE (scm_set_object_procedure_x, "set-object-procedure!", 2, 0, 0,
(SCM obj, SCM proc),
-"")
+ "Return the object procedure of @var{obj} to @var{proc}.\n"
+ "@var{obj} must be either an entity or an operator.")
#define FUNC_NAME s_scm_set_object_procedure_x
{
SCM_ASSERT (SCM_STRUCTP (obj)
@@ -399,7 +400,8 @@
#ifdef GUILE_DEBUG
SCM_DEFINE (scm_object_procedure, "object-procedure", 1, 0, 0,
(SCM obj),
-"")
+ "Return the object procedure of @var{obj}. @var{obj} must be\n"
+ "an entity or an operator.")
#define FUNC_NAME s_scm_object_procedure
{
SCM_ASSERT (SCM_STRUCTP (obj)
@@ -434,7 +436,8 @@
SCM_DEFINE (scm_make_class_object, "make-class-object", 2, 0, 0,
(SCM metaclass, SCM layout),
-"")
+ "Create a new class object of class @var{metaclass}, with the\n"
+ "slot layout specified by @var{layout}.")
#define FUNC_NAME s_scm_make_class_object
{
unsigned long flags = 0;
@@ -448,7 +451,8 @@
SCM_DEFINE (scm_make_subclass_object, "make-subclass-object", 2, 0, 0,
(SCM class, SCM layout),
-"")
+ "Create a subclass object of @var{class}, with the slot layout\n"
+ "specified by @var{layout}.")
#define FUNC_NAME s_scm_make_subclass_object
{
SCM pl;
Index: print.c
===================================================================
RCS file: /cvs/guile/guile-core/libguile/print.c,v
retrieving revision 1.110
diff -u -r1.110 print.c
--- print.c 2000/12/28 16:49:09 1.110
+++ print.c 2001/01/30 22:08:22
@@ -135,7 +135,9 @@
SCM_DEFINE (scm_print_options, "print-options-interface", 0, 1, 0,
(SCM setting),
-"")
+ "Option interface for the print options. Instead of using\n"
+ "this procedure directly, use the procedures @code{print-enable},\n"
+ "@code{print-disable}, @code{print-set!} and @var{print-options}.")
#define FUNC_NAME s_scm_print_options
{
SCM ans = scm_options (setting,
@@ -1102,7 +1104,8 @@
SCM_DEFINE (scm_port_with_print_state, "port-with-print-state", 2, 0, 0,
(SCM port, SCM pstate),
- "")
+ "Create a new port which behaves like @var{port}, but with an\n"
+ "included print state @var{pstate}.")
#define FUNC_NAME s_scm_port_with_print_state
{
SCM pwps;
@@ -1116,7 +1119,8 @@
SCM_DEFINE (scm_get_print_state, "get-print-state", 1, 0, 0,
(SCM port),
- "")
+ "Return the print state of the port @var{port}. If @var{port}\n"
+ "has no associated print state, @code{#f} is returned.")
#define FUNC_NAME s_scm_get_print_state
{
if (SCM_PORT_WITH_PS_P (port))
Index: procs.c
===================================================================
RCS file: /cvs/guile/guile-core/libguile/procs.c,v
retrieving revision 1.50
diff -u -r1.50 procs.c
--- procs.c 2000/12/28 15:09:56 1.50
+++ procs.c 2001/01/30 22:08:24
@@ -179,7 +179,8 @@
#ifdef GUILE_DEBUG
SCM_DEFINE (scm_make_cclo, "make-cclo", 2, 0, 0,
(SCM proc, SCM len),
-"")
+ "Create a compiled closure for @var{proc}, which reserves\n"
+ "@var{len} objects for its usage.")
#define FUNC_NAME s_scm_make_cclo
{
return scm_makcclo (proc, SCM_INUM (len));
@@ -191,8 +192,8 @@
SCM_DEFINE (scm_procedure_p, "procedure?", 1, 0, 0,
- (SCM obj),
-"")
+ (SCM obj),
+ "Return @code{#t} if @var{obj} is a procedure.")
#define FUNC_NAME s_scm_procedure_p
{
if (SCM_NIMP (obj))
@@ -219,7 +220,7 @@
SCM_DEFINE (scm_closure_p, "closure?", 1, 0, 0,
(SCM obj),
-"")
+ "Return @code{#t} if @var{obj} is a closure.")
#define FUNC_NAME s_scm_closure_p
{
return SCM_BOOL(SCM_CLOSUREP (obj));
@@ -227,8 +228,8 @@
#undef FUNC_NAME
SCM_DEFINE (scm_thunk_p, "thunk?", 1, 0, 0,
- (SCM obj),
-"")
+ (SCM obj),
+ "Return @code{#t} if @var{obj} is a thunk.")
#define FUNC_NAME s_scm_thunk_p
{
if (SCM_NIMP (obj))
@@ -314,7 +315,8 @@
SCM_DEFINE (scm_procedure_with_setter_p, "procedure-with-setter?", 1, 0, 0,
(SCM obj),
- "")
+ "Return @code{#t} if @var{obj} is a procedure with an\n"
+ "associated setter procedure.")
#define FUNC_NAME s_scm_procedure_with_setter_p
{
return SCM_BOOL(SCM_PROCEDURE_WITH_SETTER_P (obj));
@@ -323,7 +325,8 @@
SCM_DEFINE (scm_make_procedure_with_setter, "make-procedure-with-setter", 2,
0, 0,
(SCM procedure, SCM setter),
- "")
+ "Create a new procedure which behaves like @var{procedure}, but\n"
+ "with the associated setter @var{setter}.")
#define FUNC_NAME s_scm_make_procedure_with_setter
{
SCM z;
@@ -341,7 +344,8 @@
SCM_DEFINE (scm_procedure, "procedure", 1, 0, 0,
(SCM proc),
- "")
+ "Return the procedure of @var{proc}, which must be either a\n"
+ "procedure with setter, or an operator struct.")
#define FUNC_NAME s_scm_procedure
{
SCM_VALIDATE_NIM (1, proc);
Index: random.c
===================================================================
RCS file: /cvs/guile/guile-core/libguile/random.c,v
retrieving revision 1.36
diff -u -r1.36 random.c
--- random.c 2000/12/08 17:32:56 1.36
+++ random.c 2001/01/30 22:08:27
@@ -363,8 +363,7 @@
"`seed->random-state'. It defaults to the value of the variable\n"
"*random-state*. This object is used to maintain the state of\n"
"the pseudo-random-number generator and is altered as a side\n"
- "effect of the random operation.\n"
- "")
+ "effect of the random operation.")
#define FUNC_NAME s_scm_random
{
if (SCM_UNBNDP (state))
@@ -427,8 +426,7 @@
"Returns an inexact real in a normal distribution.\n"
"The distribution used has mean 0 and standard deviation 1.\n"
"For a normal distribution with mean m and standard deviation\n"
- "d use @code{(+ m (* d (random:normal)))}.\n"
- "")
+ "d use @code{(+ m (* d (random:normal)))}.")
#define FUNC_NAME s_scm_random_normal
{
if (SCM_UNBNDP (state))
@@ -484,8 +482,7 @@
"Thinking of vect as coordinates in space of \n"
"dimension n = (vector-length vect), the coordinates \n"
"are uniformly distributed within the unit n-shere.\n"
- "The sum of the squares of the numbers is returned.\n"
- "")
+ "The sum of the squares of the numbers is returned.")
#define FUNC_NAME s_scm_random_solid_sphere_x
{
SCM_VALIDATE_VECTOR_OR_DVECTOR (1,v);
@@ -508,8 +505,7 @@
"Thinking of vect as coordinates in space of \n"
"dimension n = (vector-length vect), the coordinates\n"
"are uniformly distributed over the surface of the \n"
- "unit n-shere.\n"
- "")
+ "unit n-shere.")
#define FUNC_NAME s_scm_random_hollow_sphere_x
{
SCM_VALIDATE_VECTOR_OR_DVECTOR (1,v);
@@ -527,8 +523,7 @@
(SCM v, SCM state),
"Fills vect with inexact real random numbers that are\n"
"independent and standard normally distributed\n"
- "(i.e., with mean 0 and variance 1).\n"
- "")
+ "(i.e., with mean 0 and variance 1).")
#define FUNC_NAME s_scm_random_normal_vector_x
{
int n;
@@ -552,8 +547,7 @@
SCM_DEFINE (scm_random_exp, "random:exp", 0, 1, 0,
(SCM state),
"Returns an inexact real in an exponential distribution with mean
1.\n"
- "For an exponential distribution with mean u use (* u
(random:exp)).\n"
- "")
+ "For an exponential distribution with mean u use (* u
(random:exp)).")
#define FUNC_NAME s_scm_random_exp
{
if (SCM_UNBNDP (state))
Index: read.c
===================================================================
RCS file: /cvs/guile/guile-core/libguile/read.c,v
retrieving revision 1.62
diff -u -r1.62 read.c
--- read.c 2000/12/08 17:08:34 1.62
+++ read.c 2001/01/30 22:08:29
@@ -79,7 +79,9 @@
SCM_DEFINE (scm_read_options, "read-options-interface", 0, 1, 0,
(SCM setting),
-"")
+ "Option interface for the read options. Instead of using\n"
+ "this procedure directly, use the procedures @code{read-enable},\n"
+ "@code{read-disable}, @code{read-set!} and @var{read-options}.")
#define FUNC_NAME s_scm_read_options
{
SCM ans = scm_options (setting,
@@ -97,7 +99,9 @@
SCM_DEFINE (scm_read, "read", 0, 1, 0,
(SCM port),
-"")
+ "Read an s-expression from the input port @var{port}, or from\n"
+ "the current input port if @var{port} is not specified.\n"
+ "Any whitespace before the next token is discarded.")
#define FUNC_NAME s_scm_read
{
int c;
@@ -725,7 +729,11 @@
Scheme, but maybe it will also be used by C code during initialisation. */
SCM_DEFINE (scm_read_hash_extend, "read-hash-extend", 2, 0, 0,
(SCM chr, SCM proc),
-"")
+ "Install the procedure @var{proc} for reading expressions\n"
+ "starting with the character sequence @code{#} and @var{chr}.\n"
+ "@var{proc} will be called with two arguments: the character\n"
+ "@var{chr} and the port to read further data from. The object\n"
+ "returned will be the return value of @code{read}.")
#define FUNC_NAME s_scm_read_hash_extend
{
SCM this;
Index: stacks.c
===================================================================
RCS file: /cvs/guile/guile-core/libguile/stacks.c,v
retrieving revision 1.53
diff -u -r1.53 stacks.c
--- stacks.c 2000/12/12 18:36:35 1.53
+++ stacks.c 2001/01/30 22:08:33
@@ -414,7 +414,12 @@
SCM_DEFINE (scm_make_stack, "make-stack", 1, 0, 1,
(SCM obj, SCM args),
- "")
+ "Create a new stack. If @var{obj} is @code{#t}, the current\n"
+ "evaluation stack is used for creating the stack frames,\n"
+ "otherwise the frames are taken from @var{obj} (which must be\n"
+ "either a debug object or a continuation).\n"
+ "@var{args} must be a list if integers and specifies how the\n"
+ "resulting stack will be narrowed.")
#define FUNC_NAME s_scm_make_stack
{
int n, maxp, size;
@@ -541,7 +546,7 @@
SCM_DEFINE (scm_stack_ref, "stack-ref", 2, 0, 0,
(SCM stack, SCM i),
- "")
+ "Return the @var{i}'th frame from @var{stack}.")
#define FUNC_NAME s_scm_stack_ref
{
SCM_VALIDATE_STACK (1,stack);
@@ -554,8 +559,8 @@
#undef FUNC_NAME
SCM_DEFINE (scm_stack_length, "stack-length", 1, 0, 0,
- (SCM stack),
- "")
+ (SCM stack),
+ "Return the length of @var{stack}.")
#define FUNC_NAME s_scm_stack_length
{
SCM_VALIDATE_STACK (1,stack);
@@ -568,7 +573,7 @@
SCM_DEFINE (scm_frame_p, "frame?", 1, 0, 0,
(SCM obj),
- "")
+ "Return @code{#t} if @var{obj} is a stack frame.")
#define FUNC_NAME s_scm_frame_p
{
return SCM_BOOL(SCM_FRAMEP (obj));
@@ -576,8 +581,10 @@
#undef FUNC_NAME
SCM_DEFINE (scm_last_stack_frame, "last-stack-frame", 1, 0, 0,
- (SCM obj),
- "")
+ (SCM obj),
+ "Return a stack which consists of a single frame, which is the\n"
+ "last stack frame for @var{obj}. @var{obj} must be either a\n"
+ "debug object or a continuation.")
#define FUNC_NAME s_scm_last_stack_frame
{
scm_debug_frame *dframe;
@@ -617,8 +624,8 @@
#undef FUNC_NAME
SCM_DEFINE (scm_frame_number, "frame-number", 1, 0, 0,
- (SCM frame),
- "")
+ (SCM frame),
+ "Return the frame number of @var{frame}.")
#define FUNC_NAME s_scm_frame_number
{
SCM_VALIDATE_FRAME (1,frame);
@@ -627,8 +634,8 @@
#undef FUNC_NAME
SCM_DEFINE (scm_frame_source, "frame-source", 1, 0, 0,
- (SCM frame),
- "")
+ (SCM frame),
+ "Return the source of @var{frame}.")
#define FUNC_NAME s_scm_frame_source
{
SCM_VALIDATE_FRAME (1,frame);
@@ -637,8 +644,9 @@
#undef FUNC_NAME
SCM_DEFINE (scm_frame_procedure, "frame-procedure", 1, 0, 0,
- (SCM frame),
- "")
+ (SCM frame),
+ "Return the procedure for @var{frame}, or @code{#f} if no\n"
+ "procedure is associated with @var{frame}.")
#define FUNC_NAME s_scm_frame_procedure
{
SCM_VALIDATE_FRAME (1,frame);
@@ -649,8 +657,8 @@
#undef FUNC_NAME
SCM_DEFINE (scm_frame_arguments, "frame-arguments", 1, 0, 0,
- (SCM frame),
- "")
+ (SCM frame),
+ "Return the arguments of @var{frame}.")
#define FUNC_NAME s_scm_frame_arguments
{
SCM_VALIDATE_FRAME (1,frame);
@@ -659,8 +667,9 @@
#undef FUNC_NAME
SCM_DEFINE (scm_frame_previous, "frame-previous", 1, 0, 0,
- (SCM frame),
- "")
+ (SCM frame),
+ "Return the previous frame of @var{frame}, or @code{#f} if\n"
+ "@var{frame} is the first frame in its stack.")
#define FUNC_NAME s_scm_frame_previous
{
int n;
@@ -675,7 +684,8 @@
SCM_DEFINE (scm_frame_next, "frame-next", 1, 0, 0,
(SCM frame),
- "")
+ "Return the next frame of @var{frame}, or @code{#f} if\n"
+ "@var{frame} is the last frame in its stack.")
#define FUNC_NAME s_scm_frame_next
{
int n;
@@ -689,8 +699,8 @@
#undef FUNC_NAME
SCM_DEFINE (scm_frame_real_p, "frame-real?", 1, 0, 0,
- (SCM frame),
- "")
+ (SCM frame),
+ "Return @code{#t} if @var{frame} is a real frame.")
#define FUNC_NAME s_scm_frame_real_p
{
SCM_VALIDATE_FRAME (1,frame);
@@ -699,8 +709,8 @@
#undef FUNC_NAME
SCM_DEFINE (scm_frame_procedure_p, "frame-procedure?", 1, 0, 0,
- (SCM frame),
- "")
+ (SCM frame),
+ "Return @code{#t} if a procedure is associated with @var{frame}.")
#define FUNC_NAME s_scm_frame_procedure_p
{
SCM_VALIDATE_FRAME (1,frame);
@@ -709,8 +719,8 @@
#undef FUNC_NAME
SCM_DEFINE (scm_frame_evaluating_args_p, "frame-evaluating-args?", 1, 0, 0,
- (SCM frame),
- "")
+ (SCM frame),
+ "Return @code{#t} if @var{frame} contains evaluated arguments.")
#define FUNC_NAME s_scm_frame_evaluating_args_p
{
SCM_VALIDATE_FRAME (1,frame);
@@ -719,8 +729,8 @@
#undef FUNC_NAME
SCM_DEFINE (scm_frame_overflow_p, "frame-overflow?", 1, 0, 0,
- (SCM frame),
- "")
+ (SCM frame),
+ "Return @code{#t} if @var{frame} is an overflow frame.")
#define FUNC_NAME s_scm_frame_overflow_p
{
SCM_VALIDATE_FRAME (1,frame);
Index: throw.c
===================================================================
RCS file: /cvs/guile/guile-core/libguile/throw.c,v
retrieving revision 1.75
diff -u -r1.75 throw.c
--- throw.c 2001/01/24 15:58:46 1.75
+++ throw.c 2001/01/30 22:08:36
@@ -551,7 +551,9 @@
SCM_DEFINE (scm_lazy_catch, "lazy-catch", 3, 0, 0,
(SCM tag, SCM thunk, SCM handler),
- "")
+ "This behaves exactly like @code{catch}, except that it does\n"
+ "not unwind the stack (this is the major difference), and if\n"
+ "handler returns, its value is returned from the throw.")
#define FUNC_NAME s_scm_lazy_catch
{
struct scm_body_thunk_data c;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- More docstrings,
Martin Grabmueller <=