mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 03:40:34 +02:00
Docstring updates.
This commit is contained in:
parent
ba1b72235a
commit
69d2000d93
3 changed files with 49 additions and 35 deletions
|
@ -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_DEFINE (scm_with_continuation_barrier, "with-continuation-barrier", 1,0,0,
|
||||||
(SCM proc),
|
(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
|
#define FUNC_NAME s_scm_with_continuation_barrier
|
||||||
{
|
{
|
||||||
struct scm_data scm_data;
|
struct scm_data scm_data;
|
||||||
|
|
|
@ -77,17 +77,21 @@ race_error ()
|
||||||
|
|
||||||
SCM_DEFINE (scm_string_any, "string-any-c-code", 2, 2, 0,
|
SCM_DEFINE (scm_string_any, "string-any-c-code", 2, 2, 0,
|
||||||
(SCM char_pred, SCM s, SCM start, SCM end),
|
(SCM char_pred, SCM s, SCM start, SCM end),
|
||||||
"Check if the predicate @var{pred} is true for any character in\n"
|
"Check if @var{char_pred} is true for any character in string @var{s}.\n"
|
||||||
"the string @var{s}.\n"
|
"\n"
|
||||||
"\n"
|
"@var{char_pred} can be a character to check for any equal to that, or\n"
|
||||||
"Calls to @var{pred} are made from left to right across @var{s}.\n"
|
"a character set (@pxref{Character Sets}) to check for any in that set,\n"
|
||||||
"When it returns true (ie.@: non-@code{#f}), that return value\n"
|
"or a predicate procedure to call.\n"
|
||||||
"is the return from @code{string-any}.\n"
|
"\n"
|
||||||
"\n"
|
"For a procedure, calls @code{(@var{char_pred} c)} are made\n"
|
||||||
"The SRFI-13 specification requires that the call to @var{pred}\n"
|
"successively on the characters from @var{start} to @var{end}. If\n"
|
||||||
"on the last character of @var{s} (assuming that point is\n"
|
"@var{char_pred} returns true (ie.@: non-@code{#f}), @code{string-any}\n"
|
||||||
"reached) be a tail call, but currently in Guile this is not the\n"
|
"stops and that return value is the return from @code{string-any}. The\n"
|
||||||
"case.")
|
"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
|
#define FUNC_NAME s_scm_string_any
|
||||||
{
|
{
|
||||||
const char *cstr;
|
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_DEFINE (scm_string_every, "string-every-c-code", 2, 2, 0,
|
||||||
(SCM char_pred, SCM s, SCM start, SCM end),
|
(SCM char_pred, SCM s, SCM start, SCM end),
|
||||||
"Check if the predicate @var{pred} is true for every character\n"
|
"Check if @var{char_pred} is true for every character in string\n"
|
||||||
"in the string @var{s}.\n"
|
"@var{s}.\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Calls to @var{pred} are made from left to right across @var{s}.\n"
|
"@var{char_pred} can be a character to check for every character equal\n"
|
||||||
"If the predicate is true for every character then the return\n"
|
"to that, or a character set (@pxref{Character Sets}) to check for\n"
|
||||||
"value from the last @var{pred} call is the return from\n"
|
"every character being in that set, or a predicate procedure to call.\n"
|
||||||
"@code{string-every}.\n"
|
"\n"
|
||||||
"\n"
|
"For a procedure, calls @code{(@var{char_pred} c)} are made\n"
|
||||||
"If there are no characters in @var{s} (ie.@: @var{start} equals\n"
|
"successively on the characters from @var{start} to @var{end}. If\n"
|
||||||
"@var{end}) then the return is @code{#t}.\n"
|
"@var{char_pred} returns @code{#f}, @code{string-every} stops and\n"
|
||||||
"\n"
|
"returns @code{#f}. The call on the last character (ie.@: at\n"
|
||||||
"The SRFI-13 specification requires that the call to @var{pred}\n"
|
"@math{@var{end}-1}), if that point is reached, is a tail call and the\n"
|
||||||
"on the last character of @var{s} (assuming that point is\n"
|
"return from that call is the return from @code{string-every}.\n"
|
||||||
"reached) be a tail call, but currently in Guile this is not the\n"
|
"\n"
|
||||||
"case.")
|
"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
|
#define FUNC_NAME s_scm_string_every
|
||||||
{
|
{
|
||||||
const char *cstr;
|
const char *cstr;
|
||||||
|
|
|
@ -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.
|
* Copyright (C) 2001, 2004 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
|
@ -47,12 +47,12 @@
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Smob type code for homogeneous numeric vectors. */
|
/* Smob type code for uniform numeric vectors. */
|
||||||
int scm_tc16_uvec = 0;
|
int scm_tc16_uvec = 0;
|
||||||
|
|
||||||
#define SCM_IS_UVEC(obj) SCM_SMOB_PREDICATE (scm_tc16_uvec, (obj))
|
#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:
|
vector:
|
||||||
- The type tag (one of the symbolic constants below).
|
- The type tag (one of the symbolic constants below).
|
||||||
- The vector's length (counted in elements).
|
- 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))
|
#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. */
|
numeric vectors. */
|
||||||
#define SCM_UVEC_U8 0
|
#define SCM_UVEC_U8 0
|
||||||
#define SCM_UVEC_S8 1
|
#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
|
static int
|
||||||
uvec_print (SCM uvec, SCM port, scm_print_state *pstate)
|
uvec_print (SCM uvec, SCM port, scm_print_state *pstate)
|
||||||
{
|
{
|
||||||
|
@ -262,7 +262,7 @@ uvec_mark (SCM uvec)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Smob free hook for homogeneous numeric vectors. */
|
/* Smob free hook for uniform numeric vectors. */
|
||||||
static size_t
|
static size_t
|
||||||
uvec_free (SCM uvec)
|
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);
|
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. */
|
with space for LEN elements. */
|
||||||
static SCM
|
static SCM
|
||||||
alloc_uvec (int type, size_t len)
|
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_DEFINE (scm_uniform_vector_to_list, "uniform-vector->list", 1, 0, 0,
|
||||||
(SCM uvec),
|
(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
|
#define FUNC_NAME s_scm_uniform_vector_to_list
|
||||||
{
|
{
|
||||||
return uvec_to_list (-1, uvec);
|
return uvec_to_list (-1, uvec);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue