Morgan Smith
c7d170c5d1
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>
2023-07-16 22:09:01 +02:00
Andy Wingo
2f9bc7fe61
Update unicode tables to Unicode 14.0.0; initial charsets immutable
...
* libguile/srfi-14.i.c: Update from Unicode 14.0.0.
* libguile/unidata_to_charset.pl (compute): Write arrays as static const
data, to avoid polluting the namespace and to avoid adding these to the
GC root set.
* libguile/srfi-14.c (SCM_CODEPOINT_F_IMMUTABLE): New flag.
(scm_charset_is_immutable): New internal predicate.
(SCM_VALIDATE_MUTABLE_CHARSET): New internal validator.
(cs_full_ranges, cs_full_ranges_len): Re-express as separate ranges and
len, because the ranges pointer in scm_t_char_set is mutable.
(scm_char_set_unfold_x, scm_list_to_char_set_x)
(scm_string_to_char_set_x, scm_char_set_filter_x)
(scm_i_ucs_range_to_char_set, scm_char_set_adjoin_x)
(scm_char_set_delete_x, scm_char_set_complement_x)
(scm_char_set_unfold_x, scm_char_set_intersection_x)
(scm_char_set_difference_x, scm_char_set_xor_x): Require mutable
charsets.
(define_charset): Add immutable flag.
(scm_init_srfi_14): Adapt initial charset definitions.
2022-02-06 21:17:24 +01:00
Mark H Weaver
980d8265c2
Avoid passing NULL to 'memcpy' and 'memcmp'.
...
Reported by Jeffrey Walton <noloader@gmail.com> in
<https://lists.gnu.org/archive/html/guile-devel/2019-03/msg00001.html >.
Note that C11 section 7.1.4 (Use of library functions) states that:
"unless explicitly stated otherwise in the detailed descriptions [of
library functions] that follow: If an argument to a function has an
invalid value (such as ... a null pointer ...) ..., the behavior is
undefined." Note that 'strxfrm' is an example of a standard C function
that explicitly states otherwise, allowing NULL to be passed in the
first argument if the size argument is zero, but no similar allowance is
specified for 'memcpy' or 'memcmp'.
* libguile/bytevectors.c (scm_uniform_array_to_bytevector): Call memcpy
only if 'byte_len' is non-zero.
* libguile/srfi-14.c (charsets_equal): Call memcmp only if the number of
ranges is non-zero.
* libguile/stime.c (setzone): Pass 1-character buffer to
'scm_to_locale_stringbuf', instead of NULL.
* libguile/strings.c (scm_to_locale_stringbuf): Call memcpy only if the
number of bytes to copy is non-zero.
2019-05-23 17:40:08 +02:00
Andy Wingo
173b44a224
Fix GCC warning with %char-set-dump.
...
* libguile/srfi-14.c (scm_sys_char_set_dump): Silence an erroneous
-Wformat-overflow warning based on an incorrect range inference by
increasing output buffer size.
2018-10-07 16:14:06 +02:00
Andy Wingo
4a2d78b4d4
Give multiple-values objects a tc7
...
* libguile/scm.h (scm_tc7_values): New tc7. Never seen by Scheme, so we
don't need to update it anywhere else.
* libguile/values.h (scm_is_values): New public static inline function.
(scm_i_nvalues, scm_i_value_ref): New private static inline
functions.
(SCM_VALUESP): Use scm_is_value.
(scm_values_2, scm_values_3): New functions.
(scm_values_vtable): Remove; values objects are not structs any more.
* libguile/values.c (scm_i_extract_values_2): Adapt to new values
representation.
(print_values): Remove now-unused function.
(scm_c_nvalues): Use scm_i_nvalues.
(scm_c_value_ref): Use scm_i_value_ref.
(scm_values, scm_c_values): Make the new-style objects, which store
their values inline.
(scm_values_2, scm_values_3): New helpers, to avoid consing little
useless lists.
* libguile/vm-engine.c (halt, subr-call)
* libguile/eval.c (eval): Adapt to new values representation.
* libguile/i18n.c (scm_locale_string_to_integer)
(scm_locale_string_to_integer)
* libguile/numbers.c (scm_i_floor_divide, scm_i_ceiling_divide)
(scm_i_truncate_divide, scm_i_centered_divide, scm_i_round_divide)
(scm_i_exact_integer_sqrt)
* libguile/r6rs-ports.c (make_bytevector_output_port)
* libguile/srfi-1.c (scm_srfi1_partition, scm_srfi1_partition_x)
* libguile/srfi-14.c (scm_char_set_diff_plus_intersection)
(scm_char_set_diff_plus_intersection_x)
* libguile/posix.c (scm_getrlimit, scm_open_process): Adapt to use
scm_values_2 or scm_values_3.
* libguile/print.c (iprin1): Add printer for values objects.
2018-06-25 17:50:29 +02:00
Andy Wingo
1234bb1850
Update license notices in all C files
...
Update to newest recommended license notices from the FSF. Everything
stays LGPLv3+ except guile-readline which is GPLv3+.
2018-06-20 20:07:34 +02:00
Andy Wingo
791eb0c01a
Remove (C) from copyright statements
...
As the FSF advises, 'There is no legal significance to using the
three-character sequence “(C)”, but it does no harm.' It does take up
space though! For that reason, we remove it here from our C files.
2018-06-20 19:17:06 +02:00
Andy Wingo
b8d757732f
Rationalize include order in C files
...
Include config.h first, then system includes, then libguile includes, in
alphabetical order, then the include for the file in question.
2018-06-20 18:31:24 +02:00
Andy Wingo
3068bc7384
Make libguile header inclusion consistent within libguile c files
...
Change from '#include "libguile/foo.h"' and '#include <libguile/foo.h>'
to '#include "foo.h"'.
2018-06-20 17:19:31 +02:00
Andy Wingo
40ade0886e
Remove _scm.h
...
* libguile/_scm.h: Remove. An internal header, never installed.
* libguile/__scm.h: Remove horrible documentation.
* libguile/Makefile.am (EXTRA_libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES):
Remove _scm.h.
* libguile/alist.c:
* libguile/array-handle.c:
* libguile/array-map.c:
* libguile/arrays.c:
* libguile/async.c:
* libguile/atomic.c:
* libguile/backtrace.c:
* libguile/bitvectors.c:
* libguile/boolean.c:
* libguile/bytevectors.c:
* libguile/chars.c:
* libguile/continuations.c:
* libguile/control.c:
* libguile/debug-malloc.c:
* libguile/debug.c:
* libguile/deprecated.c:
* libguile/deprecation.c:
* libguile/dynl.c:
* libguile/dynstack.c:
* libguile/dynwind.c:
* libguile/eq.c:
* libguile/error.c:
* libguile/eval.c:
* libguile/evalext.c:
* libguile/expand.c:
* libguile/extensions.c:
* libguile/fdes-finalizers.c:
* libguile/feature.c:
* libguile/filesys.c:
* libguile/finalizers.c:
* libguile/fluids.c:
* libguile/foreign-object.c:
* libguile/foreign.c:
* libguile/fports.c:
* libguile/frames.c:
* libguile/gc-malloc.c:
* libguile/gc.c:
* libguile/gen-scmconfig.c:
* libguile/generalized-arrays.c:
* libguile/generalized-vectors.c:
* libguile/gettext.c:
* libguile/goops.c:
* libguile/gsubr.c:
* libguile/guardians.c:
* libguile/hash.c:
* libguile/hashtab.c:
* libguile/hooks.c:
* libguile/i18n.c:
* libguile/init.c:
* libguile/instructions.c:
* libguile/intrinsics.c:
* libguile/ioext.c:
* libguile/keywords.c:
* libguile/list.c:
* libguile/load.c:
* libguile/loader.c:
* libguile/macros.c:
* libguile/mallocs.c:
* libguile/memoize.c:
* libguile/modules.c:
* libguile/net_db.c:
* libguile/null-threads.c:
* libguile/numbers.c:
* libguile/objprop.c:
* libguile/options.c:
* libguile/pairs.c:
* libguile/poll.c:
* libguile/ports-internal.h:
* libguile/ports.c:
* libguile/posix.c:
* libguile/print.c:
* libguile/procprop.c:
* libguile/procs.c:
* libguile/programs.c:
* libguile/promises.c:
* libguile/r6rs-ports.c:
* libguile/random.c:
* libguile/rdelim.c:
* libguile/read.c:
* libguile/regex-posix.c:
* libguile/rw.c:
* libguile/scmsigs.c:
* libguile/script.c:
* libguile/simpos.c:
* libguile/smob.c:
* libguile/socket.c:
* libguile/sort.c:
* libguile/srcprop.c:
* libguile/srfi-1.c:
* libguile/srfi-13.c:
* libguile/srfi-14.c:
* libguile/srfi-4.c:
* libguile/srfi-60.c:
* libguile/stackchk.c:
* libguile/stacks.c:
* libguile/stime.c:
* libguile/strings.c:
* libguile/strorder.c:
* libguile/strports.c:
* libguile/struct.c:
* libguile/symbols.c:
* libguile/syntax.c:
* libguile/threads.c:
* libguile/throw.c:
* libguile/trees.c:
* libguile/unicode.c:
* libguile/uniform.c:
* libguile/values.c:
* libguile/variable.c:
* libguile/vectors.c:
* libguile/version.c:
* libguile/vm.c:
* libguile/vports.c:
* libguile/weak-set.c:
* libguile/weak-table.c:
* libguile/weak-vector.c: Remove _scm.h includes.
2018-06-20 14:26:01 +02:00
Andy Wingo
a7bcd66f6f
Devolve symbols.h from _scm.h
...
* libguile/_scm.h: Remove symbols.h.
* libguile/array-handle.c:
* libguile/array-map.c:
* libguile/backtrace.c:
* libguile/bytevectors.c:
* libguile/chars.c:
* libguile/continuations.c:
* libguile/error.c:
* libguile/eval.c:
* libguile/evalext.c:
* libguile/expand.c:
* libguile/feature.c:
* libguile/filesys.c:
* libguile/foreign.c:
* libguile/fports.c:
* libguile/frames.c:
* libguile/gc.c:
* libguile/goops.c:
* libguile/gsubr.c:
* libguile/i18n.c:
* libguile/instructions.c:
* libguile/intrinsics.c:
* libguile/keywords.c:
* libguile/load.c:
* libguile/macros.c:
* libguile/memoize.c:
* libguile/modules.c:
* libguile/net_db.c:
* libguile/options.c:
* libguile/ports.c:
* libguile/posix.c:
* libguile/print.c:
* libguile/procprop.c:
* libguile/procs.c:
* libguile/r6rs-ports.c:
* libguile/random.c:
* libguile/read.c:
* libguile/socket.c:
* libguile/srcprop.c:
* libguile/srfi-13.c:
* libguile/srfi-14.c:
* libguile/stacks.c:
* libguile/strings.c:
* libguile/strports.c:
* libguile/struct.c:
* libguile/threads.c:
* libguile/throw.c:
* libguile/vm.c: Add symbols.h.
2018-06-20 12:19:12 +02:00
Andy Wingo
f043d0c3dc
Remove modules.h from _scm.h.
...
* libguile/_scm.h: Remove modules.h.
* libguile/arrays.c:
* libguile/backtrace.c:
* libguile/feature.c:
* libguile/filesys.c:
* libguile/foreign-object.c:
* libguile/foreign.c:
* libguile/fports.c:
* libguile/frames.c:
* libguile/gc.c:
* libguile/gsubr.c:
* libguile/i18n.c:
* libguile/intrinsics.c:
* libguile/macros.c:
* libguile/numbers.c:
* libguile/poll.c:
* libguile/ports.c:
* libguile/posix.c:
* libguile/random.c:
* libguile/read.c:
* libguile/regex-posix.c:
* libguile/scmsigs.c:
* libguile/script.c:
* libguile/socket.c:
* libguile/srcprop.c:
* libguile/srfi-14.c:
* libguile/srfi-4.c:
* libguile/stime.c:
* libguile/struct.c:
* libguile/syntax.c:
* libguile/threads.c:
* libguile/throw.c: Add modules.h.
2018-06-20 12:18:24 +02:00
Andy Wingo
1ddf42dae0
Devolve threads.h from _scm.h.
...
* libguile/__scm.h (scm_print_state, scm_t_dynstack): Add forward
declarations.
* libguile/_scm.h: Remove threads.h.
* libguile/atomic.c:
* libguile/bitvectors.h:
* libguile/bytevectors.c:
* libguile/continuations.h:
* libguile/control.c:
* libguile/deprecation.c:
* libguile/dynl.c:
* libguile/dynstack.h:
* libguile/dynwind.c:
* libguile/extensions.c:
* libguile/fdes-finalizers.c:
* libguile/foreign-object.c:
* libguile/frames.c:
* libguile/guardians.c:
* libguile/hashtab.c:
* libguile/list.c:
* libguile/loader.c:
* libguile/macros.c:
* libguile/memoize.c:
* libguile/net_db.c:
* libguile/pairs.c:
* libguile/procprop.c:
* libguile/rdelim.c:
* libguile/simpos.c:
* libguile/srfi-14.c:
* libguile/srfi-60.c:
* libguile/strings.c:
* libguile/strports.c:
* libguile/syntax.c:
* libguile/syntax.h:
* libguile/unicode.c:
* libguile/variable.c:
* libguile/vectors.c:
* libguile/weak-set.c:
* libguile/weak-set.h:
* libguile/weak-table.c:
* libguile/weak-table.h:
* libguile/weak-vector.c: Add threads.h as appropriate, or possible
other headers that threads.h pulled in.
2018-06-20 11:52:29 +02:00
Andy Wingo
bf15afa6bf
Move subr snarfing macros to gsubr.h.
...
* libguile/snarf.h: Remove gsubr include and subr snarfers.
* libguile/gsubr.h (SCM_DEFINE_GSUBR, SCM_DEFINE, SCM_PRIMITIVE_GENERIC):
(SCM_DEFINE_PUBLIC, SCM_PROC, SCM_REGISTER_PROC, SCM_GPROC): Move
here.
* libguile/alist.c:
* libguile/array-map.c:
* libguile/arrays.c:
* libguile/async.c:
* libguile/atomic.c:
* libguile/backtrace.c:
* libguile/bitvectors.c:
* libguile/boolean.c:
* libguile/bytevectors.c:
* libguile/chars.c:
* libguile/continuations.c:
* libguile/control.c:
* libguile/debug-malloc.c:
* libguile/debug.c:
* libguile/deprecation.c:
* libguile/dynl.c:
* libguile/eq.c:
* libguile/error.c:
* libguile/error.h:
* libguile/eval.c:
* libguile/evalext.c:
* libguile/expand.c:
* libguile/extensions.c:
* libguile/fdes-finalizers.c:
* libguile/feature.c:
* libguile/filesys.c:
* libguile/finalizers.c:
* libguile/fluids.c:
* libguile/foreign-object.c:
* libguile/foreign.c:
* libguile/fports.c:
* libguile/frames.c:
* libguile/gc.c:
* libguile/generalized-arrays.c:
* libguile/generalized-vectors.c:
* libguile/gettext.c:
* libguile/guardians.c:
* libguile/hash.c:
* libguile/hashtab.c:
* libguile/hooks.c:
* libguile/i18n.c:
* libguile/instructions.c:
* libguile/intrinsics.c:
* libguile/ioext.c:
* libguile/keywords.c:
* libguile/list.c:
* libguile/load.c:
* libguile/loader.c:
* libguile/macros.c:
* libguile/memoize.c:
* libguile/modules.c:
* libguile/net_db.c:
* libguile/numbers.c:
* libguile/objprop.c:
* libguile/pairs.c:
* libguile/poll.c:
* libguile/ports.c:
* libguile/posix.c:
* libguile/print.c:
* libguile/procs.c:
* libguile/programs.c:
* libguile/promises.c:
* libguile/r6rs-ports.c:
* libguile/random.c:
* libguile/rdelim.c:
* libguile/read.c:
* libguile/regex-posix.c:
* libguile/rw.c:
* libguile/scmsigs.c:
* libguile/simpos.c:
* libguile/smob.c:
* libguile/socket.c:
* libguile/sort.c:
* libguile/srcprop.c:
* libguile/srfi-1.c:
* libguile/srfi-13.c:
* libguile/srfi-14.c:
* libguile/srfi-4.c:
* libguile/srfi-60.c:
* libguile/stackchk.c:
* libguile/stacks.c:
* libguile/stime.c:
* libguile/strings.c:
* libguile/strorder.c:
* libguile/strports.c:
* libguile/struct.c:
* libguile/symbols.c:
* libguile/syntax.c:
* libguile/threads.c:
* libguile/throw.c:
* libguile/trees.c:
* libguile/unicode.c:
* libguile/values.c:
* libguile/variable.c:
* libguile/vectors.c:
* libguile/version.c:
* libguile/vm.c:
* libguile/vports.c:
* libguile/weak-table.c:
* libguile/weak-vector.c: Add gsubr includes.
2018-06-20 09:04:55 +02:00
Andy Wingo
d3cfabd89b
Devolve numbers.h from _scm.h.
...
* libguile/_scm.h: Remove numbers.h.
* libguile/array-handle.c:
* libguile/array-map.c:
* libguile/arrays.c:
* libguile/backtrace.c:
* libguile/bitvectors.c:
* libguile/bytevectors.c:
* libguile/chars.c:
* libguile/continuations.c:
* libguile/debug-malloc.c:
* libguile/error.c:
* libguile/eval.c:
* libguile/filesys.c:
* libguile/foreign-object.c:
* libguile/foreign.c:
* libguile/fports.c:
* libguile/frames.c:
* libguile/gc.c:
* libguile/generalized-arrays.c:
* libguile/gettext.c:
* libguile/goops.c:
* libguile/gsubr.c:
* libguile/guardians.c:
* libguile/hash.c:
* libguile/hashtab.c:
* libguile/hooks.c:
* libguile/i18n.c:
* libguile/instructions.c:
* libguile/intrinsics.c:
* libguile/ioext.c:
* libguile/list.c:
* libguile/memoize.c:
* libguile/net_db.c:
* libguile/options.c:
* libguile/ports.c:
* libguile/posix-w32.c:
* libguile/posix.c:
* libguile/procprop.c:
* libguile/programs.c:
* libguile/r6rs-ports.c:
* libguile/random.c:
* libguile/rdelim.c:
* libguile/read.c:
* libguile/regex-posix.c:
* libguile/rw.c:
* libguile/scmsigs.c:
* libguile/simpos.c:
* libguile/smob.c:
* libguile/socket.c:
* libguile/srcprop.c:
* libguile/srfi-13.c:
* libguile/srfi-14.c:
* libguile/srfi-4.c:
* libguile/stackchk.c:
* libguile/stacks.c:
* libguile/stime.c:
* libguile/strings.c:
* libguile/struct.c:
* libguile/symbols.c:
* libguile/threads.c:
* libguile/throw.c:
* libguile/vectors.c:
* libguile/version.c:
* libguile/vm.c:
* libguile/vports.c:
* libguile/weak-table.c: Add numbers.h.
2018-06-19 15:37:23 +02:00
Andy Wingo
e56d22153b
Remove ports.h from inline.h
...
* libguile/inline.h: Remove ports.h.
* libguile/bitvectors.c:
* libguile/bytevectors.c:
* libguile/foreign.c:
* libguile/frames.c:
* libguile/goops.h:
* libguile/programs.c:
* libguile/smob.c:
* libguile/srfi-14.c:
* libguile/vm.c: Add ports.h.
2018-06-19 12:01:38 +02:00
Andy Wingo
1e792c6580
Remove <stdio.h> from ports.h
...
* libguile/ports.h: Remove <stdio.h>.
* libguile/finalizers.c:
* libguile/guile.c:
* libguile/memoize.c:
* libguile/srfi-14.c:
* libguile/vm.c: Add <stdio.h>.
* libguile/struct.c: Add <stdarg.h>.
2018-06-19 11:51:57 +02:00
Andy Wingo
27df59415e
Devolve procs.h include from _scm.h.
...
* libguile/_scm.h: Remove procs.h include.
* libguile/arrays.c:
* libguile/foreign-object.c:
* libguile/ports.c:
* libguile/promises.c:
* libguile/r6rs-ports.c:
* libguile/scmsigs.c:
* libguile/srfi-1.c:
* libguile/srfi-13.c:
* libguile/srfi-14.c:
* libguile/strports.c:
* libguile/weak-table.c: Add procs includes.
2018-06-19 09:36:25 +02:00
Andy Wingo
730cfd80e2
Devolve pairs.h
...
* libguile/_scm.h: Remove pairs.h.
* libguile/alist.c:
* libguile/array-handle.c:
* libguile/array-map.c:
* libguile/arrays.c:
* libguile/async.c:
* libguile/bitvectors.c:
* libguile/bytevectors.c:
* libguile/chars.c:
* libguile/continuations.c:
* libguile/control.c:
* libguile/debug.c:
* libguile/deprecation.c:
* libguile/dynwind.c:
* libguile/eq.c:
* libguile/eval.c:
* libguile/evalext.c:
* libguile/expand.c:
* libguile/fdes-finalizers.c:
* libguile/feature.c:
* libguile/filesys.c:
* libguile/fluids.c:
* libguile/foreign.c:
* libguile/fports.c:
* libguile/gc.c:
* libguile/generalized-arrays.c:
* libguile/goops.c:
* libguile/guardians.c:
* libguile/hash.c:
* libguile/hashtab.c:
* libguile/hooks.c:
* libguile/i18n.c:
* libguile/instructions.c:
* libguile/ioext.c:
* libguile/keywords.c:
* libguile/list.c:
* libguile/load.c:
* libguile/loader.c:
* libguile/memoize.c:
* libguile/modules.c:
* libguile/net_db.c:
* libguile/numbers.c:
* libguile/objprop.c:
* libguile/options.c:
* libguile/ports-internal.h:
* libguile/ports.c:
* libguile/posix.c:
* libguile/print.c:
* libguile/print.h:
* libguile/procprop.c:
* libguile/programs.c:
* libguile/random.c:
* libguile/rdelim.c:
* libguile/read.c:
* libguile/regex-posix.c:
* libguile/scmsigs.c:
* libguile/script.c:
* libguile/socket.c:
* libguile/sort.c:
* libguile/srcprop.c:
* libguile/srfi-1.c:
* libguile/srfi-13.c:
* libguile/srfi-14.c:
* libguile/srfi-60.c:
* libguile/stacks.c:
* libguile/stime.c:
* libguile/strings.c:
* libguile/strorder.c:
* libguile/struct.c:
* libguile/symbols.c:
* libguile/threads.c:
* libguile/throw.c:
* libguile/trees.c:
* libguile/values.c:
* libguile/vectors.c:
* libguile/vm.c:
* libguile/weak-list.h:
* libguile/weak-set.c:
* libguile/weak-table.c:
* libguile/weak-vector.c: Add pairs.h.
2018-06-18 22:03:13 +02:00
Andy Wingo
1a99bd10f8
Devolve boolean.h include.
...
* libguile/_scm.h: Remove boolean.h include.
* libguile/alist.c:
* libguile/array-map.c:
* libguile/arrays.c:
* libguile/backtrace.c:
* libguile/bitvectors.c:
* libguile/chars.c:
* libguile/continuations.c:
* libguile/dynwind.c:
* libguile/eq.c:
* libguile/eval.c:
* libguile/expand.c:
* libguile/fdes-finalizers.c:
* libguile/filesys.c:
* libguile/foreign.c:
* libguile/fports.c:
* libguile/frames.c:
* libguile/generalized-arrays.h:
* libguile/goops.c:
* libguile/goops.h:
* libguile/guardians.c:
* libguile/hooks.c:
* libguile/i18n.c:
* libguile/intrinsics.c:
* libguile/list.c:
* libguile/load.c:
* libguile/loader.c:
* libguile/macros.c:
* libguile/memoize.c:
* libguile/modules.c:
* libguile/net_db.c:
* libguile/numbers.c:
* libguile/options.c:
* libguile/ports.c:
* libguile/print.c:
* libguile/procprop.c:
* libguile/procs.h:
* libguile/programs.c:
* libguile/r6rs-ports.c:
* libguile/read.c:
* libguile/scmsigs.c:
* libguile/sort.c:
* libguile/srcprop.h:
* libguile/srfi-1.c:
* libguile/srfi-13.c:
* libguile/srfi-14.c:
* libguile/srfi-14.h:
* libguile/srfi-4.c:
* libguile/stacks.c:
* libguile/stime.c:
* libguile/strorder.c:
* libguile/struct.c:
* libguile/struct.h:
* libguile/symbols.c:
* libguile/threads.c:
* libguile/throw.c:
* libguile/vports.c: Add boolean.h includes.
2018-06-18 21:38:44 +02:00
Andy Wingo
105e36543f
Remove scm_puts_unlocked.
...
* libguile/ports.h (scm_puts_unlocked): Remove.
* libguile/ports.c (scm_puts): Replace implementation with
scm_puts_unlocked's implementation.
* libguile/arbiters.c:
* libguile/backtrace.c:
* libguile/bitvectors.c:
* libguile/continuations.c:
* libguile/deprecation.c:
* libguile/dynl.c:
* libguile/eval.c:
* libguile/filesys.c:
* libguile/fluids.c:
* libguile/foreign.c:
* libguile/fports.c:
* libguile/frames.c:
* libguile/guardians.c:
* libguile/hashtab.c:
* libguile/hooks.c:
* libguile/load.c:
* libguile/macros.c:
* libguile/mallocs.c:
* libguile/print.c:
* libguile/programs.c:
* libguile/promises.c:
* libguile/smob.c:
* libguile/srcprop.c:
* libguile/srfi-14.c:
* libguile/stackchk.c:
* libguile/struct.c:
* libguile/threads.c:
* libguile/throw.c:
* libguile/values.c:
* libguile/variable.c:
* libguile/vm.c:
* libguile/weak-set.c:
* libguile/weak-table.c: Use scm_puts instead of scm_puts_unlocked.
2016-04-26 23:07:28 +02:00
Andy Wingo
0858753e82
Merge remote-tracking branch 'origin/stable-2.0'
...
Conflicts:
GUILE-VERSION
libguile/gc-malloc.c
libguile/ports.c
2012-02-08 11:48:08 +01:00
Bake Timmons
b7e64f8b26
Improve the usage of variable names in C docstrings.
...
* libguile/alist.c:
* libguile/array-map.c:
* libguile/arrays.c:
* libguile/bitvectors.c:
* libguile/filesys.c:
* libguile/foreign.c:
* libguile/generalized-arrays.c:
* libguile/hashtab.c:
* libguile/ioext.c:
* libguile/load.c:
* libguile/numbers.c:
* libguile/ports.c:
* libguile/posix.c:
* libguile/print.c:
* libguile/procprop.c:
* libguile/promises.c:
* libguile/simpos.c:
* libguile/socket.c:
* libguile/srfi-1.c:
* libguile/srfi-13.c:
* libguile/srfi-14.c:
* libguile/stacks.c:
* libguile/stime.c:
* libguile/strings.c:
* libguile/struct.c:
* libguile/symbols.c:
* libguile/threads.c:
* libguile/weak-table.c:
* libguile/weak-vector.c: Make the variable names in the C docstrings more
consistent. Replace a few instances of @var with @code when appropriate.
2012-02-02 12:22:10 +01:00
Andy Wingo
0607ebbfcf
locking for putc, puts
...
* libguile/ports.c (scm_putc, scm_puts):
* libguile/ports.h (scm_putc_unlocked, scm_puts_unlocked): Separate into
_unlocked and locked variants. Change all callers to use the
_unlocked versions.
2011-11-08 00:55:05 +01:00
Ludovic Courtès
190d4b0d93
Make VM string literals immutable.
...
* libguile/strings.c (scm_i_make_string, scm_i_make_wide_string): Add
`read_only_p' parameter. All callers updated.
* libguile/vm-i-loader.c (load_string, load_wide_string): Push read-only
strings.
* test-suite/tests/strings.test ("literals"): New test prefix.
2011-03-20 23:34:42 +01:00
Ralf Wildenhues
ffb62a43dc
fix typos in the manual bits generated from source comments.
...
* libguile/bitvectors.c, libguile/chars.c,
libguile/deprecated.c, libguile/numbers.c, libguile/random.c,
libguile/read.c, libguile/root.c, libguile/srfi-1.c,
libguile/srfi-13.c, libguile/srfi-14.c, libguile/uniform.c:
Fix typos, add missing newlines.
2011-02-09 22:28:49 +00:00
Andy Wingo
4a655e50a3
use scm_from_latin1_symboln for string literals and load-symbol
...
* libguile/bytevectors.c:
* libguile/eval.c:
* libguile/goops.c:
* libguile/i18n.c:
* libguile/load.c:
* libguile/memoize.c:
* libguile/modules.c:
* libguile/ports.c:
* libguile/print.c:
* libguile/procs.c:
* libguile/programs.c:
* libguile/read.c:
* libguile/script.c:
* libguile/srfi-14.c:
* libguile/stacks.c:
* libguile/strings.c:
* libguile/throw.c:
* libguile/vm.c: Use scm_from_latin1_symboln to make symbols from string
literals, because they aren't in the user's locale -- they are in
ASCII, and we can optimize this case.
* libguile/vm-i-loader.c: Also use scm_from_latin1_symboln when loading
narrow symbols.
2011-01-07 09:18:41 -08:00
Andy Wingo
838aa00070
further boot cleanups
...
* libguile/srfi-14.c (define_charset):
* libguile/deprecated.c (scm_create_hook): Don't bother making the
returned objects (hooks or charsets) into permanent objects; they are
already defined, and then the caller probably stores them away too.
* libguile/init.c (scm_i_init_guile): Add a couple annotations.
2009-12-05 11:50:21 +01:00
Ludovic Courtès
4c0fc00702
Nitpick in `srfi-14.c'.
...
* libguile/srfi-14.c (scm_i_ucs_range_to_char_set): Fix warning about
the position of BASE_CS.
2009-09-15 00:40:44 +02:00
Ludovic Courtès
6dc797eee9
Merge branch 'master' into boehm-demers-weiser-gc
...
Conflicts:
libguile/gc_os_dep.c
2009-09-09 22:39:49 +02:00
Michael Gran
ba8477ecce
Add char-set debugging function
...
* libguile/srfi-14.c (scm_sys_char_set_dump): new function
* libguile/srfi-14.h: declaration of scm_sys_char_set_dump
2009-09-03 08:29:45 -07:00
Michael Gran
719bb8cd5d
Distinguish between all codepoints and designated codepoints in char-sets
...
* libguile/unidata_to_charset.pl (designated): renamed from full
* libguile/srfi-14.c (scm_char_set_designated): new char-set
* libguile/srfi-14.i.c (cs_designated): renamed from cs_full
2009-09-03 08:23:24 -07:00
Michael Gran
aa2cba9c88
Remove always-true range checks in scm_i_ucs_range_to_char_set
...
* libguile/srfi-14.c (scm_i_ucs_range_to_char_set): limits are always
non-negative due to the type of the variable
2009-09-02 06:45:05 -07:00
Michael Gran
08ed805879
Unreachable code in charset set operator
...
* libguile/srfi-14.c (scm_i_charset_set): remove unreachable code
in scm_i_charset_set
2009-09-02 06:28:55 -07:00
Michael Gran
aff31b0f99
Optimize charset union operator
...
* libguile/srfi-14.c (charsets_union): call scm_i_charset_set_range
instead of setting characters one-by-one.
2009-09-02 06:28:47 -07:00
Michael Gran
f4cdfe6140
The charset complement operator should not include surrogates
...
* libguile/srfi-14.c (charsets_complement): skip over surrogates
when making a charset complement
2009-09-02 06:28:42 -07:00
Michael Gran
bde543e88b
char-set-filter! does not properly iterate over the charset
...
* libguile/srfi-14.c (scm_char_set_filter_x): iterate over
codepoints
2009-09-02 06:28:35 -07:00
Michael Gran
91772d8f8a
ucs-range->char-set should not store surrogates and has off-by-one error
...
* libguile/srfi-14.c (scm_i_ucs_range_to_char_set): new function that
contains the functionality of ucs_range_to_char_set, fixes
off-by-one, and doesn't store surroges
(scm_ucs_range_to_char_set, scm_ucs_range_to_char_set_x): call
scm_i_ucs_range_to_char_set
(scm_i_charset_set_range): new helper function
2009-09-02 06:28:29 -07:00
Michael Gran
693e72891f
char-set-any improperly unpacks charset data
...
* libguile/srfi-14.c (scm_char_set_any): unpack the charset correctly
2009-09-02 06:28:20 -07:00
Michael Gran
7165abeba8
char-set-xor! should modify the input parameter
...
char-set-xor! was not modifying its input parameter. It isn't
technically required to do so by the spec, but, the other similar
functions do it.
* libguile/srfi-14.c (scm_char_set_xor_x): modify the input parameter
2009-09-02 06:28:11 -07:00
Michael Gran
24d23822ee
Surrogate characters shouldn't be in charsets
...
* libguile/srfi-14.c (charsets_complement): use surrogate #defines instead
of hardcoded numbers
* libguile/srfi-14.i.c (cs_full_ranges): remove surrogates from full
charset
* libguile/unidata_to_charset.pl (full): test for surrogates
2009-08-29 00:01:06 -07:00
Ludovic Courtès
7af531508c
Merge branch 'master' into boehm-demers-weiser-gc
...
Conflicts:
libguile/Makefile.am
libguile/bytevectors.c
libguile/gc-card.c
libguile/gc-mark.c
libguile/programs.c
libguile/srcprop.c
libguile/srfi-14.c
libguile/symbols.c
libguile/threads.c
libguile/unif.c
libguile/vm.c
2009-08-28 19:16:46 +02:00
Michael Gran
d5ecf5797d
Fix FUNC_NAME definitions and #endif in srfi-14.[ch]
...
* libguile/srfi-14.c: whitespace and FUNC_NAME fixes
* libguile/srfi-14.h: #endif comment
2009-08-27 18:52:53 -07:00
Michael Gran
f49dbcadf3
Unicode-capable srfi-14 charsets
...
* libguile/Makefile.am: distribute new files srfi-14.i.c and
unidata_to_charset.pl
* chars.c (scm_c_upcase, scm_c_downcase): use unicode-enable toupper
and tolower
* libguile/srfi-14.h (scm_t_char_range, scm_t_char_set): new structures
to describe char-sets
(scm_t_char_set_cursor): new structure to describe char-set-cursors
(SCM_BITS_PER_LONG): removed
(SCM_CHARSET_GET): calls function
New declarations for scm_i_charset_get, scm_i_charset_set,
scm_i_charset_unset, and scm_debug_char_set.
* test-suite/tests/srfi-14.test: new tests
* libguile/srfi-14.c (SCM_CHARSET_DATA): new macro
(SCM_CHARSET_SET, SCM_CHARSET_UNSET): call function
(BYTES_PER_CHARSET, LONGS_PER_CHARSET): removed
(scm_i_charset_get, scm_i_charset_set, scm_i_charset_unset)
(charsets_equal, charsets_leq, charsets_union)
(charsets_intersection, charsets_complement, charsets_xor): new
functions that are low-level charset operators
(charset_print, charset_free): modified for new charset struct
(charset_cursor_print, charset_cursor_free): new function
(make_char_set, scm_char_set_p, scm_char_set_eq, scm_car_set_leq)
(scm_char_set_hash, scm_char_set_cursor, scm_char_set_ref)
(scm_char_set_cursor_next, scm_end_of_char_set_p, scm_char_set_fold)
(scm_char_set_unfold, scm_char_set_unfold_x, scm_char_set_for_each)
(scm_char_set_map, scm_char_set_copy, scm_char_set, scm_list_to_char_set)
(scm_list_to_char_set_x, scm_string_to_char_set, scm_string_to_char_set_x)
(scm_char_set_filter, scm_char_set_filter_x, scm_ucs_range_to_char_set)
(scm_ucs_range_to_char_set_x, scm_to_char_set, scm_char_set_size)
(scm_char_set_count, scm_char_set_to_list, scm_char_set_to_string)
(scm_char_set_contains_p, scm_char_set_every, scm_char_set_any)
(scm_char_set_adjoin, scm_char_set_delete, scm_char_set_adjoin_x)
(scm_char_set_delete_x, scm_char_set_complement, scm_char_set_union)
(scm_char_set_intersection, scm_char_set_difference, scm_char_set_xor)
(scm_char_set_diff_plus_intersection, scm_char_set_complement_x)
(scm_char_set_union_x, scm_char_set_intersection_x, scm_char_set_difference_x)
(scm_char_set_xor_x, scm_char_set_diff_plus_intersection_x): modified
to use new charset and charset-cursor data structures
(CSET_BLANK_PRED, CSET_SYMBOL_PRED, CSET_PUNCT_PRED, CSET_LOWER_PRED)
(CSET_UPPER_PRED, CSET_LETTER_PRED, CSET_DIGIT_PRED, CSET_WHITESPACE_PRED)
(CSET_CONTROL_PRED, CSET_HEX_DIGIT_PRED, CSET_ASCII_PRED, CSET_LETTER_PRED)
(CSET_LETTER_AND_DIGIT_PRED, CSET_PRINTING_PRED, CSET_TRUE_PRED)
(CSET_FALSE_PRED): removed
(scm_srfi_14_compute_char_sets): removed - too slow to iterate
over all of unicode at startup
(scm_debug_char_set) [SCM_CHARSET_DEBUG]: new function
2009-08-27 07:43:33 -07:00
Ludovic Courtès
fbb857a472
Merge branch 'master' into boehm-demers-weiser-gc
...
Conflicts:
lib/Makefile.am
libguile/Makefile.am
libguile/frames.c
libguile/gc-card.c
libguile/gc-freelist.c
libguile/gc-mark.c
libguile/gc-segment.c
libguile/gc_os_dep.c
libguile/load.c
libguile/macros.c
libguile/objcodes.c
libguile/programs.c
libguile/strings.c
libguile/vm.c
m4/gnulib-cache.m4
m4/gnulib-comp.m4
m4/inline.m4
2009-08-18 00:06:45 +02:00
Neil Jerram
53befeb700
Change Guile license to LGPLv3+
...
(Not quite finished, the following will be done tomorrow.
module/srfi/*.scm
module/rnrs/*.scm
module/scripts/*.scm
testsuite/*.scm
guile-readline/*
)
2009-06-17 00:22:09 +01:00
Ludovic Courtès
6774820f1e
Merge commit ' 29776e85da
' into boehm-demers-weiser-gc
...
Conflicts:
libguile/gc-card.c
libguile/gc.c
libguile/gc.h
libguile/ports.c
2008-09-10 22:50:04 +02:00
Ludovic Courtes
a4a141f679
Removed a lot of now-useless SMOB mark/free functions.
...
* libguile/arbiters.c (scm_init_arbiters): Don't invoke `scm_set_smob_mark'.
* libguile/async.c (async_gc_mark): Removed.
(scm_init_async): Don't invoke `scm_set_smob_mark'.
* libguile/coop-pthreads.c (thread_mark): Removed.
(create_thread): Use `scm_gc_malloc' instead of `scm_malloc' when
allocating `launch_data'.
(mutex_mark): Removed.
(scm_threads_init): Don't invoke `scm_set_smob_mark' and
`scm_set_smob_free'.
* libguile/debug.c (scm_init_debug): Don't invoke `scm_set_smob_mark'.
* libguile/dynl.c (dynl_obj_mark): Removed.
(scm_init_dynamic_linking): Don't invoke `scm_set_smob_mark'.
* libguile/dynwind.c (winder_mark): Removed.
(scm_init_dynwind): Don't invoke `scm_set_smob_mark'.
* libguile/environments.c (environment_mark): Removed.
(environment_free): Removed.
(observer_mark): Removed.
(core_environments_mark): Removed.
(core_environments_finalize): Removed.
(leaf_environment_mark): Removed.
(leaf_environment_free): Removed.
(leaf_environment_funcs): Don't refer to the above funcs.
(eval_environment_mark): Removed.
(eval_environment_free): Removed.
(eval_environment_funcs): Don't refer to the above funcs.
(import_environment_mark): Removed.
(import_environment_free): Removed.
(import_environment_funcs): Don't refer to the above funcs.
(export_environment_mark): Removed.
(export_environment_free): Removed.
(export_environment_funcs): Don't refer to the above funcs.
(scm_environments_prehistory): Don't invoke `scm_set_smob_mark' and
`scm_set_smob_free'.
* libguile/environments.h (scm_environment_funcs)[mark]: Removed.
[free]: Removed.
* libguile/eval.c (promise_mark): Removed.
(promise_free): Removed.
(scm_init_eval): Don't invoke `scm_set_smob_mark' and
`scm_set_smob_free'.
* libguile/fluids.c (fluid_free): Removed.
(scm_fluids_prehistory): Don't invoke `scm_set_smob_mark' and
`scm_set_smob_free'.
* libguile/futures.c (future_mark): Removed.
(scm_init_futures): Don't invoke `scm_set_smob_mark'.
* libguile/hashtab.c (hashtable_free): Removed.
(scm_hashtab_prehistory): Don't invoke `scm_set_smob_mark' and
`scm_set_smob_free'.
* libguile/hooks.c (scm_init_hooks): Don't invoke `scm_set_smob_mark'.
* libguile/keywords.c (scm_init_keywords): Don't invoke
`scm_set_smob_mark'.
* libguile/macros.c (scm_init_macros): Don't invoke `scm_set_smob_mark'.
* libguile/modules.c (scm_init_modules): Don't invoke
`scm_set_smob_mark'.
* libguile/print.c (scm_init_print): Don't invoke `scm_set_smob_mark'.
* libguile/random.c (scm_i_copy_rstate): Use `scm_gc_malloc' instead of
`scm_malloc'.
(scm_c_make_rstate): Likewise.
(rstate_free): Removed.
(scm_init_random): Don't invoke `scm_set_smob_free'.
* libguile/srcprop.c (srcprops_mark): Removed.
(scm_init_srcprop): Don't invoke `srcprops_mark'.
* libguile/srfi-14.c (charset_free): Removed.
(scm_init_srfi_14): Don't invoke `scm_set_smob_free'.
* libguile/srfi-4.c (uvec_mark): Removed.
(uvec_free): Removed.
(scm_init_srfi_4): Don't invoke `scm_set_smob_free' and
`scm_set_smob_mark'.
* libguile/threads.c (thread_mark): Removed.
(fat_mutex_mark): Removed.
(fat_cond_mark): Removed.
(scm_init_threads): Dont invoke `scm_set_smob_mark' and
`scm_set_smob_free'.
* libguile/unif.c (bitvector_free): Removed.
(array_mark): Removed.
(array_free): Removed.
(scm_init_unif): Don't invoke `scm_set_smob_free' and
`scm_set_smob_mark'.
git-archimport-id: lcourtes@laas.fr--2005-libre/guile-core--boehm-gc--1.9--patch-28
2008-09-05 09:34:23 +02:00
Ludovic Courtès
6caac03c93
Changes from arch/CVS synchronization
2007-07-29 14:58:21 +00:00
Ludovic Courtès
a17d26545d
Changes from arch/CVS synchronization
2006-09-20 12:48:45 +00:00