summaryrefslogtreecommitdiff
path: root/libguile/boolean.c
Commit message (Collapse)AuthorAgeFilesLines
* Improve the documentation for 'nil?'.Mark H Weaver2019-05-231-2/+10
| | | | | | | * libguile/boolean.c (scm_nil_p): Improve docstring. * doc/ref/api-languages.texi (Nil): Add documentation for 'nil?', along with a description of how Elisp interprets Scheme booleans and end-of-list.
* Update license notices in all C filesAndy Wingo2018-06-201-17/+17
| | | | | 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-2/+3
| | | | | 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-4/+4
| | | | | Change from '#include "libguile/foo.h"' and '#include <libguile/foo.h>' to '#include "foo.h"'.
* Rename __scm.h to scm.hAndy Wingo2018-06-201-1/+1
| | | | * libguile/scm.h: Rename. Update all includers.
* Inline tags.h into __scm.hAndy Wingo2018-06-201-2/+1
| | | | | | | | | | | | | | | | | * libguile/__scm.h: Inline tags.h, and reformat comments. Before, these files used to include each other! * libguile.h: * libguile/atomic.h: * libguile/boolean.c: * libguile/eq.h: * libguile/gc-malloc.c: * libguile/gc.c: * libguile/pairs.c: * libguile/pairs.h: * libguile/ports.h: * libguile/print.c: * libguile/snarf.h: * libguile/tags.h: Remove tags.h includes.
* Remove Emacs local variables comments in Guile sourceAndy Wingo2018-06-201-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The .dir-locals.el file in the repository is sufficient for Emacs users. * libguile/__scm.h: * libguile/alist.c: * libguile/alist.h: * libguile/array-handle.c: * libguile/array-handle.h: * libguile/array-map.c: * libguile/array-map.h: * libguile/arrays.c: * libguile/arrays.h: * libguile/async.c: * libguile/async.h: * libguile/backtrace.c: * libguile/backtrace.h: * libguile/bitvectors.c: * libguile/bitvectors.h: * libguile/boolean.c: * libguile/boolean.h: * libguile/chars.c: * libguile/chars.h: * libguile/chooks.c: * libguile/chooks.h: * libguile/continuations.c: * libguile/continuations.h: * libguile/control.c: * libguile/conv-integer.i.c: * libguile/debug-malloc.h: * libguile/debug.c: * libguile/debug.h: * libguile/deprecation.c: * libguile/deprecation.h: * libguile/dynl.c: * libguile/dynl.h: * libguile/dynstack.c: * libguile/dynstack.h: * libguile/dynwind.c: * libguile/dynwind.h: * libguile/eq.c: * libguile/eq.h: * libguile/error.c: * libguile/error.h: * libguile/eval.c: * libguile/eval.h: * libguile/evalext.c: * libguile/evalext.h: * libguile/expand.c: * libguile/expand.h: * libguile/extensions.c: * libguile/extensions.h: * libguile/feature.c: * libguile/feature.h: * libguile/filesys.c: * libguile/filesys.h: * libguile/fluids.c: * libguile/fluids.h: * libguile/foreign.c: * libguile/fports.c: * libguile/fports.h: * libguile/frames.c: * libguile/frames.h: * libguile/gc-inline.h: * libguile/gc.c: * libguile/gc.h: * libguile/generalized-arrays.c: * libguile/generalized-arrays.h: * libguile/generalized-vectors.c: * libguile/generalized-vectors.h: * libguile/gettext.c: * libguile/gettext.h: * libguile/goops.c: * libguile/goops.h: * libguile/gsubr.c: * libguile/gsubr.h: * libguile/guardians.c: * libguile/guardians.h: * libguile/guile.c: * libguile/hash.c: * libguile/hash.h: * libguile/hashtab.c: * libguile/hashtab.h: * libguile/hooks.c: * libguile/hooks.h: * libguile/i18n.c: * libguile/i18n.h: * libguile/init.c: * libguile/init.h: * libguile/instructions.c: * libguile/instructions.h: * libguile/intrinsics.c: * libguile/intrinsics.h: * libguile/ioext.c: * libguile/ioext.h: * libguile/iselect.h: * libguile/keywords.c: * libguile/keywords.h: * libguile/list.c: * libguile/list.h: * libguile/load.c: * libguile/load.h: * libguile/loader.c: * libguile/loader.h: * libguile/macros.c: * libguile/macros.h: * libguile/mallocs.c: * libguile/mallocs.h: * libguile/memmove.c: * libguile/memoize.c: * libguile/memoize.h: * libguile/modules.c: * libguile/modules.h: * libguile/net_db.c: * libguile/net_db.h: * libguile/null-threads.c: * libguile/null-threads.h: * libguile/numbers.c: * libguile/numbers.h: * libguile/objprop.c: * libguile/objprop.h: * libguile/options.c: * libguile/options.h: * libguile/pairs.c: * libguile/pairs.h: * libguile/poll.c: * libguile/poll.h: * libguile/ports.c: * libguile/ports.h: * libguile/posix.c: * libguile/posix.h: * libguile/print.c: * libguile/print.h: * libguile/procprop.c: * libguile/procprop.h: * libguile/procs.c: * libguile/procs.h: * libguile/programs.c: * libguile/programs.h: * libguile/promises.c: * libguile/promises.h: * libguile/pthread-threads.h: * libguile/random.c: * libguile/random.h: * libguile/rdelim.c: * libguile/rdelim.h: * libguile/read.c: * libguile/read.h: * libguile/regex-posix.c: * libguile/regex-posix.h: * libguile/rw.c: * libguile/rw.h: * libguile/scmsigs.c: * libguile/scmsigs.h: * libguile/script.c: * libguile/script.h: * libguile/simpos.c: * libguile/simpos.h: * libguile/smob.c: * libguile/smob.h: * libguile/snarf.h: * libguile/socket.c: * libguile/socket.h: * libguile/sort.c: * libguile/sort.h: * libguile/srcprop.c: * libguile/srcprop.h: * libguile/stackchk.c: * libguile/stackchk.h: * libguile/stacks.c: * libguile/stacks.h: * libguile/stime.c: * libguile/stime.h: * libguile/strerror.c: * libguile/strings.c: * libguile/strings.h: * libguile/strorder.c: * libguile/strorder.h: * libguile/strports.c: * libguile/strports.h: * libguile/struct.c: * libguile/struct.h: * libguile/symbols.c: * libguile/symbols.h: * libguile/syntax.c: * libguile/syscalls.h: * libguile/tags.h: * libguile/threads.c: * libguile/threads.h: * libguile/throw.c: * libguile/throw.h: * libguile/trees.h: * libguile/unicode.c: * libguile/unicode.h: * libguile/uniform.c: * libguile/uniform.h: * libguile/values.c: * libguile/values.h: * libguile/variable.c: * libguile/variable.h: * libguile/vectors.c: * libguile/vectors.h: * libguile/version.c: * libguile/vm-engine.c: * libguile/vm-expand.h: * libguile/vm.c: * libguile/vm.h: * libguile/vports.c: * libguile/vports.h: * libguile/weak-list.h: * libguile/weak-set.c: * libguile/weak-set.h: * libguile/weak-table.c: * libguile/weak-table.h: * libguile/weak-vector.c: * libguile/weak-vector.h: Remove needless trailing comments.
* 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 strings.hAndy Wingo2018-06-201-0/+1
| | | | | | | | | | | * libguile/_scm.h: Remove strings.h. * libguile/array-handle.c: * libguile/boolean.c: * libguile/generalized-vectors.c: * libguile/loader.c: * libguile/unicode.c: Add strings.h. * libguile/symbols.h: Add strings.h, which was missing from the previous symbols.h devolution.
* 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.
* Remove includes of validate.h.Andy Wingo2018-06-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * guile-readline/readline.c: * libguile/alist.c: * libguile/array-map.c: * libguile/arrays.c: * libguile/async.c: * libguile/atomic.c: * libguile/backtrace.c: * libguile/boolean.c: * libguile/bytevectors.c: * libguile/chars.c: * libguile/continuations.c: * libguile/debug.c: * libguile/dynl.c: * libguile/eq.c: * libguile/error.c: * libguile/eval.c: * libguile/evalext.c: * libguile/expand.c: * libguile/feature.c: * libguile/filesys.c: * libguile/fluids.c: * libguile/fports.c: * libguile/gc-malloc.c: * libguile/gc.c: * libguile/goops.c: * libguile/goops.h: * libguile/guardians.c: * libguile/hash.c: * libguile/hashtab.c: * libguile/hashtab.h: * libguile/hooks.c: * libguile/i18n.c: * libguile/ioext.c: * libguile/keywords.c: * libguile/list.c: * libguile/load.c: * libguile/macros.c: * libguile/memoize.c: * libguile/modules.h: * libguile/net_db.c: * libguile/numbers.c: * libguile/pairs.c: * libguile/poll.c: * libguile/ports.c: * libguile/posix.c: * libguile/print.c: * libguile/procprop.c: * libguile/procs.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/socket.c: * libguile/sort.c: * libguile/srcprop.c: * libguile/srfi-1.c: * libguile/srfi-4.c: * libguile/srfi-60.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/vports.c: * libguile/weak-set.c: * libguile/weak-table.c: * libguile/weak-vector.c: * libguile.h: Remove validate.h include.
* add `nil?' primitiveBT Templeton2012-02-031-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | * libguile/boolean.c (scm_nil_p): New function. * libguile/vm-i-scheme.c (nilp, not_nilp): * libguile/vm-i-system.c (br_if_nil, br_if_not_nil): New instructions. Renumber other ops. * libguile/_scm.h (SCM_OBJCODE_MINOR_VERSION): Increment. * module/language/assembly/compile-bytecode.scm (compile-bytecode): Add support for writing `br-if-nil' and `br-if-not-nil' instructions. * module/language/assembly/disassemble.scm (code-annotation): Add `br-if-nil' and `br-if-not-nil' to the list of branch instructions. * module/language/tree-il/compile-glil.scm: Add `nil?' to `*primcall-ops*'. (flatten): Use the new branch instructions for `nil?' conditionals. * module/language/tree-il/primitives.scm: Add `nil?' to `*interesting-primitive-names*', `*effect-free-primitives', and `*effect+exception-free-primitives*'.
* allow iflags to be constant expressions with typing-strictness==2Andy Wingo2011-05-131-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * libguile/tags.h (SCM_MAKE_ITAG8_BITS): New helper, produces a scm_t_bits instead of a SCM, because SCM_UNPACK is not a constant expression with SCM_DEBUG_TYPING_STRICTNESS==2. (SCM_MAKIFLAG_BITS): Remove SCM_MAKIFLAG, and replace with this, which returns bits. (SCM_BOOL_F_BITS, SCM_ELISP_NIL_BITS, SCM_EOL_BITS, SCM_BOOL_T_BITS): (SCM_UNSPECIFIED_BITS, SCM_UNDEFINED_BITS, SCM_EOF_VAL_BITS): (SCM_UNBOUND_BITS): New definitions. Defined SCM_BOOL_F, etc in terms of them. (SCM_XXX_ANOTHER_BOOLEAN_DONT_USE_0): (SCM_XXX_ANOTHER_BOOLEAN_DONT_USE_1): (SCM_XXX_ANOTHER_BOOLEAN_DONT_USE_2): (SCM_XXX_ANOTHER_LISP_FALSE_DONT_USE): Be bits instead of SCM values. (SCM_BITS_DIFFER_IN_EXACTLY_ONE_BIT_POSITION): (SCM_BITS_DIFFER_IN_EXACTLY_TWO_BIT_POSITIONS): Rename from SCM_VALUES_DIFFER_..., and take unpacked bits as the args. * libguile/boolean.c: Update verify block to use SCM_BITS_DIFFER_IN_EXACTLY_TWO_BIT_POSITIONS et al. * libguile/debug.c (scm_debug_opts): * libguile/print.c (scm_print_opts): * libguile/read.c (scm_read_opts): Use iflags bits for initializers. * libguile/hash.c (scm_hasher): Use _BITS for iflags as case labels. * libguile/pairs.c: Nil/null compile-time check uses SCM_ELISP_NIL_BITS.
* remove libguile/lang.h, deprecate %nil (in favor of #nil)Andy Wingo2010-04-091-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * libguile/Makefile.am: * libguile/init.c: * libguile/lang.c: * libguile/lang.h: Remove lang.c and lang.h. * libguile/pairs.h (SCM_NIL_P, SCM_NULL_OR_NIL_P): Moved here. * module/ice-9/deprecated.scm (%nil): %nil definition moved here. * libguile/alist.c: * libguile/async.c: * libguile/backtrace.c: * libguile/boolean.c: * libguile/dynl.c: * libguile/eval.c: * libguile/filesys.c: * libguile/fluids.c: * libguile/list.c: * libguile/load.c: * libguile/options.c: * libguile/posix.c: * libguile/print.c: * libguile/promises.c: * libguile/sort.c: * libguile/throw.c: * libguile/trees.c: * libguile/vectors.c: * libguile/vm.c: * libguile/weaks.c: * srfi/srfi-1.c: <libguile/lang.h> references removed.
* nil is false, wheeAndy Wingo2010-03-301-7/+6
| | | | | | | | | | | * libguile/boolean.h (scm_is_false): Recognize nil as false, by default. (scm_is_bool): Recognize nil as a boolean. * libguile/boolean.c (scm_not, scm_boolean, scm_to_bool, scm_is_bool): Adapt to treat nil as false. * libguile/vm-i-system.c (br-if, br-if-not): Just use scm_is_false instead of specifically mentioning nil.
* Renumber IFLAGSs so the first 8 are reserved for lisp booleans.Mark H Weaver2010-03-281-1/+1
| | | | | | | | | | | | | | This enables more efficient implementations of several operations, e.g. scm_is_lisp_bool, canonicalize_boolean, fast_boolean_not, converting SCM booleans to C booleans, etc. * libguile/tags.h: Renumber IFLAGs. * libguile/print.c: Renumber iflagnames to match. * libguile/boolean.c: * libguile/boolean.h: SCM_XXX_ANOTHER_BOOLEAN_DONT_USE --> SCM_XXX_ANOTHER_BOOLEAN_DONT_USE_0
* Reinstate `scm_is_bool ()' as a function.Ludovic Courtès2010-01-191-1/+13
| | | | | | * libguile/boolean.c (scm_is_bool): New function. * libguile/boolean.h (scm_is_bool): New function declaration.
* the cube of lisp booleans (#f nil () #t)Mark H Weaver2009-10-271-9/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Renumbers the IFLAG constants. * Adds several macros related to boolean type tests, null tests, and boolean-truth testing (including lisp-style boolean-truth tests). * Adds compile-time checks to verify the necessary IFLAG numbering properties needed for the checks to work properly. * Changes some existing code to use the new optimized macros, without changing the semantics of the code at all (except that scm_is_bool is changed from a function to a macro). I added the following macros, whose names explicitly state how %nil should be handled. See the comments in the patch for more information about these. scm_is_false_assume_not_lisp_nil scm_is_true_assume_not_lisp_nil scm_is_false_and_not_lisp_nil scm_is_true_or_lisp_nil scm_is_false_or_lisp_nil scm_is_true_and_not_lisp_nil scm_is_lisp_false scm_is_lisp_true scm_is_null_assume_not_lisp_nil scm_is_null_and_not_lisp_nil scm_is_null_or_lisp_nil scm_is_bool_and_not_lisp_nil scm_is_bool_or_lisp_nil The following already-existing macros are defined as aliases, such that their semantics is unchanged (although scm_is_bool used to be a function and is now a macro). scm_is_null --> scm_is_null_and_not_lisp_nil scm_is_false --> scm_is_false_and_not_lisp_nil scm_is_true --> scm_is_true_or_lisp_nil scm_is_bool --> scm_is_bool_and_not_lisp_nil (I still believe that these should be changed to versions that handle %nil properly, but await approval on that point, so these patches do not make those changes) Also, if the preprocessor macro SCM_ENABLE_ELISP is not true (this macro already existed and was used in lang.h), all overheads associated with %nil handling are eliminated from the above macros. * libguile/tags.h (SCM_BOOL_F, SCM_BOOL_T, SCM_UNSPECIFIED) (SCM_UNDEFINED, SCM_UNBOUND, SCM_ELISP_NIL): Renumber, so that a number of important distinctions (false versus true, end-of-list, etc) can be made by masking a single bit. Also define a number of build-time tests to assert that this condition holds. * libguile/boolean.h (scm_is_false_and_not_nil, scm_is_true_or_nil) (scm_is_false_assume_not_nil, scm_is_true_assume_not_nil): (scm_is_false_or_nil, scm_is_true_and_not_nil) (scm_is_bool_or_nil, scm_is_bool_and_not_nil): New exciting macros to test certain boolean/end-of-list properties. (scm_is_false, scm_is_true): Use a restrictive definition, where only SCM_BOOL_F is false. Should probably change in the future. (scm_is_bool): Incompatible change: changed to be a macro. Was a function before. Probably should allow nil as a boolean, but that will be for a later patch. (scm_is_lisp_false, scm_is_lisp_true): New macros, implementing the standard Lisp boolean predicates, where '() is actually false. * libguile/eval.i.c (CEVAL): Fix a number of false-or-nil and similar tests to use the new macros. * libguile/lang.h (SCM_NULL_OR_NIL_P): Use scm_is_null_or_nil. * libguile/pairs.c: Add a compile-time check that null and nil differ by only one bit. * libguile/pairs.h (scm_is_null_and_not_nil, scm_is_null_assume_not_nil) (scm_is_null_or_nil): New exciting macros! (scm_is_null): Just be scm_is_null_and_not_nil, for now. * libguile/print.c: Adapt to the reordering, and print suitably nasty things for the not-to-be-used values.
* 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/* )
* Include <config.h> in all C files; use `#ifdef HAVE_CONFIG_H' rather than `#if'.Ludovic Courtès2008-09-131-1/+4
|
* merge from 1.8 branchKevin Ryde2006-04-171-1/+1
|
* The FSF has a new address.Marius Vollmer2005-05-231-1/+1
|
* (scm_is_bool): Fix typo.Marius Vollmer2004-07-061-3/+5
| | | | | | | * deprecated.h, boolean.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOL, SCM_NEGATE_BOOL, SCM_BOOLP): Deprecated by moving into "deprecated.h". Replaced all uses with scm_is_false, scm_is_true, scm_from_bool, and scm_is_bool, respectively.
* (scm_is_true, scm_is_false, scm_from_bool, scm_to_bool): New.Marius Vollmer2004-07-051-0/+15
|
* Changed license terms to the plain LGPL thru-out.Marius Vollmer2003-04-051-36/+12
|
* Retire inclusion guard macro SCM_MAGIC_SNARFER.Thien-Thi Nguyen2002-03-141-2/+0
|
* * First batch of libguile changes for Elisp support.Neil Jerram2002-01-221-2/+3
| | | | | * Fixed a few typos. * Minor rationalization of macros relating to source breakpoints.
* * alist.c, arbiters.c, async.h, backtrace.h, boolean.c, chars.c,Martin Grabmüller2001-07-191-1/+1
| | | | | | | | | | | | | | chars.h, continuations.h, debug-malloc.h, dynl.c, feature.c, feature.h, filesys.h, fluids.h, fports.h, gc_os_dep.c, gdb_interface.h, gh_eval.c, gh_funcs.c, gh_io.c, gh_list.c, gh_predicates.c, gsubr.c, gsubr.h, guardians.h, guile-func-name-check.in, guile-snarf-docs-texi.in, guile-snarf-docs.in, guile-snarf.awk.in, guile-snarf.in, hashtab.h, iselect.h, keywords.h, lang.c, list.h, load.h, objprop.c, objprop.h, options.c, options.h, random.h, regex-posix.h, root.c, root.h, script.c, snarf.h, stackchk.c, strerror.c, strop.h, strports.h, threads.h, values.c, values.h, version.c, version.h: Updated copyright notice.
* Remove "face-lift" comment.Thien-Thi Nguyen2001-07-091-2/+0
|
* Remove #include <stdio.h>. Add #include <string.h>.Keisuke Nishida2001-03-091-1/+0
|
* * alist.c, arbiters.c, async.c, backtrace.c, boolean.c, chars.c,Marius Vollmer2000-11-171-0/+2
| | | | | | | | | | | | | | | | | | | | | continuations.c, debug-malloc.c, debug.c, dynl.c, dynwind.c, environments.c, eq.c, error.c, eval.c, evalext.c, feature.c, filesys.c, fluids.c, fports.c, gc.c, goops.c, guardians.c, hash.c, hashtab.c, hooks.c, ioext.c, iselect.c, keywords.c, lang.c, list.c, load.c, macros.c, modules.c, net_db.c, numbers.c, objects.c, objprop.c, options.c, pairs.c, ports.c, posix.c, print.c, procprop.c, procs.c, properties.c, ramap.c, random.c, read.c, regex-posix.c, root.c, scmsigs.c, script.c, simpos.c, socket.c, sort.c, srcprop.c, stackchk.c, stacks.c, stime.c, strings.c, strop.c, strorder.c, strports.c, struct.c, symbols.c, tag.c, threads.c, throw.c, unif.c, variable.c, vectors.c, version.c, vports.c, weaks.c: Makes sure the snarfer output inclusion is disabled when the snarfer is run on the file. Thanks to Lars J. Aas! * Makefile.am: Install guile-procedures.txt in version-specific directory to enable multiple installed guile versions. Suggested by Karl M. Hegbloom <karlheg@debian.org, patch by Matthias Koeppe.
* * Docstring fixes - adding texinfo markup and removing extraneous trailing ↵Neil Jerram2000-08-181-2/+2
| | | | newlines.
* Updated copyrightsMikael Djurfeldt2000-06-121-1/+1
|
* * Makefile.am (DEFS): Added. automake adds -I options to DEFS,Mikael Djurfeldt2000-04-211-4/+4
| | | | | | | | | | and we don't want that. (INCLUDES): Removed all -I options except for the root source directory and the root build directory. * *.*: Change includes so that they always use the "prefixes" libguile/, qt/, guile-readline/, or libltdl/. (Thanks to Tim Mooney.)
* Don't use C operators == and != to compare SCM values.Dirk Herrmann2000-03-291-1/+1
|
* * *.[hc]: add Emacs magic at the end of file, to ensure GNUMichael Livshin2000-03-191-0/+6
| | | | indentation style.
* * error.h, error.c: Added `scm_wrong_type_arg_msg' to supportGreg J. Badros2000-03-031-1/+1
| | | | | | | | | | | | | | | | displaying the expected type. Use SCM_LISTn in a couple places instead of scm_cons-ing by hand. * __scm.h: Added SCM_ASSERT_TYPE macro. * validate.h, scm_validate.h: Added the former, as a renamed version of the latter with SCM_ASSERT_TYPE used in SCM_MAKE_VALIDATE (instead of just SCM_ASSERT) * Makefile.am: Rename scm_validate.h to validate.h. * *.c, *.h: Include validate.h, not scm_validate.h (old name's prefix was superfluous).
* * sort.c: typo in comment fixed.Greg J. Badros2000-01-261-3/+3
| | | | | | | | | | | | * keywords.c: Added documentation. * guardians.c: Added documentation (could be better). * gc.c: Added docs for gc-set-debug-check-freelist. * eq.c: Added docs for eq?, eqv? equal? abridged from R4RS. * boolean.c: Added docs for `not', `boolean?' (by hand).
* * *.[ch]: Whitespace changes -- added space after SCM_VALIDATE_*Greg J. Badros2000-01-051-2/+2
| | | | macros and SCM_DEFINE macros to match GNU coding standards.
* *.[ch]: Replace GUILE_PROC w/ SCM_DEFINE.Greg J. Badros2000-01-051-2/+2
|
* Remove leading whitespace before empty docstrings.Greg J. Badros1999-12-131-1/+1
|
* * *.c, srcprop.h: Use SCM_BOOL(f) instead of (f? SCM_BOOL_T:Greg J. Badros1999-12-121-1/+1
| | | | | SCM_BOOL_F) and use SCM_NEGATE_BOOL(f) instead of (f? SCM_BOOL_F: SCM_BOOL_T).
* * *.c: Pervasive software-engineering-motivated rewrite ofGreg J. Badros1999-12-121-14/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | function headers and argument checking. Switched SCM_PROC, SCM_PROC1 macros to be GUILE_PROC, GUILE_PROC1 (may change names later, but was useful to keep old versions around while migrate) that has docstrings and argument lists embedded in the GUILE_PROC macro invocations that expand into a function header. Use lots of new SCM_VALIDATE_* macros to simplify error checking and reduce tons of redundancy. This is very similar to what I did for Scwm. Note that none of the extraction of the docstrings, nor software engineering checks of Scwm is yet added to Guile. I'll work on that tomorrow, I expect. * Makefile.am: Added scm_validate.h to modinclude_HEADERS. * chars.c: Added docstrings for the primitives defined in here. * snarf.h: Added GUILE_PROC, GUILE_PROC1. Added SCM_REGISTER_PROC to be like old SCM_PROC, though old SCM_PROC still remains for now. Changed naming convention for the s_foo string name of the primitive to be s_scm_foo for ease of use with the macro. * scm_validate.h: Lots of new SCM_VALIDATE macros to simplify argument checking through guile. Maybe some of these should be folded into the header file for the types they check, but for now it was easiest to just stick them all in one place.
* * Lots of files: New address for FSF.Jim Blandy1997-05-261-3/+3
|
* * __scm.h, alist.c, alist.h, append.c, append.h, appinit.c,Jim Blandy1996-10-141-15/+3
| | | | | | | | | | | | | | | | | | | | | | | | arbiters.c, arbiters.h, async.c, async.h, boolean.c, boolean.h, chars.c, chars.h, continuations.c, continuations.h, debug.c, debug.h, dynwind.c, dynwind.h, eq.c, eq.h, error.c, eval.c, eval.h, extchrs.c, extchrs.h, fdsocket.c, fdsocket.h, filesys.c, filesys.h, fports.c, fports.h, gc.c, gdb_interface.h, gdbint.c, gdbint.h, genio.c, genio.h, gscm.c, gscm.h, gsubr.c, gsubr.h, hash.c, hash.h, hashtab.c, hashtab.h, init.c, ioext.c, ioext.h, kw.c, kw.h, libguile.h, mallocs.c, mallocs.h, markers.c, markers.h, mbstrings.c, mbstrings.h, numbers.c, numbers.h, objprop.c, objprop.h, options.c, options.h, pairs.c, pairs.h, ports.c, ports.h, posix.c, posix.h, print.c, print.h, procprop.c, procprop.h, procs.c, procs.h, ramap.c, ramap.h, read.c, read.h, root.c, scmsigs.c, scmsigs.h, sequences.c, sequences.h, simpos.c, simpos.h, smob.c, socket.c, socket.h, srcprop.c, srcprop.h, stackchk.c, stackchk.h, stime.c, stime.h, strings.c, strings.h, strop.c, strop.h, strorder.c, strorder.h, strports.c, strports.h, struct.c, struct.h, symbols.c, symbols.h, tag.c, tag.h, unif.c, unif.h, variable.c, variable.h, vectors.c, vectors.h, version.c, version.h, vports.c, vports.h, weaks.c, weaks.h: Use SCM_P to declare functions with prototypes. (Patch thanks to Marius Vollmer.)
* C files should #include only the header files they need, notJim Blandy1996-09-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libguile.h (which #includes all the header files); the pointless recompilation was wasting my time. * Makefile.in (all .o dependency lists): Regenerated. * libguile.h: Don't try to get a definition for size_t here... * __scm.h: Do it here. * _scm.h: Since this is the internal libguile header, put things here that all (or a majority) of the libguile files will want. Don't #include <libguile.h> here; that generates dependencies on way too much. Instead, get "__scm.h", "error.h", "pairs.h", "list.h", "gc.h", "gsubr.h", "procs.h", "numbers.h", "symbols.h", "boolean.h", "strings.h", "vectors.h", "root.h", "ports.h", and "async.h". * alist.c: Get "eq.h", "list.h", "alist.h". * append.c: Get "append.h", "list.h". * arbiters.c: Get "arbiters.h", "smob.h". * async.c: Get "async.h", "smob.h", "throw.h", "eval.h". * boolean.c: Get "boolean.h". * chars.c: Get "chars.h". * continuations.c: Get "continuations.h", "dynwind.h", "debug.h", "stackchk.h". * debug.c: Get "debug.h", "feature.h", "read.h", "strports.h", "continuations.h", "alist.h", "srcprop.h", "procprop.h", "smob.h", "genio.h", "throw.h", "eval.h". * dynwind.c: Get "dynwind.h", "alist.h", "eval.h". * eq.c: Get "eq.h", "unif.h", "smob.h", "strorder.h", "stackchk.h". * error.c: Get "error.h", "throw.h", "genio.h", "pairs.h". * eval.c: Get "eval.h", "stackchk.h", "srcprop.h", "debug.h", "hashtab.h", "procprop.h", "markers.h", "smob.h", "throw.h", "continuations.h", "eq.h", "sequences.h", "alist.h", "append.h", "debug.h". * fdsocket.c: Get "fdsocket.h", "unif.h", "filesys.h". * feature.c: Get "feature.h". * files.c: Get "files.h". * filesys.c: Get "filesys.h", "smob.h", "genio.h". * fports.c: Get "fports.h", "markers.h". * gc.c: Get "async.h", "unif.h", "smob.h", "weaks.h", "genio.h", "struct.h", "stackchk.h", "stime.h". * gdbint.c: Get "gdbint.h", "chars.h", "eval.h", "print.h", "read.h", "strports.h", "tag.h". * genio.c: Get "genio.h", "chars.h". * gsubr.c: Get "gsubr.h", "genio.h". * hash.c: Get "hash.h", "chars.h". * hashtab.c: Get "hashtab.h", "eval.h", "hash.h", "alist.h". * init.c: Get everyone who has an scm_init_mumble function: "weaks.h", "vports.h", "version.h", "vectors.h", "variable.h", "unif.h", "throw.h", "tag.h", "symbols.h", "struct.h", "strports.h", "strorder.h", "strop.h", "strings.h", "stime.h", "stackchk.h", "srcprop.h", "socket.h", "simpos.h", "sequences.h", "scmsigs.h", "read.h", "ramap.h", "procs.h", "procprop.h", "print.h", "posix.h", "ports.h", "pairs.h", "options.h", "objprop.h", "numbers.h", "mbstrings.h", "mallocs.h", "load.h", "list.h", "kw.h", "ioext.h", "hashtab.h", "hash.h", "gsubr.h", "gdbint.h", "gc.h", "fports.h", "filesys.h", "files.h", "feature.h", "fdsocket.h", "eval.h", "error.h", "eq.h", "dynwind.h", "debug.h", "continuations.h", "chars.h", "boolean.h", "async.h", "arbiters.h", "append.h", "alist.h". * ioext.c: Get "ioext.h", "fports.h". * kw.c: Get "kw.h", "smob.h", "mbstrings.h", "genio.h". * list.c: Get "list.h", "eq.h". * load.c: Get "load.h", "eval.h", "read.h", "fports.h". * mallocs.c: Get "smob.h", "genio.h". * markers.c: Get "markers.h". * mbstrings.c: Get "mbstrings.h", "read.h", "genio.h", "unif.h", "chars.h". * numbers.c: Get "unif.h", "genio.h". * objprop.c: Get "objprop.h", "weaks.h", "alist.h", "hashtab.h". * options.c: Get "options.h". * ports.c: Get "ports.h", "vports.h", "strports.h", "fports.h", "markers.h", "chars.h", "genio.h". * posix.c: Get "posix.h", "sequences.h", "feature.h", "unif.h", "read.h", "scmsigs.h", "genio.h", "fports.h". * print.c: Get "print.h", "unif.h", "weaks.h", "read.h", "procprop.h", "eval.h", "smob.h", "mbstrings.h", "genio.h", "chars.h". * procprop.c: Get "procprop.h", "eval.h", "alist.h". * procs.c: Get "procs.h". * ramap.c: Get "ramap.h", "feature.h", "eval.h", "eq.h", "chars.h", "smob.h", "unif.h". * read.c: Get "alist.h", "kw.h", "mbstrings.h", "unif.h", "eval.h", "genio.h", "chars.h". * root.c: Get "root.h", "stackchk.h". * scmsigs.c: Get "scmsigs.h". * sequences.c: Get "sequences.h". * simpos.c: Get "simpos.h", "scmsigs.h". * smob.c: Get "smob.h". * socket.c: Get "socket.h", "feature.h". * srcprop.c: Get "srcprop.h", "weaks.h", "hashtab.h", "debug.h", "alist.h", "smob.h". * stackchk.c: Get "stackchk.h", "genio.h". * stime.c: Get "stime.h"."libguile/continuations.h". * strings.c: Get "strings.h", "chars.h". * strop.c: Get "strop.h", "chars.h". * strorder.c: Get "strorder.h", "chars.h". * strports.c: Get "strports.h", "print.h", "eval.h", "unif.h". * struct.c: Get "struct.h", "chars.h". * symbols.c: Get "symbols.h", "mbstrings.h", "alist.h", "variable.h", "eval.h", "chars.h". * tag.c: Get "tag.h", "struct.h", "chars.h". * throw.c: Get "throw.h", "continuations.h", "debug.h", "dynwind.h", "eval.h", "alist.h", "smob.h", "genio.h". * unif.c: Get "unif.h", "feature.h", "strop.h", "sequences.h", "smob.h", "genio.h", "eval.h", "chars.h". * variable.c: Get "variable.h", "smob.h", "genio.h". * vectors.c: Get "vectors.h", "eq.h". * version.c: Get "version.h". * vports.c: Get "vports.h", "fports.h", "chars.h", "eval.h". * weaks.c: Get "weaks.h".
* maintainer changed: was lord, now jimb; first importjimbJim Blandy1996-07-251-0/+88