mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-29 00:10:21 +02:00
Make consistent the usage of variable names in the function definitions found in the Texinfo docs.
* doc/r5rs/r5rs.texi: * doc/ref/api-compound.texi: * doc/ref/api-data.texi: * doc/ref/api-debug.texi: * doc/ref/api-evaluation.texi: * doc/ref/api-io.texi: * doc/ref/api-modules.texi: * doc/ref/api-procedures.texi: * doc/ref/api-scheduling.texi: * doc/ref/api-smobs.texi: * doc/ref/compiler.texi: * doc/ref/misc-modules.texi: * doc/ref/posix.texi: * doc/ref/scheme-using.texi: * doc/ref/srfi-modules.texi: * doc/ref/vm.texi: * doc/ref/web.texi: * doc/sources/env.texi: Make usage of variable names of function definitions more consistent.
This commit is contained in:
parent
9cbcc73fce
commit
64de6db5c6
18 changed files with 180 additions and 182 deletions
|
@ -4615,7 +4615,7 @@ implementation-dependent range. See section @ref{Implementation restrictions}.
|
||||||
@deffn {procedure} number->string z
|
@deffn {procedure} number->string z
|
||||||
@deffnx {procedure} number->string z radix
|
@deffnx {procedure} number->string z radix
|
||||||
|
|
||||||
@var{Radix} must be an exact integer, either 2, 8, 10, or 16. If omitted,
|
@var{radix} must be an exact integer, either 2, 8, 10, or 16. If omitted,
|
||||||
@var{radix} defaults to 10.
|
@var{radix} defaults to 10.
|
||||||
The procedure @samp{number->string} takes a
|
The procedure @samp{number->string} takes a
|
||||||
number and a radix and returns as a string an external representation of
|
number and a radix and returns as a string an external representation of
|
||||||
|
@ -4674,7 +4674,7 @@ allows for infinities, NaNs, and non-flonum representations.
|
||||||
@c for the third argument.
|
@c for the third argument.
|
||||||
|
|
||||||
Returns a number of the maximally precise representation expressed by the
|
Returns a number of the maximally precise representation expressed by the
|
||||||
given @var{string}. @var{Radix} must be an exact integer, either 2, 8, 10,
|
given @var{string}. @var{radix} must be an exact integer, either 2, 8, 10,
|
||||||
or 16. If supplied, @var{radix} is a default radix that may be overridden
|
or 16. If supplied, @var{radix} is a default radix that may be overridden
|
||||||
by an explicit radix prefix in @var{string} (e.g. @t{"#o177"}). If @var{radix}
|
by an explicit radix prefix in @var{string} (e.g. @t{"#o177"}). If @var{radix}
|
||||||
is not supplied, then the default radix is 10. If @var{string} is not
|
is not supplied, then the default radix is 10. If @var{string} is not
|
||||||
|
@ -5381,7 +5381,7 @@ returned. @samp{Memq} uses @samp{eq?} to compare @var{obj} with the elements of
|
||||||
@deffnx {library procedure} assv obj alist
|
@deffnx {library procedure} assv obj alist
|
||||||
@deffnx {library procedure} assoc obj alist
|
@deffnx {library procedure} assoc obj alist
|
||||||
|
|
||||||
@var{Alist} (for ``association list'') must be a list of
|
@var{alist} (for ``association list'') must be a list of
|
||||||
pairs. These procedures find the first pair in @var{alist} whose car field is @var{obj},
|
pairs. These procedures find the first pair in @var{alist} whose car field is @var{obj},
|
||||||
and returns that pair. If no pair in @var{alist} has @var{obj} as its
|
and returns that pair. If no pair in @var{alist} has @var{obj} as its
|
||||||
car, then @t{#f} (not the empty list) is returned. @samp{Assq} uses
|
car, then @t{#f} (not the empty list) is returned. @samp{Assq} uses
|
||||||
|
@ -5830,10 +5830,9 @@ Returns @t{#t} if @var{obj} is a string, otherwise returns @t{#f}.
|
||||||
|
|
||||||
@c \domain{\vr{k} must be a non-negative integer, and \var{char} must be
|
@c \domain{\vr{k} must be a non-negative integer, and \var{char} must be
|
||||||
@c a character.}
|
@c a character.}
|
||||||
@samp{Make-string} returns a newly allocated string of
|
@samp{Make-string} returns a newly allocated string of length @var{k}.
|
||||||
length @var{k}. If @var{char} is given, then all elements of the string
|
If @var{char} is given, then all elements of the string are initialized
|
||||||
are initialized to @var{char}, otherwise the contents of the
|
to @var{char}, otherwise the contents of the string are unspecified.
|
||||||
@var{string} are unspecified.
|
|
||||||
|
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
|
@ -5927,7 +5926,7 @@ the corresponding numerical predicates.
|
||||||
|
|
||||||
@deffn {library procedure} substring string start end
|
@deffn {library procedure} substring string start end
|
||||||
|
|
||||||
@var{String} must be a string, and @var{start} and @var{end}
|
@var{string} must be a string, and @var{start} and @var{end}
|
||||||
must be exact integers satisfying
|
must be exact integers satisfying
|
||||||
|
|
||||||
|
|
||||||
|
@ -6194,7 +6193,7 @@ Returns @t{#t} if @var{obj} is a procedure, otherwise returns @t{#f}.
|
||||||
|
|
||||||
@deffn {procedure} apply proc arg1 @dots{} args
|
@deffn {procedure} apply proc arg1 @dots{} args
|
||||||
|
|
||||||
@var{Proc} must be a procedure and @var{args} must be a list.
|
@var{proc} must be a procedure and @var{args} must be a list.
|
||||||
Calls @var{proc} with the elements of the list
|
Calls @var{proc} with the elements of the list
|
||||||
@samp{(append (list @var{arg1} @dots{},) @var{args})} as the actual
|
@samp{(append (list @var{arg1} @dots{},) @var{args})} as the actual
|
||||||
arguments.
|
arguments.
|
||||||
|
@ -6466,7 +6465,7 @@ and @samp{+}:
|
||||||
|
|
||||||
@deffn {procedure} call-with-current-continuation proc
|
@deffn {procedure} call-with-current-continuation proc
|
||||||
|
|
||||||
@var{Proc} must be a procedure of one
|
@var{proc} must be a procedure of one
|
||||||
argument. The procedure @samp{call-with-current-continuation} packages
|
argument. The procedure @samp{call-with-current-continuation} packages
|
||||||
up the current continuation (see the rationale below) as an ``escape
|
up the current continuation (see the rationale below) as an ``escape
|
||||||
procedure'' and passes it as an argument to
|
procedure'' and passes it as an argument to
|
||||||
|
@ -6616,11 +6615,11 @@ continuation of the call to @t{call-with-values}.
|
||||||
@deffn {procedure} dynamic-wind before thunk after
|
@deffn {procedure} dynamic-wind before thunk after
|
||||||
|
|
||||||
Calls @var{thunk} without arguments, returning the result(s) of this call.
|
Calls @var{thunk} without arguments, returning the result(s) of this call.
|
||||||
@var{Before} and @var{after} are called, also without arguments, as required
|
@var{before} and @var{after} are called, also without arguments, as required
|
||||||
by the following rules (note that in the absence of calls to continuations
|
by the following rules (note that in the absence of calls to continuations
|
||||||
captured using @code{call-with-current-continuation} the three arguments are
|
captured using @code{call-with-current-continuation} the three arguments are
|
||||||
@vindex @w{call-with-current-continuation}
|
@vindex @w{call-with-current-continuation}
|
||||||
called once each, in order). @var{Before} is called whenever execution
|
called once each, in order). @var{before} is called whenever execution
|
||||||
enters the dynamic extent of the call to @var{thunk} and @var{after} is called
|
enters the dynamic extent of the call to @var{thunk} and @var{after} is called
|
||||||
whenever it exits that dynamic extent. The dynamic extent of a procedure
|
whenever it exits that dynamic extent. The dynamic extent of a procedure
|
||||||
call is the period between when the call is initiated and when it
|
call is the period between when the call is initiated and when it
|
||||||
|
@ -6703,7 +6702,7 @@ extent of a call to @var{before} or @var{after} is undefined.
|
||||||
@deffn {procedure} eval expression environment-specifier
|
@deffn {procedure} eval expression environment-specifier
|
||||||
|
|
||||||
Evaluates @var{expression} in the specified environment and returns its value.
|
Evaluates @var{expression} in the specified environment and returns its value.
|
||||||
@var{Expression} must be a valid Scheme expression represented as data,
|
@var{expression} must be a valid Scheme expression represented as data,
|
||||||
and @var{environment-specifier} must be a value returned by one of the
|
and @var{environment-specifier} must be a value returned by one of the
|
||||||
three procedures described below.
|
three procedures described below.
|
||||||
Implementations may extend @samp{eval} to allow non-expression programs
|
Implementations may extend @samp{eval} to allow non-expression programs
|
||||||
|
@ -6731,7 +6730,7 @@ allowed to create new bindings in the environments associated with
|
||||||
@deffn {procedure} scheme-report-environment version
|
@deffn {procedure} scheme-report-environment version
|
||||||
@deffnx {procedure} null-environment version
|
@deffnx {procedure} null-environment version
|
||||||
|
|
||||||
@var{Version} must be the exact integer @samp{5},
|
@var{version} must be the exact integer @samp{5},
|
||||||
corresponding to this revision of the Scheme report (the
|
corresponding to this revision of the Scheme report (the
|
||||||
Revised^5 Report on Scheme).
|
Revised^5 Report on Scheme).
|
||||||
@samp{Scheme-report-environment} returns a specifier for an
|
@samp{Scheme-report-environment} returns a specifier for an
|
||||||
|
@ -6797,7 +6796,7 @@ Haase: Mention that there are alternatives to files?
|
||||||
@deffn {library procedure} call-with-input-file string proc
|
@deffn {library procedure} call-with-input-file string proc
|
||||||
@deffnx {library procedure} call-with-output-file string proc
|
@deffnx {library procedure} call-with-output-file string proc
|
||||||
|
|
||||||
@var{String} should be a string naming a file, and
|
@var{string} should be a string naming a file, and
|
||||||
@var{proc} should be a procedure that accepts one argument.
|
@var{proc} should be a procedure that accepts one argument.
|
||||||
For @samp{call-with-input-file},
|
For @samp{call-with-input-file},
|
||||||
the file should already exist; for
|
the file should already exist; for
|
||||||
|
@ -6862,8 +6861,8 @@ Returns the current default input or output port.
|
||||||
@deffn {optional procedure} with-input-from-file string thunk
|
@deffn {optional procedure} with-input-from-file string thunk
|
||||||
@deffnx {optional procedure} with-output-to-file string thunk
|
@deffnx {optional procedure} with-output-to-file string thunk
|
||||||
|
|
||||||
@var{String} should be a string naming a file, and
|
@var{string} should be a string naming a file, and
|
||||||
@var{proc} should be a procedure of no arguments.
|
@var{thunk} should be a procedure of no arguments.
|
||||||
For @samp{with-input-from-file},
|
For @samp{with-input-from-file},
|
||||||
the file should already exist; for
|
the file should already exist; for
|
||||||
@samp{with-output-to-file},
|
@samp{with-output-to-file},
|
||||||
|
@ -6999,7 +6998,7 @@ a closed port.
|
||||||
|
|
||||||
Returns the next character available from the input @var{port}, updating
|
Returns the next character available from the input @var{port}, updating
|
||||||
the @var{port} to point to the following character. If no more characters
|
the @var{port} to point to the following character. If no more characters
|
||||||
are available, an end of file object is returned. @var{Port} may be
|
are available, an end of file object is returned. @var{port} may be
|
||||||
omitted, in which case it defaults to the value returned by @samp{current-input-port}.
|
omitted, in which case it defaults to the value returned by @samp{current-input-port}.
|
||||||
|
|
||||||
@end deffn
|
@end deffn
|
||||||
|
@ -7012,7 +7011,7 @@ omitted, in which case it defaults to the value returned by @samp{current-input-
|
||||||
Returns the next character available from the input @var{port},
|
Returns the next character available from the input @var{port},
|
||||||
@emph{without} updating
|
@emph{without} updating
|
||||||
the @var{port} to point to the following character. If no more characters
|
the @var{port} to point to the following character. If no more characters
|
||||||
are available, an end of file object is returned. @var{Port} may be
|
are available, an end of file object is returned. @var{port} may be
|
||||||
omitted, in which case it defaults to the value returned by @samp{current-input-port}.
|
omitted, in which case it defaults to the value returned by @samp{current-input-port}.
|
||||||
|
|
||||||
|
|
||||||
|
@ -7050,7 +7049,7 @@ Returns @t{#t} if a character is ready on the input @var{port} and
|
||||||
returns @t{#f} otherwise. If @samp{char-ready} returns @t{#t} then
|
returns @t{#f} otherwise. If @samp{char-ready} returns @t{#t} then
|
||||||
the next @samp{read-char} operation on the given @var{port} is guaranteed
|
the next @samp{read-char} operation on the given @var{port} is guaranteed
|
||||||
not to hang. If the @var{port} is at end of file then @samp{char-ready?}
|
not to hang. If the @var{port} is at end of file then @samp{char-ready?}
|
||||||
returns @t{#t}. @var{Port} may be omitted, in which case it defaults to
|
returns @t{#t}. @var{port} may be omitted, in which case it defaults to
|
||||||
the value returned by @samp{current-input-port}.
|
the value returned by @samp{current-input-port}.
|
||||||
|
|
||||||
|
|
||||||
|
@ -7163,7 +7162,7 @@ Fix
|
||||||
|
|
||||||
@c \domain{\var{Filename} should be a string naming an existing file
|
@c \domain{\var{Filename} should be a string naming an existing file
|
||||||
@c containing Scheme source code.} The {\cf load} procedure reads
|
@c containing Scheme source code.} The {\cf load} procedure reads
|
||||||
@var{Filename} should be a string naming an existing file
|
@var{filename} should be a string naming an existing file
|
||||||
containing Scheme source code. The @samp{load} procedure reads
|
containing Scheme source code. The @samp{load} procedure reads
|
||||||
expressions and definitions from the file and evaluates them
|
expressions and definitions from the file and evaluates them
|
||||||
sequentially. It is unspecified whether the results of the expressions
|
sequentially. It is unspecified whether the results of the expressions
|
||||||
|
@ -7186,7 +7185,7 @@ implementations.
|
||||||
@deffn {optional procedure} transcript-on filename
|
@deffn {optional procedure} transcript-on filename
|
||||||
@deffnx {optional procedure} transcript-off
|
@deffnx {optional procedure} transcript-off
|
||||||
|
|
||||||
@var{Filename} must be a string naming an output file to be
|
@var{filename} must be a string naming an output file to be
|
||||||
created. The effect of @samp{transcript-on} is to open the named file
|
created. The effect of @samp{transcript-on} is to open the named file
|
||||||
for output, and to cause a transcript of subsequent interaction between
|
for output, and to cause a transcript of subsequent interaction between
|
||||||
the user and the Scheme system to be written to the file. The
|
the user and the Scheme system to be written to the file. The
|
||||||
|
|
|
@ -779,15 +779,15 @@ in the vector.
|
||||||
Return the number of elements in @var{vector} as an exact integer.
|
Return the number of elements in @var{vector} as an exact integer.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deftypefn {C Function} size_t scm_c_vector_length (SCM v)
|
@deftypefn {C Function} size_t scm_c_vector_length (SCM vec)
|
||||||
Return the number of elements in @var{vector} as a @code{size_t}.
|
Return the number of elements in @var{vec} as a @code{size_t}.
|
||||||
@end deftypefn
|
@end deftypefn
|
||||||
|
|
||||||
@rnindex vector-ref
|
@rnindex vector-ref
|
||||||
@deffn {Scheme Procedure} vector-ref vector k
|
@deffn {Scheme Procedure} vector-ref vec k
|
||||||
@deffnx {C Function} scm_vector_ref vector k
|
@deffnx {C Function} scm_vector_ref vec k
|
||||||
Return the contents of position @var{k} of @var{vector}.
|
Return the contents of position @var{k} of @var{vec}.
|
||||||
@var{k} must be a valid index of @var{vector}.
|
@var{k} must be a valid index of @var{vec}.
|
||||||
@lisp
|
@lisp
|
||||||
(vector-ref '#(1 1 2 3 5 8 13 21) 5) @result{} 8
|
(vector-ref '#(1 1 2 3 5 8 13 21) 5) @result{} 8
|
||||||
(vector-ref '#(1 1 2 3 5 8 13 21)
|
(vector-ref '#(1 1 2 3 5 8 13 21)
|
||||||
|
@ -798,9 +798,9 @@ Return the contents of position @var{k} of @var{vector}.
|
||||||
@end lisp
|
@end lisp
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deftypefn {C Function} SCM scm_c_vector_ref (SCM v, size_t k)
|
@deftypefn {C Function} SCM scm_c_vector_ref (SCM vec, size_t k)
|
||||||
Return the contents of position @var{k} (a @code{size_t}) of
|
Return the contents of position @var{k} (a @code{size_t}) of
|
||||||
@var{vector}.
|
@var{vec}.
|
||||||
@end deftypefn
|
@end deftypefn
|
||||||
|
|
||||||
A vector created by one of the dynamic vector constructor procedures
|
A vector created by one of the dynamic vector constructor procedures
|
||||||
|
@ -813,10 +813,10 @@ considered as constants. Currently, however, Guile does not detect this
|
||||||
error.
|
error.
|
||||||
|
|
||||||
@rnindex vector-set!
|
@rnindex vector-set!
|
||||||
@deffn {Scheme Procedure} vector-set! vector k obj
|
@deffn {Scheme Procedure} vector-set! vec k obj
|
||||||
@deffnx {C Function} scm_vector_set_x vector k obj
|
@deffnx {C Function} scm_vector_set_x vec k obj
|
||||||
Store @var{obj} in position @var{k} of @var{vector}.
|
Store @var{obj} in position @var{k} of @var{vec}.
|
||||||
@var{k} must be a valid index of @var{vector}.
|
@var{k} must be a valid index of @var{vec}.
|
||||||
The value returned by @samp{vector-set!} is unspecified.
|
The value returned by @samp{vector-set!} is unspecified.
|
||||||
@lisp
|
@lisp
|
||||||
(let ((vec (vector 0 '(2 2 2 2) "Anna")))
|
(let ((vec (vector 0 '(2 2 2 2) "Anna")))
|
||||||
|
@ -825,14 +825,14 @@ The value returned by @samp{vector-set!} is unspecified.
|
||||||
@end lisp
|
@end lisp
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deftypefn {C Function} void scm_c_vector_set_x (SCM v, size_t k, SCM obj)
|
@deftypefn {C Function} void scm_c_vector_set_x (SCM vec, size_t k, SCM obj)
|
||||||
Store @var{obj} in position @var{k} (a @code{size_t}) of @var{v}.
|
Store @var{obj} in position @var{k} (a @code{size_t}) of @var{vec}.
|
||||||
@end deftypefn
|
@end deftypefn
|
||||||
|
|
||||||
@rnindex vector-fill!
|
@rnindex vector-fill!
|
||||||
@deffn {Scheme Procedure} vector-fill! v fill
|
@deffn {Scheme Procedure} vector-fill! vec fill
|
||||||
@deffnx {C Function} scm_vector_fill_x (v, fill)
|
@deffnx {C Function} scm_vector_fill_x (vec, fill)
|
||||||
Store @var{fill} in every position of @var{vector}. The value
|
Store @var{fill} in every position of @var{vec}. The value
|
||||||
returned by @code{vector-fill!} is unspecified.
|
returned by @code{vector-fill!} is unspecified.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
|
@ -1031,7 +1031,7 @@ Return the element at index @var{idx} of the bitvector
|
||||||
@var{vec}.
|
@var{vec}.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deftypefn {C Function} SCM scm_c_bitvector_ref (SCM obj, size_t idx)
|
@deftypefn {C Function} SCM scm_c_bitvector_ref (SCM vec, size_t idx)
|
||||||
Return the element at index @var{idx} of the bitvector
|
Return the element at index @var{idx} of the bitvector
|
||||||
@var{vec}.
|
@var{vec}.
|
||||||
@end deftypefn
|
@end deftypefn
|
||||||
|
@ -1042,7 +1042,7 @@ Set the element at index @var{idx} of the bitvector
|
||||||
@var{vec} when @var{val} is true, else clear it.
|
@var{vec} when @var{val} is true, else clear it.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deftypefn {C Function} SCM scm_c_bitvector_set_x (SCM obj, size_t idx, SCM val)
|
@deftypefn {C Function} SCM scm_c_bitvector_set_x (SCM vec, size_t idx, SCM val)
|
||||||
Set the element at index @var{idx} of the bitvector
|
Set the element at index @var{idx} of the bitvector
|
||||||
@var{vec} when @var{val} is true, else clear it.
|
@var{vec} when @var{val} is true, else clear it.
|
||||||
@end deftypefn
|
@end deftypefn
|
||||||
|
@ -1427,8 +1427,8 @@ stored in the variable @code{*unspecified*} so that for example
|
||||||
@code{(make-typed-array 'u32 *unspecified* 4)} creates a uninitialized
|
@code{(make-typed-array 'u32 *unspecified* 4)} creates a uninitialized
|
||||||
@code{u32} vector of length 4.
|
@code{u32} vector of length 4.
|
||||||
|
|
||||||
Each @var{bound} may be a positive non-zero integer @var{N}, in which
|
Each @var{bound} may be a positive non-zero integer @var{n}, in which
|
||||||
case the index for that dimension can range from 0 through @var{N-1}; or
|
case the index for that dimension can range from 0 through @var{n}-1; or
|
||||||
an explicit index range specifier in the form @code{(LOWER UPPER)},
|
an explicit index range specifier in the form @code{(LOWER UPPER)},
|
||||||
where both @var{lower} and @var{upper} are integers, possibly less than
|
where both @var{lower} and @var{upper} are integers, possibly less than
|
||||||
zero, and possibly the same number (however, @var{lower} cannot be
|
zero, and possibly the same number (however, @var{lower} cannot be
|
||||||
|
@ -1512,8 +1512,8 @@ For example,
|
||||||
@end example
|
@end example
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn {Scheme Procedure} array-rank obj
|
@deffn {Scheme Procedure} array-rank array
|
||||||
@deffnx {C Function} scm_array_rank (obj)
|
@deffnx {C Function} scm_array_rank (array)
|
||||||
Return the rank of @var{array}.
|
Return the rank of @var{array}.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
|
@ -1625,10 +1625,10 @@ $\left(\matrix{%
|
||||||
|
|
||||||
@deffn {Scheme Procedure} uniform-array-read! ra [port_or_fd [start [end]]]
|
@deffn {Scheme Procedure} uniform-array-read! ra [port_or_fd [start [end]]]
|
||||||
@deffnx {C Function} scm_uniform_array_read_x (ra, port_or_fd, start, end)
|
@deffnx {C Function} scm_uniform_array_read_x (ra, port_or_fd, start, end)
|
||||||
Attempt to read all elements of @var{ura}, in lexicographic order, as
|
Attempt to read all elements of array @var{ra}, in lexicographic order, as
|
||||||
binary objects from @var{port-or-fdes}.
|
binary objects from @var{port_or_fd}.
|
||||||
If an end of file is encountered,
|
If an end of file is encountered,
|
||||||
the objects up to that point are put into @var{ura}
|
the objects up to that point are put into @var{ra}
|
||||||
(starting at the beginning) and the remainder of the array is
|
(starting at the beginning) and the remainder of the array is
|
||||||
unchanged.
|
unchanged.
|
||||||
|
|
||||||
|
@ -1637,21 +1637,21 @@ a specified region of a vector (or linearized array) to be read,
|
||||||
leaving the remainder of the vector unchanged.
|
leaving the remainder of the vector unchanged.
|
||||||
|
|
||||||
@code{uniform-array-read!} returns the number of objects read.
|
@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
|
@var{port_or_fd} may be omitted, in which case it defaults to the value
|
||||||
returned by @code{(current-input-port)}.
|
returned by @code{(current-input-port)}.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn {Scheme Procedure} uniform-array-write v [port_or_fd [start [end]]]
|
@deffn {Scheme Procedure} uniform-array-write ra [port_or_fd [start [end]]]
|
||||||
@deffnx {C Function} scm_uniform_array_write (v, port_or_fd, start, end)
|
@deffnx {C Function} scm_uniform_array_write (ra, port_or_fd, start, end)
|
||||||
Writes all elements of @var{ura} as binary objects to
|
Writes all elements of @var{ra} as binary objects to
|
||||||
@var{port-or-fdes}.
|
@var{port_or_fd}.
|
||||||
|
|
||||||
The optional arguments @var{start}
|
The optional arguments @var{start}
|
||||||
and @var{end} allow
|
and @var{end} allow
|
||||||
a specified region of a vector (or linearized array) to be written.
|
a specified region of a vector (or linearized array) to be written.
|
||||||
|
|
||||||
The number of objects actually written is returned.
|
The number of objects actually written is returned.
|
||||||
@var{port-or-fdes} may be
|
@var{port_or_fd} may be
|
||||||
omitted, in which case it defaults to the value returned by
|
omitted, in which case it defaults to the value returned by
|
||||||
@code{(current-output-port)}.
|
@code{(current-output-port)}.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
@ -1663,7 +1663,7 @@ omitted, in which case it defaults to the value returned by
|
||||||
@deffnx {C Function} scm_make_shared_array (oldarray, mapfunc, boundlist)
|
@deffnx {C Function} scm_make_shared_array (oldarray, mapfunc, boundlist)
|
||||||
Return a new array which shares the storage of @var{oldarray}.
|
Return a new array which shares the storage of @var{oldarray}.
|
||||||
Changes made through either affect the same underlying storage. The
|
Changes made through either affect the same underlying storage. The
|
||||||
@var{bound@dots{}} arguments are the shape of the new array, the same
|
@var{bound} @dots{} arguments are the shape of the new array, the same
|
||||||
as @code{make-array} (@pxref{Array Procedures}).
|
as @code{make-array} (@pxref{Array Procedures}).
|
||||||
|
|
||||||
@var{mapfunc} translates coordinates from the new array to the
|
@var{mapfunc} translates coordinates from the new array to the
|
||||||
|
|
|
@ -695,10 +695,10 @@ value, including the special values @samp{+nan.0}, @samp{+inf.0} and
|
||||||
|
|
||||||
@deffn {Scheme Procedure} complex? z
|
@deffn {Scheme Procedure} complex? z
|
||||||
@deffnx {C Function} scm_complex_p (z)
|
@deffnx {C Function} scm_complex_p (z)
|
||||||
Return @code{#t} if @var{x} is a complex number, @code{#f}
|
Return @code{#t} if @var{z} is a complex number, @code{#f}
|
||||||
otherwise. Note that the sets of real, rational and integer
|
otherwise. Note that the sets of real, rational and integer
|
||||||
values form subsets of the set of complex numbers, i.e.@: the
|
values form subsets of the set of complex numbers, i.e.@: the
|
||||||
predicate will also be fulfilled if @var{x} is a real,
|
predicate will also be fulfilled if @var{z} is a real,
|
||||||
rational or integer number.
|
rational or integer number.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
|
@ -2331,8 +2331,8 @@ Return @code{#t} if all given character sets are equal.
|
||||||
|
|
||||||
@deffn {Scheme Procedure} char-set<= . char_sets
|
@deffn {Scheme Procedure} char-set<= . char_sets
|
||||||
@deffnx {C Function} scm_char_set_leq (char_sets)
|
@deffnx {C Function} scm_char_set_leq (char_sets)
|
||||||
Return @code{#t} if every character set @var{cs}i is a subset
|
Return @code{#t} if every character set @var{char_set}i is a subset
|
||||||
of character set @var{cs}i+1.
|
of character set @var{char_set}i+1.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn {Scheme Procedure} char-set-hash cs [bound]
|
@deffn {Scheme Procedure} char-set-hash cs [bound]
|
||||||
|
@ -3099,7 +3099,7 @@ reverse order.
|
||||||
Return a newly allocated string of
|
Return a newly allocated string of
|
||||||
length @var{k}. If @var{chr} is given, then all elements of
|
length @var{k}. If @var{chr} is given, then all elements of
|
||||||
the string are initialized to @var{chr}, otherwise the contents
|
the string are initialized to @var{chr}, otherwise the contents
|
||||||
of the @var{string} are unspecified.
|
of the string are unspecified.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deftypefn {C Function} SCM scm_c_make_string (size_t len, SCM chr)
|
@deftypefn {C Function} SCM scm_c_make_string (size_t len, SCM chr)
|
||||||
|
@ -3118,7 +3118,7 @@ produce the corresponding string element. The order in which
|
||||||
@deffn {Scheme Procedure} string-join ls [delimiter [grammar]]
|
@deffn {Scheme Procedure} string-join ls [delimiter [grammar]]
|
||||||
@deffnx {C Function} scm_string_join (ls, delimiter, grammar)
|
@deffnx {C Function} scm_string_join (ls, delimiter, grammar)
|
||||||
Append the string in the string list @var{ls}, using the string
|
Append the string in the string list @var{ls}, using the string
|
||||||
@var{delim} as a delimiter between the elements of @var{ls}.
|
@var{delimiter} as a delimiter between the elements of @var{ls}.
|
||||||
@var{grammar} is a symbol which specifies how the delimiter is
|
@var{grammar} is a symbol which specifies how the delimiter is
|
||||||
placed between the strings, and defaults to the symbol
|
placed between the strings, and defaults to the symbol
|
||||||
@code{infix}.
|
@code{infix}.
|
||||||
|
@ -3279,7 +3279,7 @@ Return all but the last @var{n} characters of @var{s}.
|
||||||
@deffnx {C Function} scm_string_pad (s, len, chr, start, end)
|
@deffnx {C Function} scm_string_pad (s, len, chr, start, end)
|
||||||
@deffnx {C Function} scm_string_pad_right (s, len, chr, start, end)
|
@deffnx {C Function} scm_string_pad_right (s, len, chr, start, end)
|
||||||
Take characters @var{start} to @var{end} from the string @var{s} and
|
Take characters @var{start} to @var{end} from the string @var{s} and
|
||||||
either pad with @var{char} or truncate them to give @var{len}
|
either pad with @var{chr} or truncate them to give @var{len}
|
||||||
characters.
|
characters.
|
||||||
|
|
||||||
@code{string-pad} pads or truncates on the left, so for example
|
@code{string-pad} pads or truncates on the left, so for example
|
||||||
|
@ -3587,12 +3587,12 @@ case-insensitively.
|
||||||
|
|
||||||
@deffn {Scheme Procedure} string-hash s [bound [start [end]]]
|
@deffn {Scheme Procedure} string-hash s [bound [start [end]]]
|
||||||
@deffnx {C Function} scm_substring_hash (s, bound, start, end)
|
@deffnx {C Function} scm_substring_hash (s, bound, start, end)
|
||||||
Compute a hash value for @var{S}. The optional argument @var{bound} is a non-negative exact integer specifying the range of the hash function. A positive value restricts the return value to the range [0,bound).
|
Compute a hash value for @var{s}. The optional argument @var{bound} is a non-negative exact integer specifying the range of the hash function. A positive value restricts the return value to the range [0,bound).
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn {Scheme Procedure} string-hash-ci s [bound [start [end]]]
|
@deffn {Scheme Procedure} string-hash-ci s [bound [start [end]]]
|
||||||
@deffnx {C Function} scm_substring_hash_ci (s, bound, start, end)
|
@deffnx {C Function} scm_substring_hash_ci (s, bound, start, end)
|
||||||
Compute a hash value for @var{S}. The optional argument @var{bound} is a non-negative exact integer specifying the range of the hash function. A positive value restricts the return value to the range [0,bound).
|
Compute a hash value for @var{s}. The optional argument @var{bound} is a non-negative exact integer specifying the range of the hash function. A positive value restricts the return value to the range [0,bound).
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
Because the same visual appearance of an abstract Unicode character can
|
Because the same visual appearance of an abstract Unicode character can
|
||||||
|
|
|
@ -96,7 +96,7 @@ stack frames from the top and bottom of the stack that
|
||||||
@code{(@var{inner_cut_1} @var{outer_cut_1} @var{inner_cut_2}
|
@code{(@var{inner_cut_1} @var{outer_cut_1} @var{inner_cut_2}
|
||||||
@var{outer_cut_2} @dots{})}.
|
@var{outer_cut_2} @dots{})}.
|
||||||
|
|
||||||
Each @var{inner_cut_N} can be @code{#t}, an integer, a prompt
|
Each @var{inner_cut_i} can be @code{#t}, an integer, a prompt
|
||||||
tag, or a procedure. @code{#t} means to cut away all frames up
|
tag, or a procedure. @code{#t} means to cut away all frames up
|
||||||
to but excluding the first user module frame. An integer means
|
to but excluding the first user module frame. An integer means
|
||||||
to cut away exactly that number of frames. A prompt tag means
|
to cut away exactly that number of frames. A prompt tag means
|
||||||
|
@ -105,14 +105,14 @@ tag. A procedure means to cut away all frames up to but
|
||||||
excluding the application frame whose procedure matches the
|
excluding the application frame whose procedure matches the
|
||||||
specified one.
|
specified one.
|
||||||
|
|
||||||
Each @var{outer_cut_N} can be an integer, a prompt tag, or a
|
Each @var{outer_cut_i} can be an integer, a prompt tag, or a
|
||||||
procedure. An integer means to cut away that number of frames.
|
procedure. An integer means to cut away that number of frames.
|
||||||
A prompt tag means to cut away all frames that are outside a
|
A prompt tag means to cut away all frames that are outside a
|
||||||
prompt with the given tag. A procedure means to cut away
|
prompt with the given tag. A procedure means to cut away
|
||||||
frames down to but excluding the application frame whose
|
frames down to but excluding the application frame whose
|
||||||
procedure matches the specified one.
|
procedure matches the specified one.
|
||||||
|
|
||||||
If the @var{outer_cut_N} of the last pair is missing, it is
|
If the @var{outer_cut_i} of the last pair is missing, it is
|
||||||
taken as 0.
|
taken as 0.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
|
|
|
@ -444,10 +444,10 @@ it as code.
|
||||||
@deffn {Scheme Procedure} eval exp module_or_state
|
@deffn {Scheme Procedure} eval exp module_or_state
|
||||||
@deffnx {C Function} scm_eval (exp, module_or_state)
|
@deffnx {C Function} scm_eval (exp, module_or_state)
|
||||||
Evaluate @var{exp}, a list representing a Scheme expression,
|
Evaluate @var{exp}, a list representing a Scheme expression,
|
||||||
in the top-level environment specified by @var{module}.
|
in the top-level environment specified by @var{module_or_state}.
|
||||||
While @var{exp} is evaluated (using @code{primitive-eval}),
|
While @var{exp} is evaluated (using @code{primitive-eval}),
|
||||||
@var{module} is made the current module. The current module
|
@var{module_or_state} is made the current module. The current module
|
||||||
is reset to its previous value when @var{eval} returns.
|
is reset to its previous value when @code{eval} returns.
|
||||||
XXX - dynamic states.
|
XXX - dynamic states.
|
||||||
Example: (eval '(+ 1 2) (interaction-environment))
|
Example: (eval '(+ 1 2) (interaction-environment))
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
|
@ -251,7 +251,7 @@ sequence when the error is raised.
|
||||||
|
|
||||||
@deffn {Scheme Procedure} unread-char cobj [port]
|
@deffn {Scheme Procedure} unread-char cobj [port]
|
||||||
@deffnx {C Function} scm_unread_char (cobj, port)
|
@deffnx {C Function} scm_unread_char (cobj, port)
|
||||||
Place @var{char} in @var{port} so that it will be read by the
|
Place character @var{cobj} in @var{port} so that it will be read by the
|
||||||
next read operation. If called multiple times, the unread characters
|
next read operation. If called multiple times, the unread characters
|
||||||
will be read again in last-in first-out order. If @var{port} is
|
will be read again in last-in first-out order. If @var{port} is
|
||||||
not supplied, the current input port is used.
|
not supplied, the current input port is used.
|
||||||
|
@ -343,7 +343,7 @@ the current output port.
|
||||||
@var{message} can contain @code{~A} (was @code{%s}) and
|
@var{message} can contain @code{~A} (was @code{%s}) and
|
||||||
@code{~S} (was @code{%S}) escapes. When printed,
|
@code{~S} (was @code{%S}) escapes. When printed,
|
||||||
the escapes are replaced with corresponding members of
|
the escapes are replaced with corresponding members of
|
||||||
@var{ARGS}:
|
@var{args}:
|
||||||
@code{~A} formats using @code{display} and @code{~S} formats
|
@code{~A} formats using @code{display} and @code{~S} formats
|
||||||
using @code{write}.
|
using @code{write}.
|
||||||
If @var{destination} is @code{#t}, then use the current output
|
If @var{destination} is @code{#t}, then use the current output
|
||||||
|
@ -426,7 +426,7 @@ open.
|
||||||
|
|
||||||
@deffn {Scheme Procedure} seek fd_port offset whence
|
@deffn {Scheme Procedure} seek fd_port offset whence
|
||||||
@deffnx {C Function} scm_seek (fd_port, offset, whence)
|
@deffnx {C Function} scm_seek (fd_port, offset, whence)
|
||||||
Sets the current position of @var{fd/port} to the integer
|
Sets the current position of @var{fd_port} to the integer
|
||||||
@var{offset}, which is interpreted according to the value of
|
@var{offset}, which is interpreted according to the value of
|
||||||
@var{whence}.
|
@var{whence}.
|
||||||
|
|
||||||
|
@ -441,7 +441,7 @@ Seek from the current position.
|
||||||
@defvar SEEK_END
|
@defvar SEEK_END
|
||||||
Seek from the end of the file.
|
Seek from the end of the file.
|
||||||
@end defvar
|
@end defvar
|
||||||
If @var{fd/port} is a file descriptor, the underlying system
|
If @var{fd_port} is a file descriptor, the underlying system
|
||||||
call is @code{lseek}. @var{port} may be a string port.
|
call is @code{lseek}. @var{port} may be a string port.
|
||||||
|
|
||||||
The value returned is the new position in the file. This means
|
The value returned is the new position in the file. This means
|
||||||
|
@ -454,7 +454,7 @@ that the current position of a port can be obtained using:
|
||||||
@deffn {Scheme Procedure} ftell fd_port
|
@deffn {Scheme Procedure} ftell fd_port
|
||||||
@deffnx {C Function} scm_ftell (fd_port)
|
@deffnx {C Function} scm_ftell (fd_port)
|
||||||
Return an integer representing the current position of
|
Return an integer representing the current position of
|
||||||
@var{fd/port}, measured from the beginning. Equivalent to:
|
@var{fd_port}, measured from the beginning. Equivalent to:
|
||||||
|
|
||||||
@lisp
|
@lisp
|
||||||
(seek port 0 SEEK_CUR)
|
(seek port 0 SEEK_CUR)
|
||||||
|
@ -922,7 +922,7 @@ of the respective current port is restored.
|
||||||
The current port setting is managed with @code{dynamic-wind}, so the
|
The current port setting is managed with @code{dynamic-wind}, so the
|
||||||
previous value is restored no matter how @var{thunk} exits (eg.@: an
|
previous value is restored no matter how @var{thunk} exits (eg.@: an
|
||||||
exception), and if @var{thunk} is re-entered (via a captured
|
exception), and if @var{thunk} is re-entered (via a captured
|
||||||
continuation) then it's set again to the @var{FILENAME} port.
|
continuation) then it's set again to the @var{filename} port.
|
||||||
|
|
||||||
The port is closed when @var{thunk} returns normally, but not when
|
The port is closed when @var{thunk} returns normally, but not when
|
||||||
exited via an exception or new continuation. This ensures it's still
|
exited via an exception or new continuation. This ensures it's still
|
||||||
|
@ -1414,7 +1414,7 @@ This condition type could be defined by
|
||||||
An exception with this type is raised when one of the operations for
|
An exception with this type is raised when one of the operations for
|
||||||
textual output to a port encounters a character that cannot be
|
textual output to a port encounters a character that cannot be
|
||||||
translated into bytes by the output direction of the port's transcoder.
|
translated into bytes by the output direction of the port's transcoder.
|
||||||
@var{Char} is the character that could not be encoded.
|
@var{char} is the character that could not be encoded.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn {Scheme Syntax} error-handling-mode @var{error-handling-mode-symbol}
|
@deffn {Scheme Syntax} error-handling-mode @var{error-handling-mode-symbol}
|
||||||
|
@ -1430,7 +1430,7 @@ symbol acceptable as a @var{handling-mode} argument to
|
||||||
raised.
|
raised.
|
||||||
|
|
||||||
@quotation Note
|
@quotation Note
|
||||||
Only the name of @var{error-handling-style-symbol} is significant.
|
Only the name of @var{error-handling-mode-symbol} is significant.
|
||||||
@end quotation
|
@end quotation
|
||||||
|
|
||||||
The error-handling mode of a transcoder specifies the behavior
|
The error-handling mode of a transcoder specifies the behavior
|
||||||
|
@ -1470,7 +1470,7 @@ symbol; and @var{handling-mode}, if present, an error-handling-mode
|
||||||
symbol.
|
symbol.
|
||||||
|
|
||||||
@var{eol-style} may be omitted, in which case it defaults to the native
|
@var{eol-style} may be omitted, in which case it defaults to the native
|
||||||
end-of-line style of the underlying platform. @var{Handling-mode} may
|
end-of-line style of the underlying platform. @var{handling-mode} may
|
||||||
be omitted, in which case it defaults to @code{replace}. The result is
|
be omitted, in which case it defaults to @code{replace}. The result is
|
||||||
a transcoder with the behavior specified by its arguments.
|
a transcoder with the behavior specified by its arguments.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
@ -1566,11 +1566,11 @@ encoding. Likewise, Guile does not prevent use of
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn {Scheme Procedure} textual-port? port
|
@deffn {Scheme Procedure} textual-port? port
|
||||||
Always return @var{#t}, as all ports can be used for textual I/O in
|
Always return @code{#t}, as all ports can be used for textual I/O in
|
||||||
Guile.
|
Guile.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn {Scheme Procedure} transcoded-port obj
|
@deffn {Scheme Procedure} transcoded-port binary-port transcoder
|
||||||
The @code{transcoded-port} procedure
|
The @code{transcoded-port} procedure
|
||||||
returns a new textual port with the specified @var{transcoder}.
|
returns a new textual port with the specified @var{transcoder}.
|
||||||
Otherwise the new textual port's state is largely the same as
|
Otherwise the new textual port's state is largely the same as
|
||||||
|
@ -1629,12 +1629,12 @@ of @var{proc}. Return the return values of @var{proc}.
|
||||||
@node R6RS Input Ports
|
@node R6RS Input Ports
|
||||||
@subsubsection Input Ports
|
@subsubsection Input Ports
|
||||||
|
|
||||||
@deffn {Scheme Procedure} input-port? obj@
|
@deffn {Scheme Procedure} input-port? obj
|
||||||
Returns @code{#t} if the argument is an input port (or a combined input
|
Returns @code{#t} if the argument is an input port (or a combined input
|
||||||
and output port), and returns @code{#f} otherwise.
|
and output port), and returns @code{#f} otherwise.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn {Scheme Procedure} port-eof? port
|
@deffn {Scheme Procedure} port-eof? input-port
|
||||||
Returns @code{#t}
|
Returns @code{#t}
|
||||||
if the @code{lookahead-u8} procedure (if @var{input-port} is a binary port)
|
if the @code{lookahead-u8} procedure (if @var{input-port} is a binary port)
|
||||||
or the @code{lookahead-char} procedure (if @var{input-port} is a textual port)
|
or the @code{lookahead-char} procedure (if @var{input-port} is a textual port)
|
||||||
|
@ -1648,7 +1648,7 @@ but the port cannot be determined to be at end of file.
|
||||||
@deffnx {Scheme Procedure} open-file-input-port filename file-options
|
@deffnx {Scheme Procedure} open-file-input-port filename file-options
|
||||||
@deffnx {Scheme Procedure} open-file-input-port filename file-options buffer-mode
|
@deffnx {Scheme Procedure} open-file-input-port filename file-options buffer-mode
|
||||||
@deffnx {Scheme Procedure} open-file-input-port filename file-options buffer-mode maybe-transcoder
|
@deffnx {Scheme Procedure} open-file-input-port filename file-options buffer-mode maybe-transcoder
|
||||||
@var{Maybe-transcoder} must be either a transcoder or @code{#f}.
|
@var{maybe-transcoder} must be either a transcoder or @code{#f}.
|
||||||
|
|
||||||
The @code{open-file-input-port} procedure returns an
|
The @code{open-file-input-port} procedure returns an
|
||||||
input port for the named file. The @var{file-options} and
|
input port for the named file. The @var{file-options} and
|
||||||
|
@ -1718,13 +1718,13 @@ indicating the number of bytes read, or @code{0} to indicate the
|
||||||
end-of-file.
|
end-of-file.
|
||||||
|
|
||||||
Optionally, if @var{get-position} is not @code{#f}, it must be a thunk
|
Optionally, if @var{get-position} is not @code{#f}, it must be a thunk
|
||||||
that will be called when @var{port-position} is invoked on the custom
|
that will be called when @code{port-position} is invoked on the custom
|
||||||
binary port and should return an integer indicating the position within
|
binary port and should return an integer indicating the position within
|
||||||
the underlying data stream; if @var{get-position} was not supplied, the
|
the underlying data stream; if @var{get-position} was not supplied, the
|
||||||
returned port does not support @var{port-position}.
|
returned port does not support @code{port-position}.
|
||||||
|
|
||||||
Likewise, if @var{set-position!} is not @code{#f}, it should be a
|
Likewise, if @var{set-position!} is not @code{#f}, it should be a
|
||||||
one-argument procedure. When @var{set-port-position!} is invoked on the
|
one-argument procedure. When @code{set-port-position!} is invoked on the
|
||||||
custom binary input port, @var{set-position!} is passed an integer
|
custom binary input port, @var{set-position!} is passed an integer
|
||||||
indicating the position of the next byte is to read.
|
indicating the position of the next byte is to read.
|
||||||
|
|
||||||
|
@ -1806,7 +1806,7 @@ end-of-file object (if no data were available).
|
||||||
@node R6RS Textual Input
|
@node R6RS Textual Input
|
||||||
@subsubsection Textual Input
|
@subsubsection Textual Input
|
||||||
|
|
||||||
@deffn {Scheme Procedure} get-char port
|
@deffn {Scheme Procedure} get-char textual-input-port
|
||||||
Reads from @var{textual-input-port}, blocking as necessary, until a
|
Reads from @var{textual-input-port}, blocking as necessary, until a
|
||||||
complete character is available from @var{textual-input-port},
|
complete character is available from @var{textual-input-port},
|
||||||
or until an end of file is reached.
|
or until an end of file is reached.
|
||||||
|
@ -1817,14 +1817,14 @@ point past the character. If an end of file is reached before any
|
||||||
character is read, @code{get-char} returns the end-of-file object.
|
character is read, @code{get-char} returns the end-of-file object.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn {Scheme Procedure} lookahead-char port
|
@deffn {Scheme Procedure} lookahead-char textual-input-port
|
||||||
The @code{lookahead-char} procedure is like @code{get-char}, but it does
|
The @code{lookahead-char} procedure is like @code{get-char}, but it does
|
||||||
not update @var{textual-input-port} to point past the character.
|
not update @var{textual-input-port} to point past the character.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn {Scheme Procedure} get-string-n port count
|
@deffn {Scheme Procedure} get-string-n textual-input-port count
|
||||||
|
|
||||||
@var{Count} must be an exact, non-negative integer object, representing
|
@var{count} must be an exact, non-negative integer object, representing
|
||||||
the number of characters to be read.
|
the number of characters to be read.
|
||||||
|
|
||||||
The @code{get-string-n} procedure reads from @var{textual-input-port},
|
The @code{get-string-n} procedure reads from @var{textual-input-port},
|
||||||
|
@ -1840,11 +1840,11 @@ to point just past the characters read. If no characters can be read
|
||||||
before an end of file, the end-of-file object is returned.
|
before an end of file, the end-of-file object is returned.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn {Scheme Procedure} get-string-n! port string start count
|
@deffn {Scheme Procedure} get-string-n! textual-input-port string start count
|
||||||
|
|
||||||
@var{Start} and @var{count} must be exact, non-negative integer objects,
|
@var{start} and @var{count} must be exact, non-negative integer objects,
|
||||||
with @var{count} representing the number of characters to be read.
|
with @var{count} representing the number of characters to be read.
|
||||||
@var{String} must be a string with at least $@var{start} + @var{count}$
|
@var{string} must be a string with at least $@var{start} + @var{count}$
|
||||||
characters.
|
characters.
|
||||||
|
|
||||||
The @code{get-string-n!} procedure reads from @var{textual-input-port}
|
The @code{get-string-n!} procedure reads from @var{textual-input-port}
|
||||||
|
@ -1858,7 +1858,7 @@ exact integer object. If no characters can be read before an end of
|
||||||
file, the end-of-file object is returned.
|
file, the end-of-file object is returned.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn {Scheme Procedure} get-string-all port count
|
@deffn {Scheme Procedure} get-string-all textual-input-port count
|
||||||
Reads from @var{textual-input-port} until an end of file, decoding
|
Reads from @var{textual-input-port} until an end of file, decoding
|
||||||
characters in the same manner as @code{get-string-n} and
|
characters in the same manner as @code{get-string-n} and
|
||||||
@code{get-string-n!}.
|
@code{get-string-n!}.
|
||||||
|
@ -1868,7 +1868,7 @@ all the characters decoded from that data are returned. If no character
|
||||||
precedes the end of file, the end-of-file object is returned.
|
precedes the end of file, the end-of-file object is returned.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn {Scheme Procedure} get-line port
|
@deffn {Scheme Procedure} get-line textual-input-port
|
||||||
Reads from @var{textual-input-port} up to and including the linefeed
|
Reads from @var{textual-input-port} up to and including the linefeed
|
||||||
character or end of file, decoding characters in the same manner as
|
character or end of file, decoding characters in the same manner as
|
||||||
@code{get-string-n} and @code{get-string-n!}.
|
@code{get-string-n} and @code{get-string-n!}.
|
||||||
|
@ -1887,7 +1887,7 @@ any characters are read, the end-of-file object is returned.
|
||||||
@end quotation
|
@end quotation
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn {Scheme Procedure} get-datum port count
|
@deffn {Scheme Procedure} get-datum textual-input-port count
|
||||||
Reads an external representation from @var{textual-input-port} and returns the
|
Reads an external representation from @var{textual-input-port} and returns the
|
||||||
datum it represents. The @code{get-datum} procedure returns the next
|
datum it represents. The @code{get-datum} procedure returns the next
|
||||||
datum that can be parsed from the given @var{textual-input-port}, updating
|
datum that can be parsed from the given @var{textual-input-port}, updating
|
||||||
|
@ -2048,7 +2048,7 @@ Writes @var{char} to the port. The @code{put-char} procedure returns
|
||||||
@code{put-string} procedure returns an unspecified value.
|
@code{put-string} procedure returns an unspecified value.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn {Scheme Procedure} put-datum port datum
|
@deffn {Scheme Procedure} put-datum textual-output-port datum
|
||||||
@var{datum} should be a datum value. The @code{put-datum} procedure
|
@var{datum} should be a datum value. The @code{put-datum} procedure
|
||||||
writes an external representation of @var{datum} to
|
writes an external representation of @var{datum} to
|
||||||
@var{textual-output-port}. The specific external representation is
|
@var{textual-output-port}. The specific external representation is
|
||||||
|
|
|
@ -962,7 +962,7 @@ SCM my_eval_string (SCM str)
|
||||||
Like @code{scm_public_lookup} or @code{scm_private_lookup}, but
|
Like @code{scm_public_lookup} or @code{scm_private_lookup}, but
|
||||||
additionally dereferences the variable. If the variable object is
|
additionally dereferences the variable. If the variable object is
|
||||||
unbound, signals an error. Returns the value bound to @var{name} in
|
unbound, signals an error. Returns the value bound to @var{name} in
|
||||||
@var{module}.
|
@var{module_name}.
|
||||||
@end deftypefn
|
@end deftypefn
|
||||||
|
|
||||||
In addition, there are a number of other lookup-related procedures. We
|
In addition, there are a number of other lookup-related procedures. We
|
||||||
|
@ -1009,7 +1009,7 @@ module is used instead of the current one.
|
||||||
@end deftypefn
|
@end deftypefn
|
||||||
|
|
||||||
@deftypefn {C Function} SCM scm_module_reverse_lookup (SCM @var{module}, SCM @var{variable})
|
@deftypefn {C Function} SCM scm_module_reverse_lookup (SCM @var{module}, SCM @var{variable})
|
||||||
Find the symbol that is bound to @var{variable} in @var{module}. When no such binding is found, return @var{#f}.
|
Find the symbol that is bound to @var{variable} in @var{module}. When no such binding is found, return @code{#f}.
|
||||||
@end deftypefn
|
@end deftypefn
|
||||||
|
|
||||||
@deftypefn {C Function} SCM scm_c_define_module ({const char *}@var{name}, void (*@var{init})(void *), void *@var{data})
|
@deftypefn {C Function} SCM scm_c_define_module ({const char *}@var{name}, void (*@var{init})(void *), void *@var{data})
|
||||||
|
|
|
@ -103,7 +103,7 @@ useful mechanism, combining the process of registration
|
||||||
(@code{scm_c_make_gsubr}) and definition (@code{scm_define}).
|
(@code{scm_c_make_gsubr}) and definition (@code{scm_define}).
|
||||||
|
|
||||||
@deftypefun SCM scm_c_make_gsubr (const char *name, int req, int opt, int rst, fcn)
|
@deftypefun SCM scm_c_make_gsubr (const char *name, int req, int opt, int rst, fcn)
|
||||||
Register a C procedure @var{FCN} as a ``subr'' --- a primitive
|
Register a C procedure @var{fcn} as a ``subr'' --- a primitive
|
||||||
subroutine that can be called from Scheme. It will be associated with
|
subroutine that can be called from Scheme. It will be associated with
|
||||||
the given @var{name} but no environment binding will be created. The
|
the given @var{name} but no environment binding will be created. The
|
||||||
arguments @var{req}, @var{opt} and @var{rst} specify the number of
|
arguments @var{req}, @var{opt} and @var{rst} specify the number of
|
||||||
|
@ -115,7 +115,7 @@ to @var{fcn}, but may not exceed 10. The number of rest arguments should be 0 o
|
||||||
@end deftypefun
|
@end deftypefun
|
||||||
|
|
||||||
@deftypefun SCM scm_c_define_gsubr (const char *name, int req, int opt, int rst, fcn)
|
@deftypefun SCM scm_c_define_gsubr (const char *name, int req, int opt, int rst, fcn)
|
||||||
Register a C procedure @var{FCN}, as for @code{scm_c_make_gsubr}
|
Register a C procedure @var{fcn}, as for @code{scm_c_make_gsubr}
|
||||||
above, and additionally create a top-level Scheme binding for the
|
above, and additionally create a top-level Scheme binding for the
|
||||||
procedure in the ``current environment'' using @code{scm_define}.
|
procedure in the ``current environment'' using @code{scm_define}.
|
||||||
@code{scm_c_define_gsubr} returns a handle for the procedure in the
|
@code{scm_c_define_gsubr} returns a handle for the procedure in the
|
||||||
|
|
|
@ -316,10 +316,10 @@ Higher level thread procedures are available by loading the
|
||||||
@code{(ice-9 threads)} module. These provide standardized
|
@code{(ice-9 threads)} module. These provide standardized
|
||||||
thread creation.
|
thread creation.
|
||||||
|
|
||||||
@deffn macro make-thread proc [args@dots{}]
|
@deffn macro make-thread proc arg @dots{}
|
||||||
Apply @var{proc} to @var{args} in a new thread formed by
|
Apply @var{proc} to @var{arg} @dots{} in a new thread formed by
|
||||||
@code{call-with-new-thread} using a default error handler that display
|
@code{call-with-new-thread} using a default error handler that display
|
||||||
the error to the current error port. The @var{args@dots{}}
|
the error to the current error port. The @var{arg} @dots{}
|
||||||
expressions are evaluated in the new thread.
|
expressions are evaluated in the new thread.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
|
@ -751,12 +751,12 @@ set/restored when control enter or leaves the established dynamic
|
||||||
extent.
|
extent.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn {Scheme Macro} with-fluids ((fluid value) ...) body...
|
@deffn {Scheme Macro} with-fluids ((fluid value) @dots{}) body1 body2 @dots{}
|
||||||
Execute @var{body...} while each @var{fluid} is set to the
|
Execute body @var{body1} @var{body2} @dots{} while each @var{fluid} is
|
||||||
corresponding @var{value}. Both @var{fluid} and @var{value} are
|
set to the corresponding @var{value}. Both @var{fluid} and @var{value}
|
||||||
evaluated and @var{fluid} must yield a fluid. @var{body...} is
|
are evaluated and @var{fluid} must yield a fluid. The body is executed
|
||||||
executed inside a @code{dynamic-wind} and the fluids are set/restored
|
inside a @code{dynamic-wind} and the fluids are set/restored when
|
||||||
when control enter or leaves the established dynamic extent.
|
control enter or leaves the established dynamic extent.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deftypefn {C Function} SCM scm_c_with_fluids (SCM fluids, SCM vals, SCM (*cproc)(void *), void *data)
|
@deftypefn {C Function} SCM scm_c_with_fluids (SCM fluids, SCM vals, SCM (*cproc)(void *), void *data)
|
||||||
|
@ -1043,16 +1043,16 @@ are implemented in terms of futures (@pxref{Futures}). Thus they are
|
||||||
relatively cheap as they re-use existing threads, and portable, since
|
relatively cheap as they re-use existing threads, and portable, since
|
||||||
they automatically use one thread per available CPU core.
|
they automatically use one thread per available CPU core.
|
||||||
|
|
||||||
@deffn syntax parallel expr1 @dots{} exprN
|
@deffn syntax parallel expr @dots{}
|
||||||
Evaluate each @var{expr} expression in parallel, each in its own thread.
|
Evaluate each @var{expr} expression in parallel, each in its own thread.
|
||||||
Return the results as a set of @var{N} multiple values
|
Return the results of @var{n} expressions as a set of @var{n} multiple
|
||||||
(@pxref{Multiple Values}).
|
values (@pxref{Multiple Values}).
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn syntax letpar ((var1 expr1) @dots{} (varN exprN)) body@dots{}
|
@deffn syntax letpar ((var expr) @dots{}) body1 body2 @dots{}
|
||||||
Evaluate each @var{expr} in parallel, each in its own thread, then bind
|
Evaluate each @var{expr} in parallel, each in its own thread, then bind
|
||||||
the results to the corresponding @var{var} variables and evaluate
|
the results to the corresponding @var{var} variables, and then evaluate
|
||||||
@var{body}.
|
@var{body1} @var{body2} @enddots{}
|
||||||
|
|
||||||
@code{letpar} is like @code{let} (@pxref{Local Bindings}), but all the
|
@code{letpar} is like @code{let} (@pxref{Local Bindings}), but all the
|
||||||
expressions for the bindings are evaluated in parallel.
|
expressions for the bindings are evaluated in parallel.
|
||||||
|
@ -1065,11 +1065,10 @@ returns a list comprising the return values from @var{proc}.
|
||||||
@code{par-for-each} returns an unspecified value, but waits for all
|
@code{par-for-each} returns an unspecified value, but waits for all
|
||||||
calls to complete.
|
calls to complete.
|
||||||
|
|
||||||
The @var{proc} calls are @code{(@var{proc} @var{elem1} @dots{}
|
The @var{proc} calls are @code{(@var{proc} @var{elem1} @var{elem2}
|
||||||
@var{elemN})}, where each @var{elem} is from the corresponding
|
@dots{})}, where each @var{elem} is from the corresponding @var{lst} .
|
||||||
@var{lst}. Each @var{lst} must be the same length. The calls are
|
Each @var{lst} must be the same length. The calls are potentially made
|
||||||
potentially made in parallel, depending on the number of CPU cores
|
in parallel, depending on the number of CPU cores available.
|
||||||
available.
|
|
||||||
|
|
||||||
These functions are like @code{map} and @code{for-each} (@pxref{List
|
These functions are like @code{map} and @code{for-each} (@pxref{List
|
||||||
Mapping}), but make their @var{proc} calls in parallel.
|
Mapping}), but make their @var{proc} calls in parallel.
|
||||||
|
|
|
@ -22,8 +22,8 @@ If @var{size} is 0, the default @emph{free} function will do nothing.
|
||||||
|
|
||||||
If @var{size} is not 0, the default @emph{free} function will
|
If @var{size} is not 0, the default @emph{free} function will
|
||||||
deallocate the memory block pointed to by @code{SCM_SMOB_DATA} with
|
deallocate the memory block pointed to by @code{SCM_SMOB_DATA} with
|
||||||
@code{scm_gc_free}. The @var{WHAT} parameter in the call to
|
@code{scm_gc_free}. The @var{what} parameter in the call to
|
||||||
@code{scm_gc_free} will be @var{NAME}.
|
@code{scm_gc_free} will be @var{name}.
|
||||||
|
|
||||||
Default values are provided for the @emph{mark}, @emph{free},
|
Default values are provided for the @emph{mark}, @emph{free},
|
||||||
@emph{print}, and @emph{equalp} functions, as described in
|
@emph{print}, and @emph{equalp} functions, as described in
|
||||||
|
@ -43,7 +43,7 @@ a @dfn{finalizer}) for the smob type specified by the tag
|
||||||
@var{tc}. @var{tc} is the tag returned by @code{scm_make_smob_type}.
|
@var{tc}. @var{tc} is the tag returned by @code{scm_make_smob_type}.
|
||||||
|
|
||||||
The @var{free} procedure must deallocate all resources that are
|
The @var{free} procedure must deallocate all resources that are
|
||||||
directly associated with the smob instance @var{OBJ}. It must assume
|
directly associated with the smob instance @var{obj}. It must assume
|
||||||
that all @code{SCM} values that it references have already been freed
|
that all @code{SCM} values that it references have already been freed
|
||||||
and are thus invalid.
|
and are thus invalid.
|
||||||
|
|
||||||
|
@ -107,14 +107,14 @@ with @code{scm_display}, @code{scm_write}, @code{scm_simple_format},
|
||||||
and @code{scm_puts}.
|
and @code{scm_puts}.
|
||||||
@end deftypefn
|
@end deftypefn
|
||||||
|
|
||||||
@deftypefn {C Function} void scm_set_smob_equalp (scm_t_bits tc, SCM (*equalp) (SCM obj1, SCM obj1))
|
@deftypefn {C Function} void scm_set_smob_equalp (scm_t_bits tc, SCM (*equalp) (SCM obj1, SCM obj2))
|
||||||
This function sets the smob equality-testing predicate for the smob
|
This function sets the smob equality-testing predicate for the smob
|
||||||
type specified by the tag @var{tc}. @var{tc} is the tag returned by
|
type specified by the tag @var{tc}. @var{tc} is the tag returned by
|
||||||
@code{scm_make_smob_type}.
|
@code{scm_make_smob_type}.
|
||||||
|
|
||||||
The @var{equalp} procedure should return @code{SCM_BOOL_T} when
|
The @var{equalp} procedure should return @code{SCM_BOOL_T} when
|
||||||
@var{obj1} is @code{equal?} to @var{obj2}. Else it should return
|
@var{obj1} is @code{equal?} to @var{obj2}. Else it should return
|
||||||
@var{SCM_BOOL_F}. Both @var{obj1} and @var{obj2} are instances of the
|
@code{SCM_BOOL_F}. Both @var{obj1} and @var{obj2} are instances of the
|
||||||
smob type @var{tc}.
|
smob type @var{tc}.
|
||||||
@end deftypefn
|
@end deftypefn
|
||||||
|
|
||||||
|
|
|
@ -429,9 +429,9 @@ any, then the rest argument if any, then all of the keyword arguments.
|
||||||
|
|
||||||
@var{body} is the body of the clause. If the procedure is called with
|
@var{body} is the body of the clause. If the procedure is called with
|
||||||
an appropriate number of arguments, @var{body} is evaluated in tail
|
an appropriate number of arguments, @var{body} is evaluated in tail
|
||||||
position. Otherwise, if there is a @var{consequent}, it should be a
|
position. Otherwise, if there is an @var{alternate}, it should be a
|
||||||
@code{<lambda-case>} expression, representing the next clause to try.
|
@code{<lambda-case>} expression, representing the next clause to try.
|
||||||
If there is no @var{consequent}, a wrong-number-of-arguments error is
|
If there is no @var{alternate}, a wrong-number-of-arguments error is
|
||||||
signaled.
|
signaled.
|
||||||
@end deftp
|
@end deftp
|
||||||
@deftp {Scheme Variable} <let> src names gensyms vals exp
|
@deftp {Scheme Variable} <let> src names gensyms vals exp
|
||||||
|
|
|
@ -90,13 +90,13 @@ dots.}, or in the worst case, displayed as @nicode{#}.
|
||||||
|
|
||||||
@deffn {Scheme Procedure} truncated-print obj [port] [keyword-options]
|
@deffn {Scheme Procedure} truncated-print obj [port] [keyword-options]
|
||||||
Print @var{obj}, truncating the output, if necessary, to make it fit
|
Print @var{obj}, truncating the output, if necessary, to make it fit
|
||||||
into @var{width} characters. By default, @var{x} will be printed using
|
into @var{width} characters. By default, @var{obj} will be printed using
|
||||||
@code{write}, though that behavior can be overridden via the
|
@code{write}, though that behavior can be overridden via the
|
||||||
@var{display?} keyword argument.
|
@var{display?} keyword argument.
|
||||||
|
|
||||||
The default behaviour is to print depth-first, meaning that the entire
|
The default behaviour is to print depth-first, meaning that the entire
|
||||||
remaining width will be available to each sub-expression of @var{x} --
|
remaining width will be available to each sub-expression of @var{obj} --
|
||||||
e.g., if @var{x} is a vector, each member of @var{x}. One can attempt to
|
e.g., if @var{obj} is a vector, each member of @var{obj}. One can attempt to
|
||||||
``ration'' the available width, trying to allocate it equally to each
|
``ration'' the available width, trying to allocate it equally to each
|
||||||
sub-expression, via the @var{breadth-first?} keyword argument.
|
sub-expression, via the @var{breadth-first?} keyword argument.
|
||||||
|
|
||||||
|
|
|
@ -211,8 +211,8 @@ initialized to zero. The @var{modes} string is the same as that
|
||||||
accepted by @code{open-file} (@pxref{File Ports, open-file}).
|
accepted by @code{open-file} (@pxref{File Ports, open-file}).
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn {Scheme Procedure} fdes->ports fd
|
@deffn {Scheme Procedure} fdes->ports fdes
|
||||||
@deffnx {C Function} scm_fdes_to_ports (fd)
|
@deffnx {C Function} scm_fdes_to_ports (fdes)
|
||||||
Return a list of existing ports which have @var{fdes} as an
|
Return a list of existing ports which have @var{fdes} as an
|
||||||
underlying file descriptor, without changing their revealed
|
underlying file descriptor, without changing their revealed
|
||||||
counts.
|
counts.
|
||||||
|
@ -230,8 +230,8 @@ descriptor, if one exists, and increments its revealed count.
|
||||||
Otherwise, returns a new output port with a revealed count of 1.
|
Otherwise, returns a new output port with a revealed count of 1.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn {Scheme Procedure} primitive-move->fdes port fd
|
@deffn {Scheme Procedure} primitive-move->fdes port fdes
|
||||||
@deffnx {C Function} scm_primitive_move_to_fdes (port, fd)
|
@deffnx {C Function} scm_primitive_move_to_fdes (port, fdes)
|
||||||
Moves the underlying file descriptor for @var{port} to the integer
|
Moves the underlying file descriptor for @var{port} to the integer
|
||||||
value @var{fdes} without changing the revealed count of @var{port}.
|
value @var{fdes} without changing the revealed count of @var{port}.
|
||||||
Any other ports already using this descriptor will be automatically
|
Any other ports already using this descriptor will be automatically
|
||||||
|
@ -252,10 +252,10 @@ The return value is unspecified.
|
||||||
Decrements the revealed count for a port.
|
Decrements the revealed count for a port.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn {Scheme Procedure} fsync object
|
@deffn {Scheme Procedure} fsync port_or_fd
|
||||||
@deffnx {C Function} scm_fsync (object)
|
@deffnx {C Function} scm_fsync (port_or_fd)
|
||||||
Copies any unwritten data for the specified output file descriptor to disk.
|
Copies any unwritten data for the specified output file descriptor to disk.
|
||||||
If @var{port/fd} is a port, its buffer is flushed before the underlying
|
If @var{port_or_fd} is a port, its buffer is flushed before the underlying
|
||||||
file descriptor is fsync'd.
|
file descriptor is fsync'd.
|
||||||
The return value is unspecified.
|
The return value is unspecified.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
@ -402,11 +402,11 @@ port.
|
||||||
This procedure is equivalent to @code{(dup->port @var{port} @var{modes})}.
|
This procedure is equivalent to @code{(dup->port @var{port} @var{modes})}.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn {Scheme Procedure} redirect-port old new
|
@deffn {Scheme Procedure} redirect-port old_port new_port
|
||||||
@deffnx {C Function} scm_redirect_port (old, new)
|
@deffnx {C Function} scm_redirect_port (old_port, new_port)
|
||||||
This procedure takes two ports and duplicates the underlying file
|
This procedure takes two ports and duplicates the underlying file
|
||||||
descriptor from @var{old-port} into @var{new-port}. The
|
descriptor from @var{old_port} into @var{new_port}. The
|
||||||
current file descriptor in @var{new-port} will be closed.
|
current file descriptor in @var{new_port} will be closed.
|
||||||
After the redirection the two ports will share a file position
|
After the redirection the two ports will share a file position
|
||||||
and file status flags.
|
and file status flags.
|
||||||
|
|
||||||
|
@ -648,7 +648,7 @@ The GNU C Library Reference Manual}.
|
||||||
@deffn {Scheme Procedure} stat object
|
@deffn {Scheme Procedure} stat object
|
||||||
@deffnx {C Function} scm_stat (object)
|
@deffnx {C Function} scm_stat (object)
|
||||||
Return an object containing various information about the file
|
Return an object containing various information about the file
|
||||||
determined by @var{obj}. @var{obj} can be a string containing
|
determined by @var{object}. @var{object} can be a string containing
|
||||||
a file name or a port or integer file descriptor which is open
|
a file name or a port or integer file descriptor which is open
|
||||||
on a file (in which case @code{fstat} is used as the underlying
|
on a file (in which case @code{fstat} is used as the underlying
|
||||||
system call).
|
system call).
|
||||||
|
@ -728,8 +728,8 @@ An integer representing the access permission bits.
|
||||||
@end deffn
|
@end deffn
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn {Scheme Procedure} lstat str
|
@deffn {Scheme Procedure} lstat path
|
||||||
@deffnx {C Function} scm_lstat (str)
|
@deffnx {C Function} scm_lstat (path)
|
||||||
Similar to @code{stat}, but does not follow symbolic links, i.e.,
|
Similar to @code{stat}, but does not follow symbolic links, i.e.,
|
||||||
it will return information about a symbolic link itself, not the
|
it will return information about a symbolic link itself, not the
|
||||||
file it points to. @var{path} must be a string.
|
file it points to. @var{path} must be a string.
|
||||||
|
@ -762,8 +762,8 @@ as @code{-1}, then that ID is not changed.
|
||||||
@findex fchmod
|
@findex fchmod
|
||||||
@deffn {Scheme Procedure} chmod object mode
|
@deffn {Scheme Procedure} chmod object mode
|
||||||
@deffnx {C Function} scm_chmod (object, mode)
|
@deffnx {C Function} scm_chmod (object, mode)
|
||||||
Changes the permissions of the file referred to by @var{obj}.
|
Changes the permissions of the file referred to by @var{object}.
|
||||||
@var{obj} can be a string containing a file name or a port or integer file
|
@var{object} can be a string containing a file name or a port or integer file
|
||||||
descriptor which is open on a file (in which case @code{fchmod} is used
|
descriptor which is open on a file (in which case @code{fchmod} is used
|
||||||
as the underlying system call).
|
as the underlying system call).
|
||||||
@var{mode} specifies
|
@var{mode} specifies
|
||||||
|
@ -774,7 +774,7 @@ The return value is unspecified.
|
||||||
@deffn {Scheme Procedure} utime pathname [actime [modtime [actimens [modtimens [flags]]]]]
|
@deffn {Scheme Procedure} utime pathname [actime [modtime [actimens [modtimens [flags]]]]]
|
||||||
@deffnx {C Function} scm_utime (pathname, actime, modtime, actimens, modtimens, flags)
|
@deffnx {C Function} scm_utime (pathname, actime, modtime, actimens, modtimens, flags)
|
||||||
@code{utime} sets the access and modification times for the
|
@code{utime} sets the access and modification times for the
|
||||||
file named by @var{path}. If @var{actime} or @var{modtime} is
|
file named by @var{pathname}. If @var{actime} or @var{modtime} is
|
||||||
not supplied, then the current time is used. @var{actime} and
|
not supplied, then the current time is used. @var{actime} and
|
||||||
@var{modtime} must be integer time values as returned by the
|
@var{modtime} must be integer time values as returned by the
|
||||||
@code{current-time} procedure.
|
@code{current-time} procedure.
|
||||||
|
@ -1055,7 +1055,7 @@ stream. Otherwise, close the stream. The @code{setpwent} and
|
||||||
|
|
||||||
@deffn {Scheme Procedure} getpw [user]
|
@deffn {Scheme Procedure} getpw [user]
|
||||||
@deffnx {C Function} scm_getpwuid (user)
|
@deffnx {C Function} scm_getpwuid (user)
|
||||||
Look up an entry in the user database. @var{obj} can be an integer,
|
Look up an entry in the user database. @var{user} can be an integer,
|
||||||
a string, or omitted, giving the behaviour of getpwuid, getpwnam
|
a string, or omitted, giving the behaviour of getpwuid, getpwnam
|
||||||
or getpwent respectively.
|
or getpwent respectively.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
@ -1108,9 +1108,9 @@ stream. Otherwise, close the stream. The @code{setgrent} and
|
||||||
@code{endgrent} procedures are implemented on top of this.
|
@code{endgrent} procedures are implemented on top of this.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn {Scheme Procedure} getgr [name]
|
@deffn {Scheme Procedure} getgr [group]
|
||||||
@deffnx {C Function} scm_getgrgid (name)
|
@deffnx {C Function} scm_getgrgid (group)
|
||||||
Look up an entry in the group database. @var{obj} can be an integer,
|
Look up an entry in the group database. @var{group} can be an integer,
|
||||||
a string, or omitted, giving the behaviour of getgrgid, getgrnam
|
a string, or omitted, giving the behaviour of getgrgid, getgrnam
|
||||||
or getgrent respectively.
|
or getgrent respectively.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
@ -1284,7 +1284,7 @@ names are from the current locale and in the locale character set.
|
||||||
@cindex time parsing
|
@cindex time parsing
|
||||||
Performs the reverse action to @code{strftime}, parsing
|
Performs the reverse action to @code{strftime}, parsing
|
||||||
@var{string} according to the specification supplied in
|
@var{string} according to the specification supplied in
|
||||||
@var{template}. The interpretation of month and day names is
|
@var{format}. The interpretation of month and day names is
|
||||||
dependent on the current locale. The value returned is a pair.
|
dependent on the current locale. The value returned is a pair.
|
||||||
The @acronym{CAR} has an object with time components
|
The @acronym{CAR} has an object with time components
|
||||||
in the form returned by @code{localtime} or @code{gmtime},
|
in the form returned by @code{localtime} or @code{gmtime},
|
||||||
|
@ -1411,8 +1411,8 @@ The given strings are all copied, so the C data is not accessed again
|
||||||
once @code{scm_set_program_arguments} returns.
|
once @code{scm_set_program_arguments} returns.
|
||||||
@end deftypefn
|
@end deftypefn
|
||||||
|
|
||||||
@deffn {Scheme Procedure} getenv nam
|
@deffn {Scheme Procedure} getenv name
|
||||||
@deffnx {C Function} scm_getenv (nam)
|
@deffnx {C Function} scm_getenv (name)
|
||||||
@cindex environment
|
@cindex environment
|
||||||
Looks up the string @var{name} in the current environment. The return
|
Looks up the string @var{name} in the current environment. The return
|
||||||
value is @code{#f} unless a string of the form @code{NAME=VALUE} is
|
value is @code{#f} unless a string of the form @code{NAME=VALUE} is
|
||||||
|
@ -1442,8 +1442,8 @@ If @var{env} is omitted, return the current environment (in the
|
||||||
Unix sense) as a list of strings. Otherwise set the current
|
Unix sense) as a list of strings. Otherwise set the current
|
||||||
environment, which is also the default environment for child
|
environment, which is also the default environment for child
|
||||||
processes, to the supplied list of strings. Each member of
|
processes, to the supplied list of strings. Each member of
|
||||||
@var{env} should be of the form @var{NAME}=@var{VALUE} and values of
|
@var{env} should be of the form @var{name}=@var{value} and values of
|
||||||
@var{NAME} should not be duplicated. If @var{env} is supplied
|
@var{name} should not be duplicated. If @var{env} is supplied
|
||||||
then the return value is unspecified.
|
then the return value is unspecified.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
|
@ -1452,11 +1452,11 @@ then the return value is unspecified.
|
||||||
Modifies the environment of the current process, which is
|
Modifies the environment of the current process, which is
|
||||||
also the default environment inherited by child processes.
|
also the default environment inherited by child processes.
|
||||||
|
|
||||||
If @var{string} is of the form @code{NAME=VALUE} then it will be written
|
If @var{str} is of the form @code{NAME=VALUE} then it will be written
|
||||||
directly into the environment, replacing any existing environment string
|
directly into the environment, replacing any existing environment string
|
||||||
with
|
with
|
||||||
name matching @code{NAME}. If @var{string} does not contain an equal
|
name matching @code{NAME}. If @var{str} does not contain an equal
|
||||||
sign, then any existing string with name matching @var{string} will
|
sign, then any existing string with name matching @var{str} will
|
||||||
be removed.
|
be removed.
|
||||||
|
|
||||||
The return value is unspecified.
|
The return value is unspecified.
|
||||||
|
@ -1472,7 +1472,7 @@ The return value is unspecified.
|
||||||
@deffn {Scheme Procedure} chdir str
|
@deffn {Scheme Procedure} chdir str
|
||||||
@deffnx {C Function} scm_chdir (str)
|
@deffnx {C Function} scm_chdir (str)
|
||||||
@cindex current directory
|
@cindex current directory
|
||||||
Change the current working directory to @var{path}.
|
Change the current working directory to @var{str}.
|
||||||
The return value is unspecified.
|
The return value is unspecified.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
|
@ -1745,13 +1745,13 @@ in the child would upset the protocol in the parent, so
|
||||||
|
|
||||||
@deffn {Scheme Procedure} execl filename . args
|
@deffn {Scheme Procedure} execl filename . args
|
||||||
@deffnx {C Function} scm_execl (filename, args)
|
@deffnx {C Function} scm_execl (filename, args)
|
||||||
Executes the file named by @var{path} as a new process image.
|
Executes the file named by @var{filename} as a new process image.
|
||||||
The remaining arguments are supplied to the process; from a C program
|
The remaining arguments are supplied to the process; from a C program
|
||||||
they are accessible as the @code{argv} argument to @code{main}.
|
they are accessible as the @code{argv} argument to @code{main}.
|
||||||
Conventionally the first @var{arg} is the same as @var{path}.
|
Conventionally the first @var{arg} is the same as @var{filename}.
|
||||||
All arguments must be strings.
|
All arguments must be strings.
|
||||||
|
|
||||||
If @var{arg} is missing, @var{path} is executed with a null
|
If @var{arg} is missing, @var{filename} is executed with a null
|
||||||
argument list, which may have system-dependent side-effects.
|
argument list, which may have system-dependent side-effects.
|
||||||
|
|
||||||
This procedure is currently implemented using the @code{execv} system
|
This procedure is currently implemented using the @code{execv} system
|
||||||
|
|
|
@ -311,7 +311,7 @@ they do not work at the top level.
|
||||||
@deffn {REPL Command} backtrace [count] [#:width w] [#:full? f]
|
@deffn {REPL Command} backtrace [count] [#:width w] [#:full? f]
|
||||||
Print a backtrace.
|
Print a backtrace.
|
||||||
|
|
||||||
Print a backtrace of all stack frames, or innermost @var{COUNT} frames.
|
Print a backtrace of all stack frames, or innermost @var{count} frames.
|
||||||
If @var{count} is negative, the last @var{count} frames will be shown.
|
If @var{count} is negative, the last @var{count} frames will be shown.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
|
@ -406,11 +406,11 @@ reenter the REPL.
|
||||||
@node Inspect Commands
|
@node Inspect Commands
|
||||||
@subsubsection Inspect Commands
|
@subsubsection Inspect Commands
|
||||||
|
|
||||||
@deffn {REPL Command} inspect EXP
|
@deffn {REPL Command} inspect exp
|
||||||
Inspect the result(s) of evaluating @var{exp}.
|
Inspect the result(s) of evaluating @var{exp}.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn {REPL Command} pretty-print EXP
|
@deffn {REPL Command} pretty-print exp
|
||||||
Pretty-print the result(s) of evaluating @var{exp}.
|
Pretty-print the result(s) of evaluating @var{exp}.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
|
|
|
@ -2322,7 +2322,7 @@ any) will be stored for later retrieval via a call to
|
||||||
Wait for @var{thread} to terminate and return its exit value. When a
|
Wait for @var{thread} to terminate and return its exit value. When a
|
||||||
time value @var{timeout} is given, it specifies a point in time where
|
time value @var{timeout} is given, it specifies a point in time where
|
||||||
the waiting should be aborted. When the waiting is aborted,
|
the waiting should be aborted. When the waiting is aborted,
|
||||||
@var{timeoutval} is returned if it is specified; otherwise, a
|
@var{timeout-val} is returned if it is specified; otherwise, a
|
||||||
@code{join-timeout-exception} exception is raised
|
@code{join-timeout-exception} exception is raised
|
||||||
(@pxref{SRFI-18 Exceptions}). Exceptions may also be raised if the
|
(@pxref{SRFI-18 Exceptions}). Exceptions may also be raised if the
|
||||||
thread was terminated by a call to @code{thread-terminate!}
|
thread was terminated by a call to @code{thread-terminate!}
|
||||||
|
@ -2430,8 +2430,8 @@ replaces a procedure of the same name in the core library.
|
||||||
@end defun
|
@end defun
|
||||||
|
|
||||||
@defun condition-variable-name condition-variable
|
@defun condition-variable-name condition-variable
|
||||||
Returns the name assigned to @var{thread} at the time of its creation,
|
Returns the name assigned to @var{condition-variable} at the time of its
|
||||||
or @code{#f} if it was not given a name.
|
creation, or @code{#f} if it was not given a name.
|
||||||
@end defun
|
@end defun
|
||||||
|
|
||||||
@defun condition-variable-specific condition-variable
|
@defun condition-variable-specific condition-variable
|
||||||
|
@ -3533,7 +3533,7 @@ Return the value of the field named @var{field-name} from condition @var{c}.
|
||||||
If @var{c} is a compound condition and several underlying condition
|
If @var{c} is a compound condition and several underlying condition
|
||||||
types contain a field named @var{field-name}, then the value of the
|
types contain a field named @var{field-name}, then the value of the
|
||||||
first such field is returned, using the order in which conditions were
|
first such field is returned, using the order in which conditions were
|
||||||
passed to @var{make-compound-condition}.
|
passed to @code{make-compound-condition}.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn {Scheme Procedure} extract-condition c type
|
@deffn {Scheme Procedure} extract-condition c type
|
||||||
|
@ -3858,7 +3858,7 @@ This is a Guile-specific addition to the SRFI, similar to the core
|
||||||
@defun with-parameters* param-list value-list thunk
|
@defun with-parameters* param-list value-list thunk
|
||||||
Establish a new dynamic scope, as per @code{parameterize} above,
|
Establish a new dynamic scope, as per @code{parameterize} above,
|
||||||
taking parameters from @var{param-list} and corresponding values from
|
taking parameters from @var{param-list} and corresponding values from
|
||||||
@var{values-list}. A call @code{(@var{thunk})} is made in the new
|
@var{value-list}. A call @code{(@var{thunk})} is made in the new
|
||||||
scope and the result from that @var{thunk} is the return from
|
scope and the result from that @var{thunk} is the return from
|
||||||
@code{with-parameters*}.
|
@code{with-parameters*}.
|
||||||
@end defun
|
@end defun
|
||||||
|
|
|
@ -432,7 +432,7 @@ then @code{local-set}, used when binding boxed variables.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn Instruction empty-box index
|
@deffn Instruction empty-box index
|
||||||
Set the @var{indext}h local variable to a box containing a variable
|
Set the @var{index}th local variable to a box containing a variable
|
||||||
whose value is unbound. Used when compiling some @code{letrec}
|
whose value is unbound. Used when compiling some @code{letrec}
|
||||||
expressions.
|
expressions.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
@ -918,13 +918,13 @@ Jump to @var{offset} if the object on the stack is false.
|
||||||
|
|
||||||
@deffn Instruction br-if-eq offset
|
@deffn Instruction br-if-eq offset
|
||||||
Jump to @var{offset} if the two objects located on the stack are
|
Jump to @var{offset} if the two objects located on the stack are
|
||||||
equal in the sense of @var{eq?}. Note that, for this instruction, the
|
equal in the sense of @code{eq?}. Note that, for this instruction, the
|
||||||
stack pointer is decremented by two Scheme objects instead of only
|
stack pointer is decremented by two Scheme objects instead of only
|
||||||
one.
|
one.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn Instruction br-if-not-eq offset
|
@deffn Instruction br-if-not-eq offset
|
||||||
Same as @var{br-if-eq} for non-@code{eq?} objects.
|
Same as @code{br-if-eq} for non-@code{eq?} objects.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn Instruction br-if-null offset
|
@deffn Instruction br-if-null offset
|
||||||
|
|
|
@ -1116,7 +1116,7 @@ if there was no request body.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn {Scheme Procedure} write-request-body r bv
|
@deffn {Scheme Procedure} write-request-body r bv
|
||||||
Write @var{body}, a bytevector, to the port corresponding to the HTTP
|
Write @var{bv}, a bytevector, to the port corresponding to the HTTP
|
||||||
request @var{r}.
|
request @var{r}.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
|
@ -1212,7 +1212,7 @@ As a side effect, sets the encoding on @var{port} to ISO-8859-1
|
||||||
discussion of character sets in @ref{Responses}, for more information.
|
discussion of character sets in @ref{Responses}, for more information.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn {Scheme Procedure} build-response [#:version='(1 . 1)] [#:code=200] [#:reason-phrase=#f] [#:headers='()] [#:port=#f] [#:validate-headers=#t]
|
@deffn {Scheme Procedure} build-response [#:version='(1 . 1)] [#:code=200] [#:reason-phrase=#f] [#:headers='()] [#:port=#f] [#:validate-headers?=#t]
|
||||||
Construct an HTTP response object. If @var{validate-headers?} is true,
|
Construct an HTTP response object. If @var{validate-headers?} is true,
|
||||||
the headers are each run through their respective validators.
|
the headers are each run through their respective validators.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
@ -1241,7 +1241,7 @@ if there was no response body.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn {Scheme Procedure} write-response-body r bv
|
@deffn {Scheme Procedure} write-response-body r bv
|
||||||
Write @var{body}, a bytevector, to the port corresponding to the HTTP
|
Write @var{bv}, a bytevector, to the port corresponding to the HTTP
|
||||||
response @var{r}.
|
response @var{r}.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
|
@ -1291,7 +1291,7 @@ the lower-level HTTP, request, and response modules.
|
||||||
@deffn {Scheme Procedure} open-socket-for-uri uri
|
@deffn {Scheme Procedure} open-socket-for-uri uri
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn {Scheme Procedure} http-get uri [#:port=(open-socket-for-uri uri)] [#:version='(1 . 1)] [#:keep-alive?=#f] [#:extra-headers='()] [#:decode-body=#t]
|
@deffn {Scheme Procedure} http-get uri [#:port=(open-socket-for-uri uri)] [#:version='(1 . 1)] [#:keep-alive?=#f] [#:extra-headers='()] [#:decode-body?=#t]
|
||||||
Connect to the server corresponding to @var{uri} and ask for the
|
Connect to the server corresponding to @var{uri} and ask for the
|
||||||
resource, using the @code{GET} method. If you already have a port open,
|
resource, using the @code{GET} method. If you already have a port open,
|
||||||
pass it as @var{port}. The port will be closed at the end of the
|
pass it as @var{port}. The port will be closed at the end of the
|
||||||
|
|
|
@ -691,7 +691,7 @@ and locations in the new environment are mutable.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn Primitive leaf-environment? object
|
@deffn Primitive leaf-environment? object
|
||||||
Return @code{#t} if @var{object} is a leaf environment, or @var{#f}
|
Return @code{#t} if @var{object} is a leaf environment, or @code{#f}
|
||||||
otherwise.
|
otherwise.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
|
@ -815,7 +815,7 @@ Return a new environment @var{exp} containing only those bindings in
|
||||||
The environment @var{exp} binds @var{symbol} to @var{location} when
|
The environment @var{exp} binds @var{symbol} to @var{location} when
|
||||||
@var{env} does, and @var{symbol} is exported by @var{signature}.
|
@var{env} does, and @var{symbol} is exported by @var{signature}.
|
||||||
|
|
||||||
@var{Signature} is a list specifying which of the bindings in
|
@var{signature} is a list specifying which of the bindings in
|
||||||
@var{private} should be visible in @var{exp}. Each element of
|
@var{private} should be visible in @var{exp}. Each element of
|
||||||
@var{signature} should be a list of the form:
|
@var{signature} should be a list of the form:
|
||||||
@example
|
@example
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue