1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 20:00:19 +02:00

Docstring updates.

This commit is contained in:
Marius Vollmer 2005-03-04 17:55:49 +00:00
parent ba1b72235a
commit 69d2000d93
3 changed files with 49 additions and 35 deletions

View file

@ -394,7 +394,16 @@ scm_handler (void *d, SCM tag, SCM args)
SCM_DEFINE (scm_with_continuation_barrier, "with-continuation-barrier", 1,0,0,
(SCM proc),
"Call @var{proc} and return the returned value but do not allow the invocation of continuations that would exit or reenter the dynamic extent of the call to @var{proc}. When a uncaught throw happens during the call to @var{proc}, a message is printed to the current error port and @code{#f} is returned.")
"Call @var{proc} and return its result. Do not allow the invocation of\n"
"continuations that would leave or enter the dynamic extent of the call\n"
"to @code{with-continuation-barrier}. Such an attempt causes an error\n"
"to be signaled.\n"
"\n"
"Throws (such as errors) that are not caught from within @var{proc} are\n"
"caught by @code{with-continuation-barrier}. In that case, a short\n"
"message is printed to the current error port and @code{#f} is returned.\n"
"\n"
"Thus, @code{with-continuation-barrier} returns exactly once.\n")
#define FUNC_NAME s_scm_with_continuation_barrier
{
struct scm_data scm_data;

View file

@ -77,17 +77,21 @@ race_error ()
SCM_DEFINE (scm_string_any, "string-any-c-code", 2, 2, 0,
(SCM char_pred, SCM s, SCM start, SCM end),
"Check if the predicate @var{pred} is true for any character in\n"
"the string @var{s}.\n"
"\n"
"Calls to @var{pred} are made from left to right across @var{s}.\n"
"When it returns true (ie.@: non-@code{#f}), that return value\n"
"is the return from @code{string-any}.\n"
"\n"
"The SRFI-13 specification requires that the call to @var{pred}\n"
"on the last character of @var{s} (assuming that point is\n"
"reached) be a tail call, but currently in Guile this is not the\n"
"case.")
"Check if @var{char_pred} is true for any character in string @var{s}.\n"
"\n"
"@var{char_pred} can be a character to check for any equal to that, or\n"
"a character set (@pxref{Character Sets}) to check for any in that set,\n"
"or a predicate procedure to call.\n"
"\n"
"For a procedure, calls @code{(@var{char_pred} c)} are made\n"
"successively on the characters from @var{start} to @var{end}. If\n"
"@var{char_pred} returns true (ie.@: non-@code{#f}), @code{string-any}\n"
"stops and that return value is the return from @code{string-any}. The\n"
"call on the last character (ie.@: at @math{@var{end}-1}), if that\n"
"point is reached, is a tail call.\n"
"\n"
"If there are no characters in @var{s} (ie.@: @var{start} equals\n"
"@var{end}) then the return is @code{#f}.\n")
#define FUNC_NAME s_scm_string_any
{
const char *cstr;
@ -136,21 +140,22 @@ SCM_DEFINE (scm_string_any, "string-any-c-code", 2, 2, 0,
SCM_DEFINE (scm_string_every, "string-every-c-code", 2, 2, 0,
(SCM char_pred, SCM s, SCM start, SCM end),
"Check if the predicate @var{pred} is true for every character\n"
"in the string @var{s}.\n"
"\n"
"Calls to @var{pred} are made from left to right across @var{s}.\n"
"If the predicate is true for every character then the return\n"
"value from the last @var{pred} call is the return from\n"
"@code{string-every}.\n"
"\n"
"If there are no characters in @var{s} (ie.@: @var{start} equals\n"
"@var{end}) then the return is @code{#t}.\n"
"\n"
"The SRFI-13 specification requires that the call to @var{pred}\n"
"on the last character of @var{s} (assuming that point is\n"
"reached) be a tail call, but currently in Guile this is not the\n"
"case.")
"Check if @var{char_pred} is true for every character in string\n"
"@var{s}.\n"
"\n"
"@var{char_pred} can be a character to check for every character equal\n"
"to that, or a character set (@pxref{Character Sets}) to check for\n"
"every character being in that set, or a predicate procedure to call.\n"
"\n"
"For a procedure, calls @code{(@var{char_pred} c)} are made\n"
"successively on the characters from @var{start} to @var{end}. If\n"
"@var{char_pred} returns @code{#f}, @code{string-every} stops and\n"
"returns @code{#f}. The call on the last character (ie.@: at\n"
"@math{@var{end}-1}), if that point is reached, is a tail call and the\n"
"return from that call is the return from @code{string-every}.\n"
"\n"
"If there are no characters in @var{s} (ie.@: @var{start} equals\n"
"@var{end}) then the return is @code{#t}.\n")
#define FUNC_NAME s_scm_string_every
{
const char *cstr;

View file

@ -1,4 +1,4 @@
/* srfi-4.c --- Homogeneous numeric vector datatypes.
/* srfi-4.c --- Uniform numeric vector datatypes.
*
* Copyright (C) 2001, 2004 Free Software Foundation, Inc.
*
@ -47,12 +47,12 @@
#include <io.h>
#endif
/* Smob type code for homogeneous numeric vectors. */
/* Smob type code for uniform numeric vectors. */
int scm_tc16_uvec = 0;
#define SCM_IS_UVEC(obj) SCM_SMOB_PREDICATE (scm_tc16_uvec, (obj))
/* Accessor macros for the three components of a homogeneous numeric
/* Accessor macros for the three components of a uniform numeric
vector:
- The type tag (one of the symbolic constants below).
- The vector's length (counted in elements).
@ -63,7 +63,7 @@ int scm_tc16_uvec = 0;
#define SCM_UVEC_BASE(u) ((void *)SCM_CELL_WORD_3(u))
/* Symbolic constants encoding the various types of homogeneous
/* Symbolic constants encoding the various types of uniform
numeric vectors. */
#define SCM_UVEC_U8 0
#define SCM_UVEC_S8 1
@ -116,7 +116,7 @@ static const char *uvec_names[12] = {
/* ================================================================ */
/* Smob print hook for homogeneous vectors. */
/* Smob print hook for uniform vectors. */
static int
uvec_print (SCM uvec, SCM port, scm_print_state *pstate)
{
@ -262,7 +262,7 @@ uvec_mark (SCM uvec)
}
#endif
/* Smob free hook for homogeneous numeric vectors. */
/* Smob free hook for uniform numeric vectors. */
static size_t
uvec_free (SCM uvec)
{
@ -309,7 +309,7 @@ take_uvec (int type, const void *base, size_t len)
SCM_RETURN_NEWSMOB3 (scm_tc16_uvec, type, len, (scm_t_bits) base);
}
/* Create a new, uninitialized homogeneous numeric vector of type TYPE
/* Create a new, uninitialized uniform numeric vector of type TYPE
with space for LEN elements. */
static SCM
alloc_uvec (int type, size_t len)
@ -734,7 +734,7 @@ SCM_DEFINE (scm_uniform_vector_set_x, "uniform-vector-set!", 3, 0, 0,
SCM_DEFINE (scm_uniform_vector_to_list, "uniform-vector->list", 1, 0, 0,
(SCM uvec),
"Convert the homogeneous numeric vector @var{uvec} to a list.")
"Convert the uniform numeric vector @var{uvec} to a list.")
#define FUNC_NAME s_scm_uniform_vector_to_list
{
return uvec_to_list (-1, uvec);