mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-29 19:30:36 +02:00
Fix typos throughout codebase.
* NEWS: * README: * doc/r5rs/r5rs.texi: * doc/ref/api-data.texi: * doc/ref/api-debug.texi: * doc/ref/api-evaluation.texi: * doc/ref/api-io.texi: * doc/ref/api-macros.texi: * doc/ref/api-procedures.texi: * doc/ref/api-scheduling.texi: * doc/ref/api-undocumented.texi: * doc/ref/libguile-concepts.texi: * doc/ref/posix.texi: * doc/ref/srfi-modules.texi: * doc/ref/vm.texi: * doc/ref/web.texi: * examples/box-dynamic-module/box.c: * examples/box-dynamic/box.c: * examples/box-module/box.c: * examples/box/box.c: * examples/safe/safe: * examples/scripts/README: * examples/scripts/hello: * gc-benchmarks/larceny/twobit-input-long.sch: * gc-benchmarks/larceny/twobit-smaller.sch: * gc-benchmarks/larceny/twobit.sch: * libguile/expand.c: * libguile/load.c: * libguile/net_db.c: * libguile/scmsigs.c: * libguile/srfi-14.c: * libguile/threads.c: * meta/guile.m4: * module/ice-9/match.upstream.scm: * module/ice-9/ports.scm: * module/language/cps/graphs.scm: * module/scripts/doc-snarf.scm: * module/srfi/srfi-19.scm: * module/system/repl/command.scm: * test-suite/tests/srfi-18.test: Fix typos. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
99e727adde
commit
c7d170c5d1
40 changed files with 360 additions and 360 deletions
74
NEWS
74
NEWS
|
@ -206,7 +206,7 @@ or not.
|
||||||
|
|
||||||
** Avoid the need for a custom GMP allocator
|
** Avoid the need for a custom GMP allocator
|
||||||
|
|
||||||
In Guile 3.0.6, we fixed a longstanding bug in Guile's use of the
|
In Guile 3.0.6, we fixed a long-standing bug in Guile's use of the
|
||||||
library that Guile uses to implement bignums (large integers), GMP
|
library that Guile uses to implement bignums (large integers), GMP
|
||||||
(https://gmplib.org). See the Guile 3.0.6 release notes. However this
|
(https://gmplib.org). See the Guile 3.0.6 release notes. However this
|
||||||
left us with a suboptimal Guile, in which each large integer had to have
|
left us with a suboptimal Guile, in which each large integer had to have
|
||||||
|
@ -783,7 +783,7 @@ written in C.
|
||||||
|
|
||||||
The compiler now properly reduces expressions such as (equal? c #\x) to
|
The compiler now properly reduces expressions such as (equal? c #\x) to
|
||||||
(eq? c #\x). This was not the case in 3.0.2, which could lead to slower
|
(eq? c #\x). This was not the case in 3.0.2, which could lead to slower
|
||||||
code, especially in 'match' expressions with many clauses with with
|
code, especially in 'match' expressions with many clauses with
|
||||||
character literals.
|
character literals.
|
||||||
|
|
||||||
** JIT bugs on ARMv7 have been fixed
|
** JIT bugs on ARMv7 have been fixed
|
||||||
|
@ -856,7 +856,7 @@ Changes in 3.0.2 (since 3.0.1)
|
||||||
|
|
||||||
** New (srfi srfi-171) module
|
** New (srfi srfi-171) module
|
||||||
|
|
||||||
This module implements "tranducers" as specified in
|
This module implements "transducers" as specified in
|
||||||
<https://srfi.schemers.org/srfi-171/srfi-171.html>.
|
<https://srfi.schemers.org/srfi-171/srfi-171.html>.
|
||||||
Thanks to Linus Björnstam for this new API!
|
Thanks to Linus Björnstam for this new API!
|
||||||
|
|
||||||
|
@ -1093,9 +1093,9 @@ In light of these considerations, Guile has now changed to make
|
||||||
exception handling and defined a hierarchy of R6RS-style exception types
|
exception handling and defined a hierarchy of R6RS-style exception types
|
||||||
in its core. SRFI-34/35, R6RS, and the exception-handling components of
|
in its core. SRFI-34/35, R6RS, and the exception-handling components of
|
||||||
SRFI-18 (threads) have been re-implemented in terms of this core
|
SRFI-18 (threads) have been re-implemented in terms of this core
|
||||||
functionality. There is also a a compatibility layer that makes it so
|
functionality. There is also a compatibility layer that makes it so
|
||||||
that exceptions originating in `throw' can be handled by
|
that exceptions originating in `throw' can be handled by
|
||||||
`with-exception-hander', and vice-versa for `raise-exception' and
|
`with-exception-handler', and vice-versa for `raise-exception' and
|
||||||
`catch'.
|
`catch'.
|
||||||
|
|
||||||
Generally speaking, users will see no difference. The one significant
|
Generally speaking, users will see no difference. The one significant
|
||||||
|
@ -1104,7 +1104,7 @@ through their `with-exception-handler'/`guard' forms, because whereas
|
||||||
before they would only see exceptions thrown by SRFI-34, now they will
|
before they would only see exceptions thrown by SRFI-34, now they will
|
||||||
see exceptions thrown by R6RS, R7RS, or indeed `throw'.
|
see exceptions thrown by R6RS, R7RS, or indeed `throw'.
|
||||||
|
|
||||||
Guile's situation is transitional. Most exceptions are still signalled
|
Guile's situation is transitional. Most exceptions are still signaled
|
||||||
via `throw'. These will probably migrate over time to
|
via `throw'. These will probably migrate over time to
|
||||||
`raise-exception', while preserving compatibility of course.
|
`raise-exception', while preserving compatibility of course.
|
||||||
|
|
||||||
|
@ -2222,7 +2222,7 @@ See "Atomics" in the manual.
|
||||||
** Thread-local fluids
|
** Thread-local fluids
|
||||||
|
|
||||||
Guile now has support for fluids whose values are not captured by
|
Guile now has support for fluids whose values are not captured by
|
||||||
`current-dynamic-state' and not inheritied by child threads, and thus
|
`current-dynamic-state' and not inherited by child threads, and thus
|
||||||
are local to the kernel thread they run on. See "Thread-Local
|
are local to the kernel thread they run on. See "Thread-Local
|
||||||
Variables" in the manual, for more.
|
Variables" in the manual, for more.
|
||||||
|
|
||||||
|
@ -2376,7 +2376,7 @@ manage an implementation-side buffer are no longer needed.
|
||||||
*** Change prototype of `scm_make_port_type'
|
*** Change prototype of `scm_make_port_type'
|
||||||
|
|
||||||
The `read' (renamed from `fill_input') and `write' functions now operate
|
The `read' (renamed from `fill_input') and `write' functions now operate
|
||||||
on bytevectors. Also the `mode_bits' argument now inplicitly includes
|
on bytevectors. Also the `mode_bits' argument now implicitly includes
|
||||||
SCM_OPN, so you don't need to include these.
|
SCM_OPN, so you don't need to include these.
|
||||||
|
|
||||||
*** Change prototype of port `close' function
|
*** Change prototype of port `close' function
|
||||||
|
@ -2468,7 +2468,7 @@ deprecated; use `scm_unlock_mutex' instead.
|
||||||
** Removed `unchecked-unlock' mutex flag
|
** Removed `unchecked-unlock' mutex flag
|
||||||
|
|
||||||
This flag was introduced for internal use by SRFI-18; use SRFI-18
|
This flag was introduced for internal use by SRFI-18; use SRFI-18
|
||||||
mutexes if you need this behaviour.
|
mutexes if you need this behavior.
|
||||||
|
|
||||||
** SRFI-18 mutexes no longer recursive
|
** SRFI-18 mutexes no longer recursive
|
||||||
|
|
||||||
|
@ -2661,7 +2661,7 @@ was made private (use `SCM_TICK' instead).
|
||||||
|
|
||||||
As the compiler and virtual machine were re-written, there are many
|
As the compiler and virtual machine were re-written, there are many
|
||||||
changes in the back-end of Guile to interfaces that were introduced in
|
changes in the back-end of Guile to interfaces that were introduced in
|
||||||
Guile 2.0. These changes are only only of interest if you wrote a
|
Guile 2.0. These changes are only of interest if you wrote a
|
||||||
language on Guile 2.0 or a tool using Guile 2.0 internals. If this is
|
language on Guile 2.0 or a tool using Guile 2.0 internals. If this is
|
||||||
the case, drop by the IRC channel to discuss the changes.
|
the case, drop by the IRC channel to discuss the changes.
|
||||||
|
|
||||||
|
@ -3531,7 +3531,7 @@ support (libguile).
|
||||||
*** Don't use the identifier 'noreturn'.
|
*** Don't use the identifier 'noreturn'.
|
||||||
(http://bugs.gnu.org/15798)
|
(http://bugs.gnu.org/15798)
|
||||||
*** Rewrite SCM_I_INUM to avoid unspecified behavior when not using GNU C.
|
*** Rewrite SCM_I_INUM to avoid unspecified behavior when not using GNU C.
|
||||||
*** Improve fallback implemention of SCM_SRS to avoid unspecified behavior.
|
*** Improve fallback implementation of SCM_SRS to avoid unspecified behavior.
|
||||||
*** SRFI-60: Reimplement 'rotate-bit-field' on inums to be more portable.
|
*** SRFI-60: Reimplement 'rotate-bit-field' on inums to be more portable.
|
||||||
*** Improve compliance with C standards regarding signed integer shifts.
|
*** Improve compliance with C standards regarding signed integer shifts.
|
||||||
*** Avoid signed overflow in random.c.
|
*** Avoid signed overflow in random.c.
|
||||||
|
@ -3769,7 +3769,7 @@ object.
|
||||||
|
|
||||||
** New procedures for converting strings to and from bytevectors
|
** New procedures for converting strings to and from bytevectors
|
||||||
|
|
||||||
See "Representing Strings as Bytes" for documention on the new `(ice-9
|
See "Representing Strings as Bytes" for documentation on the new `(ice-9
|
||||||
iconv)' module and its `bytevector->string' and `string->bytevector'
|
iconv)' module and its `bytevector->string' and `string->bytevector'
|
||||||
procedures.
|
procedures.
|
||||||
|
|
||||||
|
@ -4286,7 +4286,7 @@ manual for replacements.
|
||||||
|
|
||||||
* Bug fixes
|
* Bug fixes
|
||||||
|
|
||||||
** Fix use of unitialized stat buffer in search-path of absolute paths.
|
** Fix use of uninitialized stat buffer in search-path of absolute paths.
|
||||||
** Avoid calling `freelocale' with a NULL argument.
|
** Avoid calling `freelocale' with a NULL argument.
|
||||||
** Work around erroneous tr_TR locale in Darwin 8 in tests.
|
** Work around erroneous tr_TR locale in Darwin 8 in tests.
|
||||||
** Fix `getaddrinfo' test for Darwin 8.
|
** Fix `getaddrinfo' test for Darwin 8.
|
||||||
|
@ -4887,7 +4887,7 @@ Byte Access" in the manual, for more.
|
||||||
|
|
||||||
** R6RS fixnum arithmetic optimizations
|
** R6RS fixnum arithmetic optimizations
|
||||||
|
|
||||||
R6RS fixnum operations are are still slower than generic arithmetic,
|
R6RS fixnum operations are still slower than generic arithmetic,
|
||||||
however.
|
however.
|
||||||
|
|
||||||
** New procedure: `define-inlinable'
|
** New procedure: `define-inlinable'
|
||||||
|
@ -5306,7 +5306,7 @@ combining arity and formals. For example:
|
||||||
(procedure-arguments resolve-interface)
|
(procedure-arguments resolve-interface)
|
||||||
=> ((required . (name)) (rest . args))
|
=> ((required . (name)) (rest . args))
|
||||||
|
|
||||||
Additionally, `module-commentary' is now publically exported from
|
Additionally, `module-commentary' is now publicly exported from
|
||||||
`(ice-9 session).
|
`(ice-9 session).
|
||||||
|
|
||||||
** Removed: `procedure->memoizing-macro', `procedure->syntax'
|
** Removed: `procedure->memoizing-macro', `procedure->syntax'
|
||||||
|
@ -5721,7 +5721,7 @@ on chance.
|
||||||
|
|
||||||
** `load' is a macro (!) that resolves paths relative to source file dir
|
** `load' is a macro (!) that resolves paths relative to source file dir
|
||||||
|
|
||||||
The familiar Schem `load' procedure is now a macro that captures the
|
The familiar Scheme `load' procedure is now a macro that captures the
|
||||||
name of the source file being expanded, and dispatches to the new
|
name of the source file being expanded, and dispatches to the new
|
||||||
`load-in-vicinity'. Referencing `load' by bare name returns a closure
|
`load-in-vicinity'. Referencing `load' by bare name returns a closure
|
||||||
that embeds the current source file name.
|
that embeds the current source file name.
|
||||||
|
@ -5790,7 +5790,7 @@ Scheme code is now expanded by default by the psyntax hygienic macro
|
||||||
expander. Expansion is performed completely before compilation or
|
expander. Expansion is performed completely before compilation or
|
||||||
interpretation.
|
interpretation.
|
||||||
|
|
||||||
Notably, syntax errors will be signalled before interpretation begins.
|
Notably, syntax errors will be signaled before interpretation begins.
|
||||||
In the past, many syntax errors were only detected at runtime if the
|
In the past, many syntax errors were only detected at runtime if the
|
||||||
code in question was memoized.
|
code in question was memoized.
|
||||||
|
|
||||||
|
@ -7191,7 +7191,7 @@ per Section 5.2.1.
|
||||||
the core bindings got priority, preventing SRFI replacements or
|
the core bindings got priority, preventing SRFI replacements or
|
||||||
extensions.)
|
extensions.)
|
||||||
** `regexp-exec' doesn't abort() on #\nul in the input or bad flags arg
|
** `regexp-exec' doesn't abort() on #\nul in the input or bad flags arg
|
||||||
** `kill' on mingw throws an error for a PID other than oneself
|
** `kill' on MinGW throws an error for a PID other than oneself
|
||||||
** Procedure names are attached to procedure-with-setters
|
** Procedure names are attached to procedure-with-setters
|
||||||
** Array read syntax works with negative lower bound
|
** Array read syntax works with negative lower bound
|
||||||
** `array-in-bounds?' fix if an array has different lower bounds on each index
|
** `array-in-bounds?' fix if an array has different lower bounds on each index
|
||||||
|
@ -8136,7 +8136,7 @@ Also, there is SCM_SMOB_FLAGS and SCM_SET_SMOB_FLAGS that should be
|
||||||
used to get and set the 16 exra bits in the zeroth word of a smob.
|
used to get and set the 16 exra bits in the zeroth word of a smob.
|
||||||
|
|
||||||
And finally, there is SCM_SMOB_OBJECT and SCM_SMOB_SET_OBJECT for
|
And finally, there is SCM_SMOB_OBJECT and SCM_SMOB_SET_OBJECT for
|
||||||
accesing the first immediate word of a smob as a SCM value, and there
|
accessing the first immediate word of a smob as a SCM value, and there
|
||||||
is SCM_SMOB_OBJECT_LOC for getting a pointer to the first immediate
|
is SCM_SMOB_OBJECT_LOC for getting a pointer to the first immediate
|
||||||
smob word. Like wise for SCM_SMOB_OBJECT_2, etc.
|
smob word. Like wise for SCM_SMOB_OBJECT_2, etc.
|
||||||
|
|
||||||
|
@ -9357,9 +9357,9 @@ This function provides a fast C level alternative for scm_memq for the case
|
||||||
that the list parameter is known to be a proper list. The function is a
|
that the list parameter is known to be a proper list. The function is a
|
||||||
replacement for scm_sloppy_memq, but is stricter in its requirements on its
|
replacement for scm_sloppy_memq, but is stricter in its requirements on its
|
||||||
list input parameter, since for anything else but a proper list the function's
|
list input parameter, since for anything else but a proper list the function's
|
||||||
behaviour is undefined - it may even crash or loop endlessly. Further, for
|
behavior is undefined - it may even crash or loop endlessly. Further, for
|
||||||
the case that the object is not found in the list, scm_c_memq returns #f which
|
the case that the object is not found in the list, scm_c_memq returns #f which
|
||||||
is similar to scm_memq, but different from scm_sloppy_memq's behaviour.
|
is similar to scm_memq, but different from scm_sloppy_memq's behavior.
|
||||||
|
|
||||||
** New functions: scm_remember_upto_here_1, scm_remember_upto_here_2,
|
** New functions: scm_remember_upto_here_1, scm_remember_upto_here_2,
|
||||||
scm_remember_upto_here
|
scm_remember_upto_here
|
||||||
|
@ -9808,7 +9808,7 @@ the pthreads to allocate the stack.
|
||||||
** Positions of erring expression in scripts
|
** Positions of erring expression in scripts
|
||||||
|
|
||||||
With version 1.3.4, the location of the erring expression in Guile
|
With version 1.3.4, the location of the erring expression in Guile
|
||||||
scipts is no longer automatically reported. (This should have been
|
scripts is no longer automatically reported. (This should have been
|
||||||
documented before the 1.3.4 release.)
|
documented before the 1.3.4 release.)
|
||||||
|
|
||||||
You can get this information by enabling recording of positions of
|
You can get this information by enabling recording of positions of
|
||||||
|
@ -9927,7 +9927,7 @@ I/O, and in scm_equalp.
|
||||||
|
|
||||||
** close-input-port and close-output-port are now R5RS
|
** close-input-port and close-output-port are now R5RS
|
||||||
|
|
||||||
These procedures have been turned into primitives and have R5RS behaviour.
|
These procedures have been turned into primitives and have R5RS behavior.
|
||||||
|
|
||||||
** New procedure: simple-format PORT MESSAGE ARG1 ...
|
** New procedure: simple-format PORT MESSAGE ARG1 ...
|
||||||
|
|
||||||
|
@ -10576,7 +10576,7 @@ a variable GENERIC which can be used by the dispatch macros below.
|
||||||
New macro: SCM_WTA_DISPATCH_2 (GENERIC, ARG1, ARG2, POS, SUBR)
|
New macro: SCM_WTA_DISPATCH_2 (GENERIC, ARG1, ARG2, POS, SUBR)
|
||||||
|
|
||||||
These correspond to the scm_wta function call, and have the same
|
These correspond to the scm_wta function call, and have the same
|
||||||
behaviour until the user has called the GOOPS primitive
|
behavior until the user has called the GOOPS primitive
|
||||||
`enable-primitive-generic!'. After that, these macros will apply the
|
`enable-primitive-generic!'. After that, these macros will apply the
|
||||||
generic function GENERIC to the argument(s) instead of calling
|
generic function GENERIC to the argument(s) instead of calling
|
||||||
scm_wta.
|
scm_wta.
|
||||||
|
@ -10636,7 +10636,7 @@ This is the typical way of creating a hook from C code.
|
||||||
Currently, the variable is created in the "current" module.
|
Currently, the variable is created in the "current" module.
|
||||||
This might change when we get the new module system.
|
This might change when we get the new module system.
|
||||||
|
|
||||||
[The behaviour is identical to scm_make_named_hook.]
|
[The behavior is identical to scm_make_named_hook.]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -10700,7 +10700,7 @@ in backtraces.
|
||||||
their equivalent letrec. Previously, internal defines would
|
their equivalent letrec. Previously, internal defines would
|
||||||
incrementally add to the innermost environment, without checking
|
incrementally add to the innermost environment, without checking
|
||||||
whether the restrictions specified in RnRS were met. This lead to the
|
whether the restrictions specified in RnRS were met. This lead to the
|
||||||
correct behaviour when these restriction actually were met, but didn't
|
correct behavior when these restriction actually were met, but didn't
|
||||||
catch all illegal uses. Such an illegal use could lead to crashes of
|
catch all illegal uses. Such an illegal use could lead to crashes of
|
||||||
the Guile interpreter or other unwanted results. An example of
|
the Guile interpreter or other unwanted results. An example of
|
||||||
incorrect internal defines that made Guile behave erratically:
|
incorrect internal defines that made Guile behave erratically:
|
||||||
|
@ -10716,7 +10716,7 @@ incorrect internal defines that made Guile behave erratically:
|
||||||
=> 2
|
=> 2
|
||||||
|
|
||||||
The problem with this example is that the definition of `c' uses the
|
The problem with this example is that the definition of `c' uses the
|
||||||
value of `b' directly. This confuses the meoization machine of Guile
|
value of `b' directly. This confuses the memoization machine of Guile
|
||||||
so that the second call of `b' (this time in a larger environment that
|
so that the second call of `b' (this time in a larger environment that
|
||||||
also contains bindings for `c' and `d') refers to the binding of `c'
|
also contains bindings for `c' and `d') refers to the binding of `c'
|
||||||
instead of `a'. You could also make Guile crash with a variation on
|
instead of `a'. You could also make Guile crash with a variation on
|
||||||
|
@ -10804,7 +10804,7 @@ when the hook was created.
|
||||||
|
|
||||||
*** The expect-strings macro now matches `$' in a regular expression
|
*** The expect-strings macro now matches `$' in a regular expression
|
||||||
only at a line-break or end-of-file by default. Previously it would
|
only at a line-break or end-of-file by default. Previously it would
|
||||||
match the end of the string accumulated so far. The old behaviour
|
match the end of the string accumulated so far. The old behavior
|
||||||
can be obtained by setting the variable `expect-strings-exec-flags'
|
can be obtained by setting the variable `expect-strings-exec-flags'
|
||||||
to 0.
|
to 0.
|
||||||
|
|
||||||
|
@ -11289,7 +11289,7 @@ Copy the substring of STRING1 from START (inclusive) to END
|
||||||
(exclusive) to STRING2 at START. STRING1 and STRING2 may be the same
|
(exclusive) to STRING2 at START. STRING1 and STRING2 may be the same
|
||||||
string, and the source and destination areas may overlap; in all
|
string, and the source and destination areas may overlap; in all
|
||||||
cases, the function behaves as if all the characters were copied
|
cases, the function behaves as if all the characters were copied
|
||||||
simultanously.
|
simultaneously.
|
||||||
|
|
||||||
*** Extended functions: substring-move-left! substring-move-right!
|
*** Extended functions: substring-move-left! substring-move-right!
|
||||||
|
|
||||||
|
@ -11446,7 +11446,7 @@ and examples for `lambda*':
|
||||||
|
|
||||||
lambda* creates a procedure that takes optional arguments. These
|
lambda* creates a procedure that takes optional arguments. These
|
||||||
are specified by putting them inside brackets at the end of the
|
are specified by putting them inside brackets at the end of the
|
||||||
paramater list, but before any dotted rest argument. For example,
|
parameter list, but before any dotted rest argument. For example,
|
||||||
(lambda* (a b #&optional c d . e) '())
|
(lambda* (a b #&optional c d . e) '())
|
||||||
creates a procedure with fixed arguments a and b, optional arguments c
|
creates a procedure with fixed arguments a and b, optional arguments c
|
||||||
and d, and rest argument e. If the optional arguments are omitted
|
and d, and rest argument e. If the optional arguments are omitted
|
||||||
|
@ -11713,7 +11713,7 @@ forms instead of the result of the last body form. In contrast to
|
||||||
|
|
||||||
** New functions: read-history FILENAME, write-history FILENAME
|
** New functions: read-history FILENAME, write-history FILENAME
|
||||||
Read/write command line history from/to file. Returns #t on success
|
Read/write command line history from/to file. Returns #t on success
|
||||||
and #f if an error occured.
|
and #f if an error occurred.
|
||||||
|
|
||||||
** `ls' and `lls' in module (ice-9 ls) now handle no arguments.
|
** `ls' and `lls' in module (ice-9 ls) now handle no arguments.
|
||||||
|
|
||||||
|
@ -11737,7 +11737,7 @@ modules.
|
||||||
** gh_scm2doubles
|
** gh_scm2doubles
|
||||||
|
|
||||||
Now takes a second argument which is the result array. If this
|
Now takes a second argument which is the result array. If this
|
||||||
pointer is NULL, a new array is malloced (the old behaviour).
|
pointer is NULL, a new array is malloced (the old behavior).
|
||||||
|
|
||||||
** gh_chars2byvect, gh_shorts2svect, gh_floats2fvect, gh_scm2chars,
|
** gh_chars2byvect, gh_shorts2svect, gh_floats2fvect, gh_scm2chars,
|
||||||
gh_scm2shorts, gh_scm2longs, gh_scm2floats
|
gh_scm2shorts, gh_scm2longs, gh_scm2floats
|
||||||
|
@ -11824,7 +11824,7 @@ It is replaced by:
|
||||||
void (*write_flush) (SCM port));
|
void (*write_flush) (SCM port));
|
||||||
|
|
||||||
Similarly to the new smob interface, there is a set of function
|
Similarly to the new smob interface, there is a set of function
|
||||||
setters by which the user can customize the behaviour of his port
|
setters by which the user can customize the behavior of his port
|
||||||
type. See ports.h (scm_set_port_XXX).
|
type. See ports.h (scm_set_port_XXX).
|
||||||
|
|
||||||
** scm_strport_to_string: New function: creates a new string from
|
** scm_strport_to_string: New function: creates a new string from
|
||||||
|
@ -12084,7 +12084,7 @@ call ADD-HISTORY to make previous input available to the user.
|
||||||
** The behavior of the read-line function has changed.
|
** The behavior of the read-line function has changed.
|
||||||
|
|
||||||
This function now uses standard C library functions to read the line,
|
This function now uses standard C library functions to read the line,
|
||||||
for speed. This means that it doesn not respect the value of
|
for speed. This means that it does not respect the value of
|
||||||
scm-line-incrementors; it assumes that lines are delimited with
|
scm-line-incrementors; it assumes that lines are delimited with
|
||||||
#\newline.
|
#\newline.
|
||||||
|
|
||||||
|
@ -13148,7 +13148,7 @@ signum is the signal number, which can be specified using the value
|
||||||
of SIGINT etc.
|
of SIGINT etc.
|
||||||
|
|
||||||
If action is omitted, sigaction returns a pair: the CAR is the current
|
If action is omitted, sigaction returns a pair: the CAR is the current
|
||||||
signal hander, which will be either an integer with the value SIG_DFL
|
signal handler, which will be either an integer with the value SIG_DFL
|
||||||
(default action) or SIG_IGN (ignore), or the Scheme procedure which
|
(default action) or SIG_IGN (ignore), or the Scheme procedure which
|
||||||
handles the signal, or #f if a non-Scheme procedure handles the
|
handles the signal, or #f if a non-Scheme procedure handles the
|
||||||
signal. The CDR contains the current sigaction flags for the handler.
|
signal. The CDR contains the current sigaction flags for the handler.
|
||||||
|
@ -13389,7 +13389,7 @@ traced.
|
||||||
|
|
||||||
The `untrace' function accepts any number of procedures as arguments,
|
The `untrace' function accepts any number of procedures as arguments,
|
||||||
and tells the Guile interpreter not to trace them any more. When
|
and tells the Guile interpreter not to trace them any more. When
|
||||||
invoked with no arguments, `untrace' untraces all curretly traced
|
invoked with no arguments, `untrace' untraces all currently traced
|
||||||
procedures.
|
procedures.
|
||||||
|
|
||||||
The tracing in Guile has an advantage over most other systems: we
|
The tracing in Guile has an advantage over most other systems: we
|
||||||
|
@ -13819,7 +13819,7 @@ HANDLER is a pointer to a C function to deal with a throw to TAG,
|
||||||
should one occur. We call it like this:
|
should one occur. We call it like this:
|
||||||
HANDLER (HANDLER_DATA, THROWN_TAG, THROW_ARGS)
|
HANDLER (HANDLER_DATA, THROWN_TAG, THROW_ARGS)
|
||||||
where
|
where
|
||||||
HANDLER_DATA is the HANDLER_DATA argument we recevied; it's the
|
HANDLER_DATA is the HANDLER_DATA argument we received; it's the
|
||||||
same idea as BODY_DATA above.
|
same idea as BODY_DATA above.
|
||||||
THROWN_TAG is the tag that the user threw to; usually this is
|
THROWN_TAG is the tag that the user threw to; usually this is
|
||||||
TAG, but it could be something else if TAG was #t (i.e., a
|
TAG, but it could be something else if TAG was #t (i.e., a
|
||||||
|
|
2
README
2
README
|
@ -172,7 +172,7 @@ switches specific to Guile you may find useful in some circumstances.
|
||||||
Build a Guile executable and library that supports multi-threading.
|
Build a Guile executable and library that supports multi-threading.
|
||||||
|
|
||||||
The default is to enable threading support when your operating
|
The default is to enable threading support when your operating
|
||||||
system offsers 'POSIX threads'. When you do not want threading, use
|
system offers 'POSIX threads'. When you do not want threading, use
|
||||||
`--without-threads'.
|
`--without-threads'.
|
||||||
|
|
||||||
--enable-deprecated=LEVEL
|
--enable-deprecated=LEVEL
|
||||||
|
|
|
@ -633,7 +633,7 @@ provided as convenient abbreviations.
|
||||||
|
|
||||||
@cindex @w{error}
|
@cindex @w{error}
|
||||||
When speaking of an error situation, this report uses the phrase ``an
|
When speaking of an error situation, this report uses the phrase ``an
|
||||||
error is signalled'' to indicate that implementations must detect and
|
error is signaled'' to indicate that implementations must detect and
|
||||||
report the error. If such wording does not appear in the discussion of
|
report the error. If such wording does not appear in the discussion of
|
||||||
an error, then implementations are not required to detect or report the
|
an error, then implementations are not required to detect or report the
|
||||||
error, though they are encouraged to do so. An error situation that
|
error, though they are encouraged to do so. An error situation that
|
||||||
|
@ -6804,7 +6804,7 @@ the file should already exist; for
|
||||||
the effect is unspecified if the file
|
the effect is unspecified if the file
|
||||||
already exists. These procedures call @var{proc} with one argument: the
|
already exists. These procedures call @var{proc} with one argument: the
|
||||||
port obtained by opening the named file for input or output. If the
|
port obtained by opening the named file for input or output. If the
|
||||||
file cannot be opened, an error is signalled. If @var{proc} returns,
|
file cannot be opened, an error is signaled. If @var{proc} returns,
|
||||||
then the port is closed automatically and the value(s) yielded by the
|
then the port is closed automatically and the value(s) yielded by the
|
||||||
@var{proc} is(are) returned. If @var{proc} does not return, then
|
@var{proc} is(are) returned. If @var{proc} does not return, then
|
||||||
the port will not be closed automatically unless it is possible to
|
the port will not be closed automatically unless it is possible to
|
||||||
|
@ -6905,7 +6905,7 @@ instead of ``the value returned by @var{current-input-port}''. (Same for
|
||||||
|
|
||||||
Takes a string naming an existing file and returns an input port capable of
|
Takes a string naming an existing file and returns an input port capable of
|
||||||
delivering characters from the file. If the file cannot be opened, an error is
|
delivering characters from the file. If the file cannot be opened, an error is
|
||||||
signalled.
|
signaled.
|
||||||
|
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
|
@ -6915,7 +6915,7 @@ signalled.
|
||||||
|
|
||||||
Takes a string naming an output file to be created and returns an output
|
Takes a string naming an output file to be created and returns an output
|
||||||
port capable of writing characters to a new file by that name. If the file
|
port capable of writing characters to a new file by that name. If the file
|
||||||
cannot be opened, an error is signalled. If a file with the given name
|
cannot be opened, an error is signaled. If a file with the given name
|
||||||
already exists, the effect is unspecified.
|
already exists, the effect is unspecified.
|
||||||
|
|
||||||
@end deffn
|
@end deffn
|
||||||
|
@ -6985,7 +6985,7 @@ object is returned.
|
||||||
to read will also return an end of file object. If an end of file is
|
to read will also return an end of file object. If an end of file is
|
||||||
encountered after the beginning of an object's external representation,
|
encountered after the beginning of an object's external representation,
|
||||||
but the external representation is incomplete and therefore not parsable,
|
but the external representation is incomplete and therefore not parsable,
|
||||||
an error is signalled.
|
an error is signaled.
|
||||||
|
|
||||||
The @var{port} argument may be omitted, in which case it defaults to the
|
The @var{port} argument may be omitted, in which case it defaults to the
|
||||||
value returned by @samp{current-input-port}. It is an error to read from
|
value returned by @samp{current-input-port}. It is an error to read from
|
||||||
|
|
|
@ -481,7 +481,7 @@ number.
|
||||||
@deftypefn {C Function} void scm_to_mpz (SCM val, mpz_t rop)
|
@deftypefn {C Function} void scm_to_mpz (SCM val, mpz_t rop)
|
||||||
Assign @var{val} to the multiple precision integer @var{rop}.
|
Assign @var{val} to the multiple precision integer @var{rop}.
|
||||||
@var{val} must be an exact integer, otherwise an error will be
|
@var{val} must be an exact integer, otherwise an error will be
|
||||||
signalled. @var{rop} must have been initialized with @code{mpz_init}
|
signaled. @var{rop} must have been initialized with @code{mpz_init}
|
||||||
before this function is called. When @var{rop} is no longer needed
|
before this function is called. When @var{rop} is no longer needed
|
||||||
the occupied space must be freed with @code{mpz_clear}.
|
the occupied space must be freed with @code{mpz_clear}.
|
||||||
@xref{Initializing Integers,,, gmp, GNU MP Manual}, for details.
|
@xref{Initializing Integers,,, gmp, GNU MP Manual}, for details.
|
||||||
|
@ -877,7 +877,7 @@ the number is inexact.
|
||||||
|
|
||||||
If the exactness indicator is omitted, the number is exact unless it
|
If the exactness indicator is omitted, the number is exact unless it
|
||||||
contains a radix point. Since Guile can not represent exact complex
|
contains a radix point. Since Guile can not represent exact complex
|
||||||
numbers, an error is signalled when asking for them.
|
numbers, an error is signaled when asking for them.
|
||||||
|
|
||||||
@lisp
|
@lisp
|
||||||
(exact? 1.2)
|
(exact? 1.2)
|
||||||
|
@ -2551,7 +2551,7 @@ Return a character set containing all characters whose
|
||||||
character codes lie in the half-open range
|
character codes lie in the half-open range
|
||||||
[@var{lower},@var{upper}).
|
[@var{lower},@var{upper}).
|
||||||
|
|
||||||
If @var{error} is a true value, an error is signalled if the
|
If @var{error} is a true value, an error is signaled if the
|
||||||
specified range contains characters which are not contained in
|
specified range contains characters which are not contained in
|
||||||
the implemented character range. If @var{error} is @code{#f},
|
the implemented character range. If @var{error} is @code{#f},
|
||||||
these characters are silently left out of the resulting
|
these characters are silently left out of the resulting
|
||||||
|
@ -2567,7 +2567,7 @@ Return a character set containing all characters whose
|
||||||
character codes lie in the half-open range
|
character codes lie in the half-open range
|
||||||
[@var{lower},@var{upper}).
|
[@var{lower},@var{upper}).
|
||||||
|
|
||||||
If @var{error} is a true value, an error is signalled if the
|
If @var{error} is a true value, an error is signaled if the
|
||||||
specified range contains characters which are not contained in
|
specified range contains characters which are not contained in
|
||||||
the implemented character range. If @var{error} is @code{#f},
|
the implemented character range. If @var{error} is @code{#f},
|
||||||
these characters are silently left out of the resulting
|
these characters are silently left out of the resulting
|
||||||
|
@ -4386,7 +4386,7 @@ encoding of the current locale. The C string must be freed with
|
||||||
@xref{Dynamic Wind}.
|
@xref{Dynamic Wind}.
|
||||||
|
|
||||||
For @code{scm_to_locale_string}, the returned string is
|
For @code{scm_to_locale_string}, the returned string is
|
||||||
null-terminated and an error is signalled when @var{str} contains
|
null-terminated and an error is signaled when @var{str} contains
|
||||||
@code{#\nul} characters.
|
@code{#\nul} characters.
|
||||||
|
|
||||||
For @code{scm_to_locale_stringn} and @var{lenp} not @code{NULL},
|
For @code{scm_to_locale_stringn} and @var{lenp} not @code{NULL},
|
||||||
|
@ -8031,7 +8031,7 @@ must be protected so that the pointer remains valid. Such a protected
|
||||||
array is said to be @dfn{reserved}. A reserved array can be read but
|
array is said to be @dfn{reserved}. A reserved array can be read but
|
||||||
modifications to it that would cause the pointer to its elements to
|
modifications to it that would cause the pointer to its elements to
|
||||||
become invalid are prevented. When you attempt such a modification, an
|
become invalid are prevented. When you attempt such a modification, an
|
||||||
error is signalled.
|
error is signaled.
|
||||||
|
|
||||||
(This is similar to locking the array while it is in use, but without
|
(This is similar to locking the array while it is in use, but without
|
||||||
the danger of a deadlock. In a multi-threaded program, you will need
|
the danger of a deadlock. In a multi-threaded program, you will need
|
||||||
|
@ -8155,7 +8155,7 @@ for (i = 0; i < RANK; i++)
|
||||||
Compute the position corresponding to @var{indices}, a list of
|
Compute the position corresponding to @var{indices}, a list of
|
||||||
indices. The position is computed as described above for
|
indices. The position is computed as described above for
|
||||||
@code{scm_array_handle_dims}. The number of the indices and their
|
@code{scm_array_handle_dims}. The number of the indices and their
|
||||||
range is checked and an appropriate error is signalled for invalid
|
range is checked and an appropriate error is signaled for invalid
|
||||||
indices.
|
indices.
|
||||||
@end deftypefn
|
@end deftypefn
|
||||||
|
|
||||||
|
@ -8169,7 +8169,7 @@ range checking is done on @var{pos}.
|
||||||
Set the element at position @var{pos} in the storage block of the array
|
Set the element at position @var{pos} in the storage block of the array
|
||||||
represented by @var{handle} to @var{val}. Any kind of array is
|
represented by @var{handle} to @var{val}. Any kind of array is
|
||||||
acceptable. No range checking is done on @var{pos}. An error is
|
acceptable. No range checking is done on @var{pos}. An error is
|
||||||
signalled when the array can not store @var{val}.
|
signaled when the array can not store @var{val}.
|
||||||
@end deftypefn
|
@end deftypefn
|
||||||
|
|
||||||
@deftypefn {C Function} {const SCM *} scm_array_handle_elements (scm_t_array_handle *handle)
|
@deftypefn {C Function} {const SCM *} scm_array_handle_elements (scm_t_array_handle *handle)
|
||||||
|
|
|
@ -359,7 +359,7 @@ library, or from Guile itself.
|
||||||
A common requirement is to be able to show as much useful context as
|
A common requirement is to be able to show as much useful context as
|
||||||
possible when a Scheme program hits an error. The most immediate
|
possible when a Scheme program hits an error. The most immediate
|
||||||
information about an error is the kind of error that it is -- such as
|
information about an error is the kind of error that it is -- such as
|
||||||
``division by zero'' -- and any parameters that the code which signalled
|
``division by zero'' -- and any parameters that the code which signaled
|
||||||
the error chose explicitly to provide. This information originates with
|
the error chose explicitly to provide. This information originates with
|
||||||
the @code{error} or @code{raise-exception} call (or their C code
|
the @code{error} or @code{raise-exception} call (or their C code
|
||||||
equivalents, if the error is detected by C code) that signals the error,
|
equivalents, if the error is detected by C code) that signals the error,
|
||||||
|
|
|
@ -974,7 +974,7 @@ of modifying the path both at compile-time and at run-time.
|
||||||
Search @code{%load-path} for the file named @var{filename} and
|
Search @code{%load-path} for the file named @var{filename} and
|
||||||
load it into the top-level environment. If @var{filename} is a
|
load it into the top-level environment. If @var{filename} is a
|
||||||
relative pathname and is not found in the list of search paths,
|
relative pathname and is not found in the list of search paths,
|
||||||
an error is signalled. Preferentially loads a compiled version of the
|
an error is signaled. Preferentially loads a compiled version of the
|
||||||
file, if it is available and up-to-date.
|
file, if it is available and up-to-date.
|
||||||
|
|
||||||
If @var{filename} is a relative pathname and is not found in the list of
|
If @var{filename} is a relative pathname and is not found in the list of
|
||||||
|
@ -983,7 +983,7 @@ second argument, @var{exception-on-not-found}. If it is @code{#f},
|
||||||
@code{#f} will be returned. If it is a procedure, it will be called
|
@code{#f} will be returned. If it is a procedure, it will be called
|
||||||
with no arguments. (This allows a distinction to be made between
|
with no arguments. (This allows a distinction to be made between
|
||||||
exceptions raised by loading a file, and exceptions related to the
|
exceptions raised by loading a file, and exceptions related to the
|
||||||
loader itself.) Otherwise an error is signalled.
|
loader itself.) Otherwise an error is signaled.
|
||||||
|
|
||||||
For compatibility with Guile 1.8 and earlier, the C function takes only
|
For compatibility with Guile 1.8 and earlier, the C function takes only
|
||||||
one argument, which can be either a string (the file name) or an
|
one argument, which can be either a string (the file name) or an
|
||||||
|
|
|
@ -710,7 +710,7 @@ something that the user needs to explicitly be aware of.) The data is
|
||||||
written to the store later -- when the buffer fills up due to another
|
written to the store later -- when the buffer fills up due to another
|
||||||
write, or when @code{force-output} is called, or when @code{close-port}
|
write, or when @code{force-output} is called, or when @code{close-port}
|
||||||
is called, or when the program exits, or even when the garbage collector
|
is called, or when the program exits, or even when the garbage collector
|
||||||
runs. The salient point is, @emph{the errors are signalled then too}.
|
runs. The salient point is, @emph{the errors are signaled then too}.
|
||||||
Buffered writes defer error detection (and defer the side effects to the
|
Buffered writes defer error detection (and defer the side effects to the
|
||||||
mutable store), perhaps indefinitely if the port type does not need to
|
mutable store), perhaps indefinitely if the port type does not need to
|
||||||
be closed at GC.
|
be closed at GC.
|
||||||
|
|
|
@ -149,7 +149,7 @@ patterns, and as many templates as there are patterns.
|
||||||
When the syntax expander sees the invocation of a @code{syntax-rules} macro, it
|
When the syntax expander sees the invocation of a @code{syntax-rules} macro, it
|
||||||
matches the expression against the patterns, in order, and rewrites the
|
matches the expression against the patterns, in order, and rewrites the
|
||||||
expression using the template from the first matching pattern. If no pattern
|
expression using the template from the first matching pattern. If no pattern
|
||||||
matches, a syntax error is signalled.
|
matches, a syntax error is signaled.
|
||||||
|
|
||||||
@subsubsection Patterns
|
@subsubsection Patterns
|
||||||
|
|
||||||
|
|
|
@ -550,7 +550,7 @@ matches the number of actual arguments against the formals in the
|
||||||
various clauses, in order. The first matching clause is selected, the
|
various clauses, in order. The first matching clause is selected, the
|
||||||
corresponding values from the actual parameter list are bound to the
|
corresponding values from the actual parameter list are bound to the
|
||||||
variable names in the clauses and the body of the clause is evaluated.
|
variable names in the clauses and the body of the clause is evaluated.
|
||||||
If no clause matches, an error is signalled.
|
If no clause matches, an error is signaled.
|
||||||
|
|
||||||
The syntax of the @code{case-lambda} form is defined in the following
|
The syntax of the @code{case-lambda} form is defined in the following
|
||||||
EBNF grammar. @dfn{Formals} means a formal argument list just like
|
EBNF grammar. @dfn{Formals} means a formal argument list just like
|
||||||
|
|
|
@ -329,7 +329,7 @@ wait using the following procedures:
|
||||||
|
|
||||||
@deftypefn {C Function} int scm_c_prepare_to_wait_on_fd (int fd)
|
@deftypefn {C Function} int scm_c_prepare_to_wait_on_fd (int fd)
|
||||||
Inform Guile that the current thread is about to sleep, and that if an
|
Inform Guile that the current thread is about to sleep, and that if an
|
||||||
asynchronous interrupt is signalled on this thread, Guile should wake up
|
asynchronous interrupt is signaled on this thread, Guile should wake up
|
||||||
the thread by writing a zero byte to @var{fd}. Returns zero if the
|
the thread by writing a zero byte to @var{fd}. Returns zero if the
|
||||||
prepare succeeded, or nonzero if the thread already has a pending async
|
prepare succeeded, or nonzero if the thread already has a pending async
|
||||||
and that it should avoid waiting.
|
and that it should avoid waiting.
|
||||||
|
@ -337,7 +337,7 @@ and that it should avoid waiting.
|
||||||
|
|
||||||
@deftypefn {C Function} int scm_c_prepare_to_wait_on_cond (scm_i_pthread_mutex_t *mutex, scm_i_pthread_cond_t *cond)
|
@deftypefn {C Function} int scm_c_prepare_to_wait_on_cond (scm_i_pthread_mutex_t *mutex, scm_i_pthread_cond_t *cond)
|
||||||
Inform Guile that the current thread is about to sleep, and that if an
|
Inform Guile that the current thread is about to sleep, and that if an
|
||||||
asynchronous interrupt is signalled on this thread, Guile should wake up
|
asynchronous interrupt is signaled on this thread, Guile should wake up
|
||||||
the thread by acquiring @var{mutex} and signalling @var{cond}. The
|
the thread by acquiring @var{mutex} and signalling @var{cond}. The
|
||||||
caller must already hold @var{mutex} and only drop it as part of the
|
caller must already hold @var{mutex} and only drop it as part of the
|
||||||
@code{pthread_cond_wait} call. Returns zero if the prepare succeeded,
|
@code{pthread_cond_wait} call. Returns zero if the prepare succeeded,
|
||||||
|
@ -574,7 +574,7 @@ waiting should be aborted. It can be either an integer as returned
|
||||||
by @code{current-time} or a pair as returned by @code{gettimeofday}.
|
by @code{current-time} or a pair as returned by @code{gettimeofday}.
|
||||||
When the waiting is aborted, @code{#f} is returned.
|
When the waiting is aborted, @code{#f} is returned.
|
||||||
|
|
||||||
For standard mutexes (@code{make-mutex}), an error is signalled if the
|
For standard mutexes (@code{make-mutex}), an error is signaled if the
|
||||||
thread has itself already locked @var{mutex}.
|
thread has itself already locked @var{mutex}.
|
||||||
|
|
||||||
For a recursive mutex (@code{make-recursive-mutex}), if the thread has
|
For a recursive mutex (@code{make-recursive-mutex}), if the thread has
|
||||||
|
@ -601,7 +601,7 @@ timeout.
|
||||||
|
|
||||||
@deffn {Scheme Procedure} unlock-mutex mutex
|
@deffn {Scheme Procedure} unlock-mutex mutex
|
||||||
@deffnx {C Function} scm_unlock_mutex (mutex)
|
@deffnx {C Function} scm_unlock_mutex (mutex)
|
||||||
Unlock @var{mutex}. An error is signalled if @var{mutex} is not locked.
|
Unlock @var{mutex}. An error is signaled if @var{mutex} is not locked.
|
||||||
|
|
||||||
``Standard'' and ``recursive'' mutexes can only be unlocked by the
|
``Standard'' and ``recursive'' mutexes can only be unlocked by the
|
||||||
thread that locked them; Guile detects this situation and signals an
|
thread that locked them; Guile detects this situation and signals an
|
||||||
|
@ -642,14 +642,14 @@ return @code{#f}.
|
||||||
|
|
||||||
@deffn {Scheme Procedure} wait-condition-variable condvar mutex [time]
|
@deffn {Scheme Procedure} wait-condition-variable condvar mutex [time]
|
||||||
@deffnx {C Function} scm_wait_condition_variable (condvar, mutex, time)
|
@deffnx {C Function} scm_wait_condition_variable (condvar, mutex, time)
|
||||||
Wait until @var{condvar} has been signalled. While waiting,
|
Wait until @var{condvar} has been signaled. While waiting,
|
||||||
@var{mutex} is atomically unlocked (as with @code{unlock-mutex}) and
|
@var{mutex} is atomically unlocked (as with @code{unlock-mutex}) and
|
||||||
is locked again when this function returns. When @var{time} is given,
|
is locked again when this function returns. When @var{time} is given,
|
||||||
it specifies a point in time where the waiting should be aborted. It
|
it specifies a point in time where the waiting should be aborted. It
|
||||||
can be either a integer as returned by @code{current-time} or a pair
|
can be either a integer as returned by @code{current-time} or a pair
|
||||||
as returned by @code{gettimeofday}. When the waiting is aborted,
|
as returned by @code{gettimeofday}. When the waiting is aborted,
|
||||||
@code{#f} is returned. When the condition variable has in fact been
|
@code{#f} is returned. When the condition variable has in fact been
|
||||||
signalled, @code{#t} is returned. The mutex is re-locked in any case
|
signaled, @code{#t} is returned. The mutex is re-locked in any case
|
||||||
before @code{wait-condition-variable} returns.
|
before @code{wait-condition-variable} returns.
|
||||||
|
|
||||||
When an async is activated for a thread that is blocked in a call to
|
When an async is activated for a thread that is blocked in a call to
|
||||||
|
|
|
@ -30,7 +30,7 @@ call. There is no provision for resetting the counter.
|
||||||
@deffn {Scheme Procedure} symbol-set! o s v
|
@deffn {Scheme Procedure} symbol-set! o s v
|
||||||
@deffnx {C Function} scm_symbol_set_x (o, s, v)
|
@deffnx {C Function} scm_symbol_set_x (o, s, v)
|
||||||
Find the symbol in @var{obarray} whose name is @var{string}, and rebind
|
Find the symbol in @var{obarray} whose name is @var{string}, and rebind
|
||||||
it to @var{value}. An error is signalled if @var{string} is not present
|
it to @var{value}. An error is signaled if @var{string} is not present
|
||||||
in @var{obarray}.
|
in @var{obarray}.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ value.
|
||||||
Look up in @var{obarray} the symbol whose name is @var{string}, and
|
Look up in @var{obarray} the symbol whose name is @var{string}, and
|
||||||
return the value to which it is bound. If @var{obarray} is @code{#f},
|
return the value to which it is bound. If @var{obarray} is @code{#f},
|
||||||
use the global symbol table. If @var{string} is not interned in
|
use the global symbol table. If @var{string} is not interned in
|
||||||
@var{obarray}, an error is signalled.
|
@var{obarray}, an error is signaled.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn {Scheme Procedure} unintern-symbol o s
|
@deffn {Scheme Procedure} unintern-symbol o s
|
||||||
|
@ -88,7 +88,7 @@ table; instead, simply return @code{#f}.
|
||||||
Read a form from @var{port} (standard input by default), and evaluate it
|
Read a form from @var{port} (standard input by default), and evaluate it
|
||||||
(memoizing it in the process) in the top-level environment. If no data
|
(memoizing it in the process) in the top-level environment. If no data
|
||||||
is left to be read from @var{port}, an @code{end-of-file} error is
|
is left to be read from @var{port}, an @code{end-of-file} error is
|
||||||
signalled.
|
signaled.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn {Scheme Procedure} sloppy-member x lst
|
@deffn {Scheme Procedure} sloppy-member x lst
|
||||||
|
|
|
@ -601,7 +601,7 @@ executed. Locking a mutex while in that section ensures that no other
|
||||||
thread will start executing it, blocking asyncs ensures that no
|
thread will start executing it, blocking asyncs ensures that no
|
||||||
asynchronous code enters the section again from the current thread, and
|
asynchronous code enters the section again from the current thread, and
|
||||||
the error checking of Guile mutexes guarantees that an error is
|
the error checking of Guile mutexes guarantees that an error is
|
||||||
signalled when the current thread accidentally reenters the critical
|
signaled when the current thread accidentally reenters the critical
|
||||||
section via recursive function calls.
|
section via recursive function calls.
|
||||||
|
|
||||||
Guile provides two mechanisms to support critical sections as outlined
|
Guile provides two mechanisms to support critical sections as outlined
|
||||||
|
|
|
@ -2242,7 +2242,7 @@ Install or report the signal handler for a specified signal.
|
||||||
of variables such as @code{SIGINT}.
|
of variables such as @code{SIGINT}.
|
||||||
|
|
||||||
If @var{handler} is omitted, @code{sigaction} returns a pair: the
|
If @var{handler} is omitted, @code{sigaction} returns a pair: the
|
||||||
@acronym{CAR} is the current signal hander, which will be either an
|
@acronym{CAR} is the current signal handler, which will be either an
|
||||||
integer with the value @code{SIG_DFL} (default action) or
|
integer with the value @code{SIG_DFL} (default action) or
|
||||||
@code{SIG_IGN} (ignore), or the Scheme procedure which handles the
|
@code{SIG_IGN} (ignore), or the Scheme procedure which handles the
|
||||||
signal, or @code{#f} if a non-Scheme procedure handles the signal.
|
signal, or @code{#f} if a non-Scheme procedure handles the signal.
|
||||||
|
@ -2262,9 +2262,9 @@ call to @code{sigaction} is used.
|
||||||
following (where provided by the system), or @code{0} for none.
|
following (where provided by the system), or @code{0} for none.
|
||||||
|
|
||||||
@defvar SA_NOCLDSTOP
|
@defvar SA_NOCLDSTOP
|
||||||
By default, @code{SIGCHLD} is signalled when a child process stops
|
By default, @code{SIGCHLD} is signaled when a child process stops
|
||||||
(ie.@: receives @code{SIGSTOP}), and when a child process terminates.
|
(ie.@: receives @code{SIGSTOP}), and when a child process terminates.
|
||||||
With the @code{SA_NOCLDSTOP} flag, @code{SIGCHLD} is only signalled
|
With the @code{SA_NOCLDSTOP} flag, @code{SIGCHLD} is only signaled
|
||||||
for termination, not stopping.
|
for termination, not stopping.
|
||||||
|
|
||||||
@code{SA_NOCLDSTOP} has no effect on signals other than
|
@code{SA_NOCLDSTOP} has no effect on signals other than
|
||||||
|
@ -2354,7 +2354,7 @@ Get or set the periods programmed in certain system timers.
|
||||||
These timers have two settings. The first setting, the interval, is the
|
These timers have two settings. The first setting, the interval, is the
|
||||||
value at which the timer will be reset when the current timer expires.
|
value at which the timer will be reset when the current timer expires.
|
||||||
The second is the current value of the timer, indicating when the next
|
The second is the current value of the timer, indicating when the next
|
||||||
expiry will be signalled.
|
expiry will be signaled.
|
||||||
|
|
||||||
@var{which_timer} is one of the following values:
|
@var{which_timer} is one of the following values:
|
||||||
|
|
||||||
|
@ -3123,7 +3123,7 @@ The following procedures are used to search the service database:
|
||||||
Look up a network service by name or by service number, and return a
|
Look up a network service by name or by service number, and return a
|
||||||
network service object. The @var{protocol} argument specifies the name
|
network service object. The @var{protocol} argument specifies the name
|
||||||
of the desired protocol; if the protocol found in the network service
|
of the desired protocol; if the protocol found in the network service
|
||||||
database does not match this name, a system error is signalled.
|
database does not match this name, a system error is signaled.
|
||||||
|
|
||||||
The @code{getserv} procedure will take either a service name or number
|
The @code{getserv} procedure will take either a service name or number
|
||||||
as its first argument; if given no arguments, it behaves like
|
as its first argument; if given no arguments, it behaves like
|
||||||
|
|
|
@ -361,7 +361,7 @@ lists are @code{circular-list?}.
|
||||||
@deffn {Scheme Procedure} null-list? lst
|
@deffn {Scheme Procedure} null-list? lst
|
||||||
Return @code{#t} if @var{lst} is the empty list @code{()}, @code{#f}
|
Return @code{#t} if @var{lst} is the empty list @code{()}, @code{#f}
|
||||||
otherwise. If something else than a proper or circular list is passed
|
otherwise. If something else than a proper or circular list is passed
|
||||||
as @var{lst}, an error is signalled. This procedure is recommended
|
as @var{lst}, an error is signaled. This procedure is recommended
|
||||||
for checking for the end of a list in contexts where dotted lists are
|
for checking for the end of a list in contexts where dotted lists are
|
||||||
not allowed.
|
not allowed.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
@ -2297,7 +2297,7 @@ a new owner for @var{mutex} different than the current thread.
|
||||||
Unlock @var{mutex}, optionally specifying a condition variable
|
Unlock @var{mutex}, optionally specifying a condition variable
|
||||||
@var{condition-variable} on which to wait, either indefinitely or,
|
@var{condition-variable} on which to wait, either indefinitely or,
|
||||||
optionally, until the time object @var{timeout} has passed, to be
|
optionally, until the time object @var{timeout} has passed, to be
|
||||||
signalled.
|
signaled.
|
||||||
@end defun
|
@end defun
|
||||||
|
|
||||||
|
|
||||||
|
@ -3638,7 +3638,7 @@ characters for traditional @code{getopt} short options and strings for
|
||||||
@var{required-arg?} and @var{optional-arg?} are mutually exclusive;
|
@var{required-arg?} and @var{optional-arg?} are mutually exclusive;
|
||||||
one or both must be @code{#f}. If @var{required-arg?}, the option
|
one or both must be @code{#f}. If @var{required-arg?}, the option
|
||||||
must be followed by an argument on the command line, such as
|
must be followed by an argument on the command line, such as
|
||||||
@samp{--opt=value} for long options, or an error will be signalled.
|
@samp{--opt=value} for long options, or an error will be signaled.
|
||||||
If @var{optional-arg?}, an argument will be taken if available.
|
If @var{optional-arg?}, an argument will be taken if available.
|
||||||
|
|
||||||
@var{processor} is a procedure that takes at least 3 arguments, called
|
@var{processor} is a procedure that takes at least 3 arguments, called
|
||||||
|
@ -3789,7 +3789,7 @@ The port remains open, and further attempts to read it (by
|
||||||
end-of-file object. If an end of file is encountered after the
|
end-of-file object. If an end of file is encountered after the
|
||||||
beginning of an object's external representation, but the external
|
beginning of an object's external representation, but the external
|
||||||
representation is incomplete and therefore not parsable, an error is
|
representation is incomplete and therefore not parsable, an error is
|
||||||
signalled.
|
signaled.
|
||||||
|
|
||||||
The @var{port} argument may be omitted, in which case it defaults to the
|
The @var{port} argument may be omitted, in which case it defaults to the
|
||||||
value returned by @code{(current-input-port)}. It is an error to read
|
value returned by @code{(current-input-port)}. It is an error to read
|
||||||
|
@ -3935,7 +3935,7 @@ stream, its promise will be forced.
|
||||||
|
|
||||||
@deffn {Scheme Procedure} stream-car stream
|
@deffn {Scheme Procedure} stream-car stream
|
||||||
Returns the object stored in the @code{stream-car} of @var{stream}. An
|
Returns the object stored in the @code{stream-car} of @var{stream}. An
|
||||||
error is signalled if the argument is not a @code{stream-pair}. This
|
error is signaled if the argument is not a @code{stream-pair}. This
|
||||||
causes the @var{object-expr} passed to @code{stream-cons} to be
|
causes the @var{object-expr} passed to @code{stream-cons} to be
|
||||||
evaluated if it had not yet been; the value is cached in case it is
|
evaluated if it had not yet been; the value is cached in case it is
|
||||||
needed again.
|
needed again.
|
||||||
|
@ -3943,7 +3943,7 @@ needed again.
|
||||||
|
|
||||||
@deffn {Scheme Procedure} stream-cdr stream
|
@deffn {Scheme Procedure} stream-cdr stream
|
||||||
Returns the stream stored in the @code{stream-cdr} of @var{stream}. An
|
Returns the stream stored in the @code{stream-cdr} of @var{stream}. An
|
||||||
error is signalled if the argument is not a @code{stream-pair}.
|
error is signaled if the argument is not a @code{stream-pair}.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@deffn {Scheme Syntax} stream-lambda formals body @dots{}
|
@deffn {Scheme Syntax} stream-lambda formals body @dots{}
|
||||||
|
|
|
@ -956,7 +956,7 @@ of the values in the frame are returned to the prompt handler. This
|
||||||
corresponds to a tail application of @code{abort-to-prompt}.
|
corresponds to a tail application of @code{abort-to-prompt}.
|
||||||
|
|
||||||
If no prompt can be found in the dynamic environment with the given tag,
|
If no prompt can be found in the dynamic environment with the given tag,
|
||||||
an error is signalled. Otherwise all arguments are passed to the
|
an error is signaled. Otherwise all arguments are passed to the
|
||||||
prompt's handler, along with the captured continuation, if necessary.
|
prompt's handler, along with the captured continuation, if necessary.
|
||||||
|
|
||||||
If the prompt's handler can be proven to not reference the captured
|
If the prompt's handler can be proven to not reference the captured
|
||||||
|
|
|
@ -1310,7 +1310,7 @@ Return the given request header, or @var{default} if none was present.
|
||||||
A helper routine to determine the absolute URI of a request, using the
|
A helper routine to determine the absolute URI of a request, using the
|
||||||
@code{host} header and the default scheme, host and port. If there is
|
@code{host} header and the default scheme, host and port. If there is
|
||||||
no default scheme and the URI is not itself absolute, an error is
|
no default scheme and the URI is not itself absolute, an error is
|
||||||
signalled.
|
signaled.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@node Responses
|
@node Responses
|
||||||
|
|
|
@ -40,7 +40,7 @@ mark_box (SCM b)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Print a textual represenation of the smob to a given port. */
|
/* Print a textual representation of the smob to a given port. */
|
||||||
static int
|
static int
|
||||||
print_box (SCM b, SCM port, scm_print_state *pstate)
|
print_box (SCM b, SCM port, scm_print_state *pstate)
|
||||||
{
|
{
|
||||||
|
|
|
@ -40,7 +40,7 @@ mark_box (SCM b)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Print a textual represenation of the smob to a given port. */
|
/* Print a textual representation of the smob to a given port. */
|
||||||
static int
|
static int
|
||||||
print_box (SCM b, SCM port, scm_print_state *pstate)
|
print_box (SCM b, SCM port, scm_print_state *pstate)
|
||||||
{
|
{
|
||||||
|
|
|
@ -40,7 +40,7 @@ mark_box (SCM b)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Print a textual represenation of the smob to a given port. */
|
/* Print a textual representation of the smob to a given port. */
|
||||||
static int
|
static int
|
||||||
print_box (SCM b, SCM port, scm_print_state *pstate)
|
print_box (SCM b, SCM port, scm_print_state *pstate)
|
||||||
{
|
{
|
||||||
|
@ -55,7 +55,7 @@ print_box (SCM b, SCM port, scm_print_state *pstate)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* This defines the primitve `make-box', which returns a new smob of
|
/* This defines the primitive `make-box', which returns a new smob of
|
||||||
type `box', initialized to `#f'. */
|
type `box', initialized to `#f'. */
|
||||||
static SCM
|
static SCM
|
||||||
#define FUNC_NAME "make-box"
|
#define FUNC_NAME "make-box"
|
||||||
|
|
|
@ -40,7 +40,7 @@ mark_box (SCM b)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Print a textual represenation of the smob to a given port. */
|
/* Print a textual representation of the smob to a given port. */
|
||||||
static int
|
static int
|
||||||
print_box (SCM b, SCM port, scm_print_state *pstate)
|
print_box (SCM b, SCM port, scm_print_state *pstate)
|
||||||
{
|
{
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
(lambda ()
|
(lambda ()
|
||||||
;; Evaluate the expression in the safe environment.
|
;; Evaluate the expression in the safe environment.
|
||||||
(eval expr safe-module)
|
(eval expr safe-module)
|
||||||
;; ... and read the next expression if no error occured.
|
;; ... and read the next expression if no error occurred.
|
||||||
(lp (read port)))
|
(lp (read port)))
|
||||||
|
|
||||||
;; Handle exceptions. This procedure will be called when an
|
;; Handle exceptions. This procedure will be called when an
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
;;; This is the famous Hello-World-program, written for Guile. It is a
|
;;; This is the famous Hello-World-program, written for Guile. It is a
|
||||||
;;; little bit enhanced in that it understands the command line options
|
;;; little bit enhanced in that it understands the command line options
|
||||||
;;; `--help' (-h) and `--version' (-v), which print a short usage
|
;;; `--help' (-h) and `--version' (-v), which print a short usage
|
||||||
;;; decription or version information, respectively.
|
;;; description or version information, respectively.
|
||||||
|
|
||||||
;;; Author: Martin Grabmueller
|
;;; Author: Martin Grabmueller
|
||||||
;;; Date: 2001-05-29
|
;;; Date: 2001-05-29
|
||||||
|
|
|
@ -272,7 +272,7 @@
|
||||||
(define (with-optimization level thunk)
|
(define (with-optimization level thunk)
|
||||||
(thunk))
|
(thunk))
|
||||||
|
|
||||||
; Calls thunk1, and if thunk1 causes an error to be signalled, calls thunk2.
|
; Calls thunk1, and if thunk1 causes an error to be signaled, calls thunk2.
|
||||||
|
|
||||||
(define (call-with-error-control thunk1 thunk2)
|
(define (call-with-error-control thunk1 thunk2)
|
||||||
(let ((eh (error-handler)))
|
(let ((eh (error-handler)))
|
||||||
|
@ -21993,14 +21993,14 @@
|
||||||
;
|
;
|
||||||
; RS1 has an object. If the tag of RS1 is not 'tag1', or if the tag is
|
; RS1 has an object. If the tag of RS1 is not 'tag1', or if the tag is
|
||||||
; 'tag1' but the header byte of the object header is not 'tag2', then an
|
; 'tag1' but the header byte of the object header is not 'tag2', then an
|
||||||
; exception with code 'excode' is signalled. The exception call is set
|
; exception with code 'excode' is signaled. The exception call is set
|
||||||
; up to return to the first instruction of the emitted code.
|
; up to return to the first instruction of the emitted code.
|
||||||
;
|
;
|
||||||
; If RS1 is not RESULT then it is moved to RESULT before the exception
|
; If RS1 is not RESULT then it is moved to RESULT before the exception
|
||||||
; is signalled.
|
; is signaled.
|
||||||
;
|
;
|
||||||
; If RS2/IMM is not #f, then it is a register or immediate that is moved
|
; If RS2/IMM is not #f, then it is a register or immediate that is moved
|
||||||
; to ARGREG2 before the exception is signalled; it is an immediate iff
|
; to ARGREG2 before the exception is signaled; it is an immediate iff
|
||||||
; imm? = #t.
|
; imm? = #t.
|
||||||
;
|
;
|
||||||
; RS1 must be a hardware register.
|
; RS1 must be a hardware register.
|
||||||
|
|
|
@ -272,7 +272,7 @@
|
||||||
(define (with-optimization level thunk)
|
(define (with-optimization level thunk)
|
||||||
(thunk))
|
(thunk))
|
||||||
|
|
||||||
; Calls thunk1, and if thunk1 causes an error to be signalled, calls thunk2.
|
; Calls thunk1, and if thunk1 causes an error to be signaled, calls thunk2.
|
||||||
|
|
||||||
(define (call-with-error-control thunk1 thunk2)
|
(define (call-with-error-control thunk1 thunk2)
|
||||||
(let ((eh (error-handler)))
|
(let ((eh (error-handler)))
|
||||||
|
|
|
@ -272,7 +272,7 @@
|
||||||
(define (with-optimization level thunk)
|
(define (with-optimization level thunk)
|
||||||
(thunk))
|
(thunk))
|
||||||
|
|
||||||
; Calls thunk1, and if thunk1 causes an error to be signalled, calls thunk2.
|
; Calls thunk1, and if thunk1 causes an error to be signaled, calls thunk2.
|
||||||
|
|
||||||
(define (call-with-error-control thunk1 thunk2)
|
(define (call-with-error-control thunk1 thunk2)
|
||||||
(let ((eh (error-handler)))
|
(let ((eh (error-handler)))
|
||||||
|
@ -21993,14 +21993,14 @@
|
||||||
;
|
;
|
||||||
; RS1 has an object. If the tag of RS1 is not 'tag1', or if the tag is
|
; RS1 has an object. If the tag of RS1 is not 'tag1', or if the tag is
|
||||||
; 'tag1' but the header byte of the object header is not 'tag2', then an
|
; 'tag1' but the header byte of the object header is not 'tag2', then an
|
||||||
; exception with code 'excode' is signalled. The exception call is set
|
; exception with code 'excode' is signaled. The exception call is set
|
||||||
; up to return to the first instruction of the emitted code.
|
; up to return to the first instruction of the emitted code.
|
||||||
;
|
;
|
||||||
; If RS1 is not RESULT then it is moved to RESULT before the exception
|
; If RS1 is not RESULT then it is moved to RESULT before the exception
|
||||||
; is signalled.
|
; is signaled.
|
||||||
;
|
;
|
||||||
; If RS2/IMM is not #f, then it is a register or immediate that is moved
|
; If RS2/IMM is not #f, then it is a register or immediate that is moved
|
||||||
; to ARGREG2 before the exception is signalled; it is an immediate iff
|
; to ARGREG2 before the exception is signaled; it is an immediate iff
|
||||||
; imm? = #t.
|
; imm? = #t.
|
||||||
;
|
;
|
||||||
; RS1 must be a hardware register.
|
; RS1 must be a hardware register.
|
||||||
|
|
|
@ -757,7 +757,7 @@ expand_lambda_star_case (SCM clause, SCM alternate, SCM env)
|
||||||
Also note that the specific environment during expansion of init
|
Also note that the specific environment during expansion of init
|
||||||
expressions here needs to coincide with the environment when psyntax
|
expressions here needs to coincide with the environment when psyntax
|
||||||
expands. A lot of effort for something that is only used in the bootstrap
|
expands. A lot of effort for something that is only used in the bootstrap
|
||||||
expandr, you say? Yes. Yes it is.
|
expander, you say? Yes. Yes it is.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
vars = SCM_EOL;
|
vars = SCM_EOL;
|
||||||
|
@ -928,7 +928,7 @@ check_bindings (const SCM bindings, const SCM expr)
|
||||||
|
|
||||||
/* The bindings, which must have the format ((v1 i1) (v2 i2) ... (vn in)), are
|
/* The bindings, which must have the format ((v1 i1) (v2 i2) ... (vn in)), are
|
||||||
* transformed to the lists (vn .. v2 v1) and (i1 i2 ... in). If a duplicate
|
* transformed to the lists (vn .. v2 v1) and (i1 i2 ... in). If a duplicate
|
||||||
* variable name is detected, an error is signalled. */
|
* variable name is detected, an error is signaled. */
|
||||||
static void
|
static void
|
||||||
transform_bindings (const SCM bindings, const SCM expr,
|
transform_bindings (const SCM bindings, const SCM expr,
|
||||||
SCM *const names, SCM *const vars, SCM *const initptr)
|
SCM *const names, SCM *const vars, SCM *const initptr)
|
||||||
|
|
|
@ -1163,7 +1163,7 @@ SCM_DEFINE (scm_primitive_load_path, "primitive-load-path", 0, 0, 1,
|
||||||
"depending on the optional second argument,\n"
|
"depending on the optional second argument,\n"
|
||||||
"@var{exception_on_not_found}. If it is @code{#f}, @code{#f}\n"
|
"@var{exception_on_not_found}. If it is @code{#f}, @code{#f}\n"
|
||||||
"will be returned. If it is a procedure, it will be called\n"
|
"will be returned. If it is a procedure, it will be called\n"
|
||||||
"with no arguments. Otherwise an error is signalled.")
|
"with no arguments. Otherwise an error is signaled.")
|
||||||
#define FUNC_NAME s_scm_primitive_load_path
|
#define FUNC_NAME s_scm_primitive_load_path
|
||||||
{
|
{
|
||||||
SCM filename, exception_on_not_found;
|
SCM filename, exception_on_not_found;
|
||||||
|
|
|
@ -330,7 +330,7 @@ SCM_DEFINE (scm_getserv, "getserv", 0, 2, 0,
|
||||||
"Look up a network service by name or by service number, and return a\n"
|
"Look up a network service by name or by service number, and return a\n"
|
||||||
"network service object. The @var{protocol} argument specifies the name\n"
|
"network service object. The @var{protocol} argument specifies the name\n"
|
||||||
"of the desired protocol; if the protocol found in the network service\n"
|
"of the desired protocol; if the protocol found in the network service\n"
|
||||||
"database does not match this name, a system error is signalled.\n\n"
|
"database does not match this name, a system error is signaled.\n\n"
|
||||||
"The @code{getserv} procedure will take either a service name or number\n"
|
"The @code{getserv} procedure will take either a service name or number\n"
|
||||||
"as its first argument; if given no arguments, it behaves like\n"
|
"as its first argument; if given no arguments, it behaves like\n"
|
||||||
"@code{getservent} (see below).")
|
"@code{getservent} (see below).")
|
||||||
|
|
|
@ -285,7 +285,7 @@ SCM_DEFINE (scm_sigaction_for_thread, "sigaction", 1, 3, 0,
|
||||||
"of variables such as @code{SIGINT}.\n\n"
|
"of variables such as @code{SIGINT}.\n\n"
|
||||||
"If @var{handler} is omitted, @code{sigaction} returns a pair: the\n"
|
"If @var{handler} is omitted, @code{sigaction} returns a pair: the\n"
|
||||||
"CAR is the current\n"
|
"CAR is the current\n"
|
||||||
"signal hander, which will be either an integer with the value @code{SIG_DFL}\n"
|
"signal handler, which will be either an integer with the value @code{SIG_DFL}\n"
|
||||||
"(default action) or @code{SIG_IGN} (ignore), or the Scheme procedure which\n"
|
"(default action) or @code{SIG_IGN} (ignore), or the Scheme procedure which\n"
|
||||||
"handles the signal, or @code{#f} if a non-Scheme procedure handles the\n"
|
"handles the signal, or @code{#f} if a non-Scheme procedure handles the\n"
|
||||||
"signal. The CDR contains the current @code{sigaction} flags for the handler.\n\n"
|
"signal. The CDR contains the current @code{sigaction} flags for the handler.\n\n"
|
||||||
|
|
|
@ -1393,7 +1393,7 @@ SCM_DEFINE (scm_ucs_range_to_char_set, "ucs-range->char-set", 2, 2, 0,
|
||||||
"character codes lie in the half-open range\n"
|
"character codes lie in the half-open range\n"
|
||||||
"[@var{lower},@var{upper}).\n"
|
"[@var{lower},@var{upper}).\n"
|
||||||
"\n"
|
"\n"
|
||||||
"If @var{error} is a true value, an error is signalled if the\n"
|
"If @var{error} is a true value, an error is signaled if the\n"
|
||||||
"specified range contains characters which are not valid\n"
|
"specified range contains characters which are not valid\n"
|
||||||
"Unicode code points. If @var{error} is @code{#f},\n"
|
"Unicode code points. If @var{error} is @code{#f},\n"
|
||||||
"these characters are silently left out of the resulting\n"
|
"these characters are silently left out of the resulting\n"
|
||||||
|
@ -1415,7 +1415,7 @@ SCM_DEFINE (scm_ucs_range_to_char_set_x, "ucs-range->char-set!", 4, 0, 0,
|
||||||
"character codes lie in the half-open range\n"
|
"character codes lie in the half-open range\n"
|
||||||
"[@var{lower},@var{upper}).\n"
|
"[@var{lower},@var{upper}).\n"
|
||||||
"\n"
|
"\n"
|
||||||
"If @var{error} is a true value, an error is signalled if the\n"
|
"If @var{error} is a true value, an error is signaled if the\n"
|
||||||
"specified range contains characters which are not contained in\n"
|
"specified range contains characters which are not contained in\n"
|
||||||
"the implemented character range. If @var{error} is @code{#f},\n"
|
"the implemented character range. If @var{error} is @code{#f},\n"
|
||||||
"these characters are silently left out of the resulting\n"
|
"these characters are silently left out of the resulting\n"
|
||||||
|
|
|
@ -1170,7 +1170,7 @@ SCM_DEFINE (scm_unlock_mutex, "unlock-mutex", 1, 0, 0, (SCM mutex),
|
||||||
"Unlocks @var{mutex}. The calling thread must already hold\n"
|
"Unlocks @var{mutex}. The calling thread must already hold\n"
|
||||||
"the lock on @var{mutex}, unless the mutex was created with\n"
|
"the lock on @var{mutex}, unless the mutex was created with\n"
|
||||||
"the @code{allow-external-unlock} option; otherwise an error\n"
|
"the @code{allow-external-unlock} option; otherwise an error\n"
|
||||||
"will be signalled.")
|
"will be signaled.")
|
||||||
#define FUNC_NAME s_scm_unlock_mutex
|
#define FUNC_NAME s_scm_unlock_mutex
|
||||||
{
|
{
|
||||||
struct scm_mutex *m;
|
struct scm_mutex *m;
|
||||||
|
@ -1392,14 +1392,14 @@ timed_wait (enum scm_mutex_kind kind, struct scm_mutex *m, struct scm_cond *c,
|
||||||
|
|
||||||
SCM_DEFINE (scm_timed_wait_condition_variable, "wait-condition-variable", 2, 1, 0,
|
SCM_DEFINE (scm_timed_wait_condition_variable, "wait-condition-variable", 2, 1, 0,
|
||||||
(SCM cond, SCM mutex, SCM timeout),
|
(SCM cond, SCM mutex, SCM timeout),
|
||||||
"Wait until condition variable @var{cv} has been signalled. While waiting, "
|
"Wait until condition variable @var{cv} has been signaled. While waiting, "
|
||||||
"mutex @var{mx} is atomically unlocked (as with @code{unlock-mutex}) and "
|
"mutex @var{mx} is atomically unlocked (as with @code{unlock-mutex}) and "
|
||||||
"is locked again when this function returns. When @var{t} is given, "
|
"is locked again when this function returns. When @var{t} is given, "
|
||||||
"it specifies a point in time where the waiting should be aborted. It "
|
"it specifies a point in time where the waiting should be aborted. It "
|
||||||
"can be either a integer as returned by @code{current-time} or a pair "
|
"can be either a integer as returned by @code{current-time} or a pair "
|
||||||
"as returned by @code{gettimeofday}. When the waiting is aborted the "
|
"as returned by @code{gettimeofday}. When the waiting is aborted the "
|
||||||
"mutex is locked and @code{#f} is returned. When the condition "
|
"mutex is locked and @code{#f} is returned. When the condition "
|
||||||
"variable is in fact signalled, the mutex is also locked and @code{#t} "
|
"variable is in fact signaled, the mutex is also locked and @code{#t} "
|
||||||
"is returned. ")
|
"is returned. ")
|
||||||
#define FUNC_NAME s_scm_timed_wait_condition_variable
|
#define FUNC_NAME s_scm_timed_wait_condition_variable
|
||||||
{
|
{
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
# By default, this macro will search for the latest stable version of
|
# By default, this macro will search for the latest stable version of
|
||||||
# Guile (e.g. 3.0), falling back to the previous stable version
|
# Guile (e.g. 3.0), falling back to the previous stable version
|
||||||
# (e.g. 2.2) if it is available. If no guile-@var{VERSION}.pc file is
|
# (e.g. 2.2) if it is available. If no guile-@var{VERSION}.pc file is
|
||||||
# found, an error is signalled. The found version is stored in
|
# found, an error is signaled. The found version is stored in
|
||||||
# @var{GUILE_EFFECTIVE_VERSION}.
|
# @var{GUILE_EFFECTIVE_VERSION}.
|
||||||
#
|
#
|
||||||
# If @code{GUILE_PROGS} was already invoked, this macro ensures that the
|
# If @code{GUILE_PROGS} was already invoked, this macro ensures that the
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
;;> @example{(let ((ls (list 1 2 3))) (match ls ((1 2 3) #t)))}
|
;;> @example{(let ((ls (list 1 2 3))) (match ls ((1 2 3) #t)))}
|
||||||
|
|
||||||
;;> If no patterns match an error is signalled.
|
;;> If no patterns match an error is signaled.
|
||||||
|
|
||||||
;;> Identifiers will match anything, and make the corresponding
|
;;> Identifiers will match anything, and make the corresponding
|
||||||
;;> binding available in the body.
|
;;> binding available in the body.
|
||||||
|
@ -261,7 +261,7 @@
|
||||||
;;> of the entire @scheme{match}. If a @var{failure} is provided,
|
;;> of the entire @scheme{match}. If a @var{failure} is provided,
|
||||||
;;> then it is bound to a procedure of no arguments which continues,
|
;;> then it is bound to a procedure of no arguments which continues,
|
||||||
;;> processing at the next @var{pattern}. If no @var{pattern} matches,
|
;;> processing at the next @var{pattern}. If no @var{pattern} matches,
|
||||||
;;> an error is signalled.
|
;;> an error is signaled.
|
||||||
|
|
||||||
;; The basic interface. MATCH just performs some basic syntax
|
;; The basic interface. MATCH just performs some basic syntax
|
||||||
;; validation, binds the match expression to a temporary variable `v',
|
;; validation, binds the match expression to a temporary variable `v',
|
||||||
|
|
|
@ -409,7 +409,7 @@ interpret its input and output."
|
||||||
file #:key (binary #f) (encoding #f) (guess-encoding #f))
|
file #:key (binary #f) (encoding #f) (guess-encoding #f))
|
||||||
"Takes a string naming an existing file and returns an input port
|
"Takes a string naming an existing file and returns an input port
|
||||||
capable of delivering characters from the file. If the file
|
capable of delivering characters from the file. If the file
|
||||||
cannot be opened, an error is signalled."
|
cannot be opened, an error is signaled."
|
||||||
(open-file file (if binary "rb" "r")
|
(open-file file (if binary "rb" "r")
|
||||||
#:encoding encoding
|
#:encoding encoding
|
||||||
#:guess-encoding guess-encoding))
|
#:guess-encoding guess-encoding))
|
||||||
|
@ -417,7 +417,7 @@ cannot be opened, an error is signalled."
|
||||||
(define* (open-output-file file #:key (binary #f) (encoding #f))
|
(define* (open-output-file file #:key (binary #f) (encoding #f))
|
||||||
"Takes a string naming an output file to be created and returns an
|
"Takes a string naming an output file to be created and returns an
|
||||||
output port capable of writing characters to a new file by that
|
output port capable of writing characters to a new file by that
|
||||||
name. If the file cannot be opened, an error is signalled. If a
|
name. If the file cannot be opened, an error is signaled. If a
|
||||||
file with the given name already exists, the effect is unspecified."
|
file with the given name already exists, the effect is unspecified."
|
||||||
(open-file file (if binary "wb" "w")
|
(open-file file (if binary "wb" "w")
|
||||||
#:encoding encoding))
|
#:encoding encoding))
|
||||||
|
@ -442,7 +442,7 @@ string naming a file. The file must
|
||||||
already exist. These procedures call PROC
|
already exist. These procedures call PROC
|
||||||
with one argument: the port obtained by opening the named file for
|
with one argument: the port obtained by opening the named file for
|
||||||
input or output. If the file cannot be opened, an error is
|
input or output. If the file cannot be opened, an error is
|
||||||
signalled. If the procedure returns, then the port is closed
|
signaled. If the procedure returns, then the port is closed
|
||||||
automatically and the values yielded by the procedure are returned.
|
automatically and the values yielded by the procedure are returned.
|
||||||
If the procedure does not return, then the port will not be closed
|
If the procedure does not return, then the port will not be closed
|
||||||
automatically unless it is possible to prove that the port will
|
automatically unless it is possible to prove that the port will
|
||||||
|
@ -459,7 +459,7 @@ string naming a file. The behaviour is unspecified if the file
|
||||||
already exists. These procedures call PROC
|
already exists. These procedures call PROC
|
||||||
with one argument: the port obtained by opening the named file for
|
with one argument: the port obtained by opening the named file for
|
||||||
input or output. If the file cannot be opened, an error is
|
input or output. If the file cannot be opened, an error is
|
||||||
signalled. If the procedure returns, then the port is closed
|
signaled. If the procedure returns, then the port is closed
|
||||||
automatically and the values yielded by the procedure are returned.
|
automatically and the values yielded by the procedure are returned.
|
||||||
If the procedure does not return, then the port will not be closed
|
If the procedure does not return, then the port will not be closed
|
||||||
automatically unless it is possible to prove that the port will
|
automatically unless it is possible to prove that the port will
|
||||||
|
|
|
@ -86,14 +86,14 @@ member, or @code{#f} otherwise."
|
||||||
(define (invert-bijection map)
|
(define (invert-bijection map)
|
||||||
"Assuming the values of @var{map} are integers and are unique, compute
|
"Assuming the values of @var{map} are integers and are unique, compute
|
||||||
a map in which each value maps to its key. If the values are not
|
a map in which each value maps to its key. If the values are not
|
||||||
unique, an error will be signalled."
|
unique, an error will be signaled."
|
||||||
(persistent-intmap
|
(persistent-intmap
|
||||||
(intmap-fold (lambda (k v out) (intmap-add! out v k)) map empty-intmap)))
|
(intmap-fold (lambda (k v out) (intmap-add! out v k)) map empty-intmap)))
|
||||||
|
|
||||||
(define (invert-partition map)
|
(define (invert-partition map)
|
||||||
"Assuming the values of @var{map} are disjoint intsets, compute a map
|
"Assuming the values of @var{map} are disjoint intsets, compute a map
|
||||||
in which each member of each set maps to its key. If the values are not
|
in which each member of each set maps to its key. If the values are not
|
||||||
disjoint, an error will be signalled."
|
disjoint, an error will be signaled."
|
||||||
(intmap-fold (lambda (k v* out)
|
(intmap-fold (lambda (k v* out)
|
||||||
(intset-fold (lambda (v out) (intmap-add out v k)) v* out))
|
(intset-fold (lambda (v out) (intmap-add out v k)) v* out))
|
||||||
map empty-intmap))
|
map empty-intmap))
|
||||||
|
|
|
@ -24,8 +24,8 @@
|
||||||
;; Usage: doc-snarf FILE
|
;; Usage: doc-snarf FILE
|
||||||
;;
|
;;
|
||||||
;; This program reads in a Scheme source file and extracts docstrings
|
;; This program reads in a Scheme source file and extracts docstrings
|
||||||
;; in the format specified below. Additionally, a procedure protoype
|
;; in the format specified below. Additionally, a procedure prototype
|
||||||
;; is infered from the procedure definition line starting with
|
;; is inferred from the procedure definition line starting with
|
||||||
;; (define... ).
|
;; (define... ).
|
||||||
;;
|
;;
|
||||||
;; Currently, two output modi are implemented: texinfo and plaintext.
|
;; Currently, two output modi are implemented: texinfo and plaintext.
|
||||||
|
@ -33,9 +33,9 @@
|
||||||
;; `--texinfo, -t' command line option.
|
;; `--texinfo, -t' command line option.
|
||||||
;;
|
;;
|
||||||
;; Format: A docstring can span multiple lines and a docstring line
|
;; Format: A docstring can span multiple lines and a docstring line
|
||||||
;; begins with `;; ' (two semicoli and a space). A docstring is ended
|
;; begins with `;; ' (two semicolons and a space). A docstring is ended
|
||||||
;; by either a line beginning with (define ...) or one or more lines
|
;; by either a line beginning with (define ...) or one or more lines
|
||||||
;; beginning with `;;-' (two semicoli and a dash). These lines are
|
;; beginning with `;;-' (two semicolons and a dash). These lines are
|
||||||
;; called `options' and begin with a keyword, followed by a colon and
|
;; called `options' and begin with a keyword, followed by a colon and
|
||||||
;; a string.
|
;; a string.
|
||||||
;;
|
;;
|
||||||
|
@ -219,7 +219,7 @@ return the standard internal docstring if found. Return #f if not."
|
||||||
;; to be written in language @var{lang}.
|
;; to be written in language @var{lang}.
|
||||||
;;-Author: Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
|
;;-Author: Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
|
||||||
;;-Created: 2001-02-17
|
;;-Created: 2001-02-17
|
||||||
;;-ttn-mod: regluarize lang parm lookup, add "std int doc" snarfing (2 places)
|
;;-ttn-mod: regularize lang parm lookup, add "std int doc" snarfing (2 places)
|
||||||
(define (snarf input-file lang)
|
(define (snarf input-file lang)
|
||||||
(let* ((i-p (open-input-file input-file))
|
(let* ((i-p (open-input-file input-file))
|
||||||
(parm-regexp (lambda (parm) (make-regexp (lang-parm lang parm))))
|
(parm-regexp (lambda (parm) (make-regexp (lang-parm lang parm))))
|
||||||
|
|
|
@ -320,7 +320,7 @@
|
||||||
;; (* (remainder current-ms 1000) 10000))))
|
;; (* (remainder current-ms 1000) 10000))))
|
||||||
|
|
||||||
;; -- we define it to be the same as TAI.
|
;; -- we define it to be the same as TAI.
|
||||||
;; A different implemention of current-time-monotonic
|
;; A different implementation of current-time-monotonic
|
||||||
;; will require rewriting all of the time-monotonic converters,
|
;; will require rewriting all of the time-monotonic converters,
|
||||||
;; of course.
|
;; of course.
|
||||||
|
|
||||||
|
|
|
@ -166,7 +166,7 @@
|
||||||
(define (meta-command repl)
|
(define (meta-command repl)
|
||||||
(let ((command (read-command repl)))
|
(let ((command (read-command repl)))
|
||||||
(cond
|
(cond
|
||||||
((eq? command *unspecified*)) ; read error, already signalled; pass.
|
((eq? command *unspecified*)) ; read error, already signaled; pass.
|
||||||
((not (symbol? command))
|
((not (symbol? command))
|
||||||
(format #t "Meta-command not a symbol: ~s~%" command))
|
(format #t "Meta-command not a symbol: ~s~%" command))
|
||||||
((lookup-command command)
|
((lookup-command command)
|
||||||
|
|
|
@ -324,7 +324,7 @@
|
||||||
(mutex-unlock! m2)))))
|
(mutex-unlock! m2)))))
|
||||||
(thread-start! t)
|
(thread-start! t)
|
||||||
(mutex-unlock! m1 c)
|
(mutex-unlock! m1 c)
|
||||||
;; At this point the thread signalled that it has both m1 and
|
;; At this point the thread signaled that it has both m1 and
|
||||||
;; m2, and it will go to try to lock m2 again. We wait for it
|
;; m2, and it will go to try to lock m2 again. We wait for it
|
||||||
;; to block trying to acquire m2 by sleeping a little bit and
|
;; to block trying to acquire m2 by sleeping a little bit and
|
||||||
;; then unblock it by unlocking m2 from here.
|
;; then unblock it by unlocking m2 from here.
|
||||||
|
@ -333,7 +333,7 @@
|
||||||
(thread-join! t)
|
(thread-join! t)
|
||||||
(eq? (mutex-state m2) 'not-abandoned))))
|
(eq? (mutex-state m2) 'not-abandoned))))
|
||||||
|
|
||||||
(pass-if "mutex unlock is true when condition is signalled"
|
(pass-if "mutex unlock is true when condition is signaled"
|
||||||
(let* ((m (make-mutex 'mutex-unlock-3))
|
(let* ((m (make-mutex 'mutex-unlock-3))
|
||||||
(c (make-condition-variable 'mutex-unlock-3))
|
(c (make-condition-variable 'mutex-unlock-3))
|
||||||
(t (make-thread (lambda ()
|
(t (make-thread (lambda ()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue