1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-16 08:40:19 +02:00

* load.c (scm_primitive_load, scm_primitive_load_path),

(scm_sys_search_load_path): Corrected docstrings (file ->
	filename).

	* eval.c (scm_force): Added texinfo markup to docstring.
	(scm_promise_p): Renamed parameter to `obj' to match docstring.

	* debug-malloc.c: Reinserted #include <stdio.h>.
This commit is contained in:
Martin Grabmüller 2001-03-12 07:08:46 +00:00
parent e41561b490
commit 67e8151b65
4 changed files with 38 additions and 22 deletions

View file

@ -1,3 +1,14 @@
2001-03-12 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
* load.c (scm_primitive_load, scm_primitive_load_path),
(scm_sys_search_load_path): Corrected docstrings (file ->
filename).
* eval.c (scm_force): Added texinfo markup to docstring.
(scm_promise_p): Renamed parameter to `obj' to match docstring.
* debug-malloc.c: Reinserted #include <stdio.h>.
2001-03-11 Keisuke Nishida <kxn30@po.cwru.edu> 2001-03-11 Keisuke Nishida <kxn30@po.cwru.edu>
* list.c (s_scm_reverse_x): Use SCM_VALIDATE_LIST. * list.c (s_scm_reverse_x): Use SCM_VALIDATE_LIST.

View file

@ -40,6 +40,7 @@
* If you do not wish that, delete this exception notice. */ * If you do not wish that, delete this exception notice. */
#include <string.h> #include <string.h>
#include <stdio.h>
#include "libguile/_scm.h" #include "libguile/_scm.h"
#include "libguile/alist.h" #include "libguile/alist.h"

View file

@ -3760,9 +3760,10 @@ promise_print (SCM exp, SCM port, scm_print_state *pstate)
SCM_DEFINE (scm_force, "force", 1, 0, 0, SCM_DEFINE (scm_force, "force", 1, 0, 0,
(SCM x), (SCM x),
"If the promise X has not been computed yet, compute and return\n" "If the promise @var{x} has not been computed yet, compute and\n"
"X, otherwise just return the previously computed value.") "return @var{x}, otherwise just return the previously computed\n"
"value.")
#define FUNC_NAME s_scm_force #define FUNC_NAME s_scm_force
{ {
SCM_VALIDATE_SMOB (1, x, promise); SCM_VALIDATE_SMOB (1, x, promise);
@ -3783,12 +3784,12 @@ SCM_DEFINE (scm_force, "force", 1, 0, 0,
SCM_DEFINE (scm_promise_p, "promise?", 1, 0, 0, SCM_DEFINE (scm_promise_p, "promise?", 1, 0, 0,
(SCM x), (SCM obj),
"Return true if @var{obj} is a promise, i.e. a delayed computation\n" "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}).") "(@pxref{Delayed evaluation,,,r4rs.info,The Revised^4 Report on Scheme}).")
#define FUNC_NAME s_scm_promise_p #define FUNC_NAME s_scm_promise_p
{ {
return SCM_BOOL (SCM_TYP16_PREDICATE (scm_tc16_promise, x)); return SCM_BOOL (SCM_TYP16_PREDICATE (scm_tc16_promise, obj));
} }
#undef FUNC_NAME #undef FUNC_NAME

View file

@ -103,12 +103,13 @@ load (void *data)
SCM_DEFINE (scm_primitive_load, "primitive-load", 1, 0, 0, SCM_DEFINE (scm_primitive_load, "primitive-load", 1, 0, 0,
(SCM filename), (SCM filename),
"Load @var{file} and evaluate its contents in the top-level environment.\n" "Load the file named @var{filename} and evaluate its contents in\n"
"The load paths are not searched; @var{file} must either be a full\n" "the top-level environment. The load paths are not searched;\n"
"pathname or be a pathname relative to the current directory. If the\n" "@var{filename} must either be a full pathname or be a pathname\n"
"variable @code{%load-hook} is defined, it should be bound to a procedure\n" "relative to the current directory. If the variable\n"
"that will be called before any code is loaded. See documentation for\n" "@code{%load-hook} is defined, it should be bound to a procedure\n"
"@code{%load-hook} later in this section.") "that will be called before any code is loaded. See the\n"
"documentation for @code{%load-hook} later in this section.")
#define FUNC_NAME s_scm_primitive_load #define FUNC_NAME s_scm_primitive_load
{ {
SCM hook = *scm_loc_load_hook; SCM hook = *scm_loc_load_hook;
@ -409,13 +410,14 @@ SCM_DEFINE (scm_search_path, "search-path", 2, 1, 0,
If we find one, return its full filename; otherwise, return #f. If we find one, return its full filename; otherwise, return #f.
If FILENAME is absolute, return it unchanged. */ If FILENAME is absolute, return it unchanged. */
SCM_DEFINE (scm_sys_search_load_path, "%search-load-path", 1, 0, 0, SCM_DEFINE (scm_sys_search_load_path, "%search-load-path", 1, 0, 0,
(SCM filename), (SCM filename),
"Search @var{%load-path} for @var{file}, which must be readable by the\n" "Search @var{%load-path} for the file named @var{filename},\n"
"current user. If @var{file} is found in the list of paths to search or\n" "which must be readable by the current user. If @var{filename}\n"
"is an absolute pathname, return its full pathname. Otherwise, return\n" "is found in the list of paths to search or is an absolute\n"
"@code{#f}. Filenames may have any of the optional extensions in the\n" "pathname, return its full pathname. Otherwise, return\n"
"@code{%load-extensions} list; @code{%search-load-path} will try each\n" "@code{#f}. Filenames may have any of the optional extensions\n"
"extension automatically.") "in the @code{%load-extensions} list; @code{%search-load-path}\n"
"will try each extension automatically.")
#define FUNC_NAME s_scm_sys_search_load_path #define FUNC_NAME s_scm_sys_search_load_path
{ {
SCM path = *scm_loc_load_path; SCM path = *scm_loc_load_path;
@ -432,10 +434,11 @@ SCM_DEFINE (scm_sys_search_load_path, "%search-load-path", 1, 0, 0,
SCM_DEFINE (scm_primitive_load_path, "primitive-load-path", 1, 0, 0, SCM_DEFINE (scm_primitive_load_path, "primitive-load-path", 1, 0, 0,
(SCM filename), (SCM filename),
"Search @var{%load-path} for @var{file} and load it into the top-level\n" "Search @var{%load-path} for the file named @var{filename} and\n"
"environment. If @var{file} is a relative pathname and is not found in\n" "load it into the top-level environment. If @var{filename} is a\n"
"the list of search paths, an error is signalled.") "relative pathname and is not found in the list of search paths,\n"
"an error is signalled.")
#define FUNC_NAME s_scm_primitive_load_path #define FUNC_NAME s_scm_primitive_load_path
{ {
SCM full_filename; SCM full_filename;