summaryrefslogtreecommitdiff
path: root/libguile/srfi-14.c
Commit message (Collapse)AuthorAgeFilesLines
* Update unicode tables to Unicode 14.0.0; initial charsets immutableAndy Wingo2022-02-061-50/+67
| | | | | | | | | | | | | | | | | | | | | * 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.
* Avoid passing NULL to 'memcpy' and 'memcmp'.Mark H Weaver2019-05-231-3/+7
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Fix GCC warning with %char-set-dump.Andy Wingo2018-10-071-1/+1
| | | | | | * 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.
* Give multiple-values objects a tc7Andy Wingo2018-06-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Update license notices in all C filesAndy Wingo2018-06-201-19/+19
| | | | | Update to newest recommended license notices from the FSF. Everything stays LGPLv3+ except guile-readline which is GPLv3+.
* Remove (C) from copyright statementsAndy Wingo2018-06-201-1/+1
| | | | | | 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.
* Rationalize include order in C filesAndy Wingo2018-06-201-5/+6
| | | | | Include config.h first, then system includes, then libguile includes, in alphabetical order, then the include for the file in question.
* Make libguile header inclusion consistent within libguile c filesAndy Wingo2018-06-201-17/+17
| | | | | Change from '#include "libguile/foo.h"' and '#include <libguile/foo.h>' to '#include "foo.h"'.
* Remove _scm.hAndy Wingo2018-06-201-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Devolve symbols.h from _scm.hAndy Wingo2018-06-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Remove modules.h from _scm.h.Andy Wingo2018-06-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Devolve threads.h from _scm.h.Andy Wingo2018-06-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Move subr snarfing macros to gsubr.h.Andy Wingo2018-06-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Devolve numbers.h from _scm.h.Andy Wingo2018-06-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Remove ports.h from inline.hAndy Wingo2018-06-191-0/+1
| | | | | | | | | | | | | * 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.
* Remove <stdio.h> from ports.hAndy Wingo2018-06-191-0/+1
| | | | | | | | | | * 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>.
* Devolve procs.h include from _scm.h.Andy Wingo2018-06-191-0/+1
| | | | | | | | | | | | | | | * 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.
* Devolve pairs.hAndy Wingo2018-06-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Devolve boolean.h include.Andy Wingo2018-06-181-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Remove scm_puts_unlocked.Andy Wingo2016-04-261-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Merge remote-tracking branch 'origin/stable-2.0'Andy Wingo2012-02-081-3/+3
|\ | | | | | | | | | | | | Conflicts: GUILE-VERSION libguile/gc-malloc.c libguile/ports.c
| * Improve the usage of variable names in C docstrings.Bake Timmons2012-02-021-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | locking for putc, putsAndy Wingo2011-11-081-9/+9
|/ | | | | | | * 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.
* Make VM string literals immutable.Ludovic Courtès2011-03-201-2/+2
| | | | | | | | | | * 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.
* fix typos in the manual bits generated from source comments.Ralf Wildenhues2011-02-091-2/+2
| | | | | | | | * 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.
* use scm_from_latin1_symboln for string literals and load-symbolAndy Wingo2011-01-071-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* further boot cleanupsAndy Wingo2009-12-051-1/+1
| | | | | | | | | * 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.
* Nitpick in `srfi-14.c'.Ludovic Courtès2009-09-151-2/+2
| | | | | * libguile/srfi-14.c (scm_i_ucs_range_to_char_set): Fix warning about the position of BASE_CS.
* Merge branch 'master' into boehm-demers-weiser-gcLudovic Courtès2009-09-091-97/+263
|\ | | | | | | | | Conflicts: libguile/gc_os_dep.c
| * Add char-set debugging functionMichael Gran2009-09-031-19/+47
| | | | | | | | | | | | * libguile/srfi-14.c (scm_sys_char_set_dump): new function * libguile/srfi-14.h: declaration of scm_sys_char_set_dump
| * Distinguish between all codepoints and designated codepoints in char-setsMichael Gran2009-09-031-0/+14
| | | | | | | | | | | | | | | | * 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
| * Remove always-true range checks in scm_i_ucs_range_to_char_setMichael Gran2009-09-021-2/+0
| | | | | | | | | | * libguile/srfi-14.c (scm_i_ucs_range_to_char_set): limits are always non-negative due to the type of the variable
| * Unreachable code in charset set operatorMichael Gran2009-09-021-12/+5
| | | | | | | | | | * libguile/srfi-14.c (scm_i_charset_set): remove unreachable code in scm_i_charset_set
| * Optimize charset union operatorMichael Gran2009-09-021-4/+2
| | | | | | | | | | * libguile/srfi-14.c (charsets_union): call scm_i_charset_set_range instead of setting characters one-by-one.
| * The charset complement operator should not include surrogatesMichael Gran2009-09-021-12/+34
| | | | | | | | | | * libguile/srfi-14.c (charsets_complement): skip over surrogates when making a charset complement
| * char-set-filter! does not properly iterate over the charsetMichael Gran2009-09-021-1/+1
| | | | | | | | | | * libguile/srfi-14.c (scm_char_set_filter_x): iterate over codepoints
| * ucs-range->char-set should not store surrogates and has off-by-one errorMichael Gran2009-09-021-48/+157
| | | | | | | | | | | | | | | | | | * 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
| * char-set-any improperly unpacks charset dataMichael Gran2009-09-021-1/+3
| | | | | | | | * libguile/srfi-14.c (scm_char_set_any): unpack the charset correctly
| * char-set-xor! should modify the input parameterMichael Gran2009-09-021-1/+2
| | | | | | | | | | | | | | | | 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
| * Surrogate characters shouldn't be in charsetsMichael Gran2009-08-291-2/+3
| | | | | | | | | | | | | | | | | | | | * 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
* | Merge branch 'master' into boehm-demers-weiser-gcLudovic Courtès2009-08-281-549/+928
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Fix FUNC_NAME definitions and #endif in srfi-14.[ch]Michael Gran2009-08-271-22/+3
| | | | | | | | | | | | * libguile/srfi-14.c: whitespace and FUNC_NAME fixes * libguile/srfi-14.h: #endif comment
| * Unicode-capable srfi-14 charsetsMichael Gran2009-08-271-550/+981
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* | Merge branch 'master' into boehm-demers-weiser-gcLudovic Courtès2009-08-181-6/+7
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Change Guile license to LGPLv3+Neil Jerram2009-06-171-6/+7
| | | | | | | | | | | | | | | | | | | | (Not quite finished, the following will be done tomorrow. module/srfi/*.scm module/rnrs/*.scm module/scripts/*.scm testsuite/*.scm guile-readline/* )
* | Merge commit '29776e85da637ec4d44b2b2822d6934a50c0084b' into ↵Ludovic Courtès2008-09-101-3/+1
|\ \ | |/ | | | | | | | | | | | | | | | | boehm-demers-weiser-gc Conflicts: libguile/gc-card.c libguile/gc.c libguile/gc.h libguile/ports.c
| * Changes from arch/CVS synchronizationLudovic Courtès2007-07-291-3/+1
| |
* | Removed a lot of now-useless SMOB mark/free functions.Ludovic Courtes2008-09-051-8/+0
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Changes from arch/CVS synchronizationLudovic Courtès2006-09-201-50/+139
|
* merge from 1.8 branchKevin Ryde2006-04-171-1/+1
|