1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-29 19:30:36 +02:00
Commit graph

61 commits

Author SHA1 Message Date
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
97cc65fee4 Rename __scm.h to scm.h
* libguile/scm.h: Rename.  Update all includers.
2018-06-20 16:33:33 +02:00
Andy Wingo
d9eafa374c Inline tags.h into __scm.h
* 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.
2018-06-20 16:10:54 +02:00
Andy Wingo
c495b44714 Remove Emacs local variables comments in Guile source
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.
2018-06-20 14:32:28 +02:00
Andy Wingo
5534c2817e Remove useless "classes: h_files" from Guile headers.
* libguile/__scm.h:
* libguile/alist.h:
* libguile/array-handle.h:
* libguile/array-map.h:
* libguile/arrays.h:
* libguile/async.h:
* libguile/backtrace.h:
* libguile/bitvectors.h:
* libguile/boolean.h:
* libguile/chars.h:
* libguile/chooks.h:
* libguile/continuations.h:
* libguile/debug-malloc.h:
* libguile/debug.h:
* libguile/deprecation.h:
* libguile/dynl.h:
* libguile/dynstack.h:
* libguile/dynwind.h:
* libguile/eq.h:
* libguile/error.h:
* libguile/eval.h:
* libguile/evalext.h:
* libguile/expand.h:
* libguile/extensions.h:
* libguile/feature.h:
* libguile/filesys.h:
* libguile/fluids.h:
* libguile/fports.h:
* libguile/gc-inline.h:
* libguile/gc.h:
* libguile/generalized-arrays.h:
* libguile/generalized-vectors.h:
* libguile/gettext.h:
* libguile/goops.h:
* libguile/gsubr.h:
* libguile/guardians.h:
* libguile/hash.h:
* libguile/hashtab.h:
* libguile/hooks.h:
* libguile/i18n.h:
* libguile/init.h:
* libguile/inline.h:
* libguile/ioext.h:
* libguile/iselect.h:
* libguile/keywords.h:
* libguile/list.h:
* libguile/load.h:
* libguile/macros.h:
* libguile/mallocs.c:
* libguile/mallocs.h:
* libguile/memoize.h:
* libguile/modules.h:
* libguile/net_db.h:
* libguile/null-threads.h:
* libguile/numbers.h:
* libguile/objprop.h:
* libguile/options.h:
* libguile/pairs.h:
* libguile/poll.h:
* libguile/ports.h:
* libguile/posix-w32.h:
* libguile/posix.h:
* libguile/print.h:
* libguile/procprop.h:
* libguile/procs.h:
* libguile/promises.h:
* libguile/pthread-threads.h:
* libguile/random.h:
* libguile/rdelim.h:
* libguile/read.h:
* libguile/regex-posix.h:
* libguile/rw.h:
* libguile/scmsigs.h:
* libguile/script.h:
* libguile/simpos.h:
* libguile/smob.h:
* libguile/snarf.h:
* libguile/socket.h:
* libguile/sort.h:
* libguile/srcprop.h:
* libguile/stackchk.h:
* libguile/stacks.h:
* libguile/stime.h:
* libguile/strings.h:
* libguile/strorder.h:
* libguile/strports.h:
* libguile/struct.h:
* libguile/symbols.h:
* libguile/syscalls.h:
* libguile/tags.h:
* libguile/threads.h:
* libguile/throw.h:
* libguile/trees.h:
* libguile/unicode.h:
* libguile/uniform.h:
* libguile/values.h:
* libguile/variable.h:
* libguile/vectors.h:
* libguile/vports.h:
* libguile/weak-list.h:
* libguile/weak-set.h:
* libguile/weak-table.h:
* libguile/weak-vector.h: Remove "classes: h_files".  Reformat
  copyrights if needed.
2018-06-20 14:26:16 +02:00
Andy Wingo
d340a9709c Shuffle around inline C function implementation
* libguile/__scm.h:
* libguile/inline.h (SCM_C_EXTERN_INLINE, SCM_CAN_INLINE, SCM_INLINE)
  (SCM_INLINE_IMPLEMENTATION): Move definitions here, from __scm.h.
* libguile/strings.h (scm_is_string): Move implementation here, from
  inline.h.
* libguile/inline.c: Add strings.h include.
* libguile/_scm.h: Remove inline.h include.
* libguile/array-handle.h:
* libguile/gc.h:
* libguile/pairs.h:
* libguile/smob.h: Add inline.h includes.
2018-06-20 11:17:13 +02:00
Andy Wingo
be18b50773 Move pair, null, nil, and boolean validators out of validate.h
* libguile/validate.h:
* libguile/boolean.h (SCM_VALIDATE_BOOL, SCM_VALIDATE_BOOL_COPY):
* libguile/pairs.h (SCM_VALIDATE_NULL, SCM_VALIDATE_NULL_OR_NIL):
  (SCM_VALIDATE_CONS, SCM_VALIDATE_MUTABLE_PAIR)
  (SCM_VALIDATE_NULLORCONS): Move these macros.
2018-06-17 22:49:59 +02:00
Andy Wingo
03c6485eea Remove error.h include from _scm.h.
* libguile/pairs.h: Add missing error.h include.
* libguile/_scm.h: Remove error.h include.
2018-06-17 22:07:03 +02:00
Andy Wingo
40df57a8a2 Restore libgc 7.2 compatibility
* configure.ac: Check for GC_is_heap_ptr, added after libgc 7.2.
* libguile/pairs.h (GC_is_heap_ptr): Define a shim for GC_is_heap_ptr,
  inside BUILDING_LIBGUILE so as not to expose it to users.
2017-04-20 10:40:07 +02:00
Andy Wingo
6e573a0885 Attempt to mutate residualized literal pair throws exception
* libguile/validate.h (SCM_VALIDATE_MUTABLE_PAIR):
* libguile/pairs.h (scm_is_mutable_pair): New internal definitions.
* libguile/pairs.c (scm_set_car_x, scm_set_cdr_x): Validate mutable
  pairs.
* libguile/alist.c (scm_assq_set_x, scm_assv_set_x, scm_assoc_set_x):
* libguile/list.c (scm_reverse_x, scm_list_set_x, scm_list_cdr_set_x):
* libguile/srcprop.c (scm_make_srcprops):
* libguile/srfi-1.c (scm_srfi1_append_reverse_x)
  (scm_srfi1_delete_duplicates_x):
* libguile/symbols.c (scm_symbol_fset_x, scm_symbol_pset_x):
* libguile/sort.c (scm_merge_list_x): Use scm_set_car_x / scm_set_cdr_x
  instead of the macros, so as to check for mutable pairs.
  (SCM_VALIDATE_MUTABLE_LIST): New internal helper macro.
  (scm_sort_x, scm_stable_sort_x, scm_sort_list_x): Use
  SCM_VALIDATE_MUTABLE_LIST.
* libguile/vm-engine.c (VM_VALIDATE_MUTABLE_PAIR): New definition.
  (set-car!, set-cdr!): Use VM_VALIDATE_MUTABLE_PAIR.  Fix error message
  for set-cdr!.
2017-04-18 21:27:45 +02:00
Andy Wingo
730af462c3 inline scm_cons, scm_car, scm_cdr
* libguile/pairs.h (scm_cons, scm_car, scm_cdr): Define these as inline
  functions.
  (scm_is_pair): Move here from inline.h.
* libguile/pairs.c: Remove definitions here, and define gsubrs.

* libguile/inline.h: Remove scm_is_pair implementation.
* libguile/inline.c: Include pairs.h to residualize inlines from
  pairs.h.
2012-05-17 11:25:58 +02:00
Andy Wingo
8a4ed2dd34 remove "discouraged" infrastructure
* libguile/discouraged.h: Remove.

* libguile/deprecated.c (scm_internal_select, scm_thread_sleep)
  (scm_thread_usleep): Deprecate formerly discouraged names.

* libguile/eq.h (SCM_EQ_P):
* libguile/pairs.h (SCM_NULLP, SCM_NNULLP, SCM_CONSP, SCM_NCONSP):
* libguile/boolean.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_BOOL):
  (SCM_NEGATE_BOOL, SCM_BOOL_NOT): Undiscourage these names, because I'm
  not sure deprecating them will do any good.

* libguile.h:
* libguile/gen-scmconfig.c:
* libguile/numbers.c:
* libguile/init.c:
* libguile/Makefile.am:
* configure.ac: Remove bits that referenced discouraged.h, and dealt
  with the "discouraging" system.
2010-08-08 14:15:47 +02:00
Andy Wingo
92a61010bd change remaining %nil -> #nil
* doc/ref/vm.texi:
* libguile/boolean.h:
* libguile/pairs.h:
* module/language/elisp/README:
* test-suite/tests/elisp-compiler.test:
* test-suite/tests/load.test: Change remaining mentions of %nil to #nil.
2010-04-09 21:06:29 +02:00
Andy Wingo
cd038da546 remove libguile/lang.h, deprecate %nil (in favor of #nil)
* 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.
2010-04-09 14:26:31 +02:00
Andy Wingo
c1b7c940ec lisp nil always enabled
* configure.ac: Remove --disable-elisp option. Lisp nil is always
  enabled.

* libguile/boolean.h:
* libguile/gen-scmconfig.c:
* libguile/gen-scmconfig.h.in:
* libguile/init.c:
* libguile/lang.c:
* libguile/lang.h:
* libguile/pairs.h:
* libguile/private-options.h:
* libguile/read.c: Remove conditionals for disabling elisp.
2010-04-09 14:03:02 +02:00
Andy Wingo
2533f10b40 nil is null, whee
* libguile/pairs.h (scm_is_null): Nil is also null.

* libguile/vm-i-scheme.c (not, not-not, null?, not-null?):
* libguile/vm-i-system.c (br-if-null, br-if-not-null): Remove some more
  nil special cases.
2010-03-30 10:31:27 +02:00
Andy Wingo
f36878ba2d remove cxrs
* libguile/pairs.h:
* libguile/pairs.c: Previously scm_cdadr et al were implemented as
  #defines that called scm_i_chase_pairs, and the Scheme-exposed
  functions themselves were cxr subrs, which got special help in the
  interpreter. Since now the special help is unnecessary (because the
  compiler inlines and expands calls to car, cdadr, etc), the complexity
  is a loss. So just implement cdadr etc using normal functions. There's
  an advantage too, in that the compiler can unroll the cxring, reducing
  branches.

* libguile/tags.h (scm_tc7_cxr): Remove this tag.
  (scm_tcs_subrs): Now there's only one kind of subr, yay!

* libguile/debug.c (scm_procedure_name)
* libguile/evalext.c (scm_self_evaluating_p)
* libguile/gc.c (scm_i_tag_name)
* libguile/goops.c (scm_class_of)
* libguile/hash.c (scm_hasher)
* libguile/print.c (iprin1)
* libguile/procprop.c (scm_i_procedure_arity)
* libguile/procs.c (scm_procedure_p, scm_subr_p)
  (scm_make_procedure_with_setter)
* libguile/vm.c (apply_foreign): Remove cxr cases. Replace uses of
  scm_tcs_subrs with scm_tc7_gsubr.
2009-12-04 16:39:34 +01:00
Mark H Weaver
45f4cbdf12 the cube of lisp booleans (#f nil () #t)
* 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.
2009-10-27 23:25:02 +01: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
102dbb6f6c Add `SCM_INTERNAL' macro, use it. 2008-05-31 23:21:02 +02:00
Ludovic Courtès
3f52096714 Fix "mixed linkage" errors in `inline.h'. 2008-03-02 17:03:42 +00:00
Kevin Ryde
2b829bbb3d merge from 1.8 branch 2006-04-17 00:05:42 +00:00
Marius Vollmer
92205699d0 The FSF has a new address. 2005-05-23 19:57:22 +00:00
Marius Vollmer
6fcc7d48e4 * discouraged.h, tags.h (SCM_CONSP, SCM_NCONSP): Moved to
discouraged.h.  Replaced all uses with scm_is_pair.
(SCM_I_CONSP): New name for SCM_CONSP.

* pairs.h, pairs.c (scm_is_pair, scm_is_null, scm_car, scm_cdr,
scm_i_chase_pairs, SCM_I_A_PAT, SCM_I_D_PAT, etc, scm_caar,
scm_cadr, etc): New.
(SCM_NULLP, SCM_NNULLP): Moved to discouraged.h.  Replaced all
uses with scm_is_null.
2004-09-22 17:37:01 +00:00
Marius Vollmer
ddda5e8fa7 (scm_car, scm_cdr, scm_i_chase_pairs, SCM_I_A_PAT, SCM_I_D_PAT, etc,
scm_caar, scm_cadr, etc): New.
2004-09-22 15:21:00 +00:00
Marius Vollmer
bc36d0502b * tags.h, deprecated.h (SCM_EQ_P): Deprecated by moving it into
deprecated.h.  Replaced all uses with scm_is_eq.
2004-07-27 15:41:49 +00:00
Dirk Herrmann
c178c3a68b * sort.c, pairs.h: Removed unnecessary includes. 2003-04-23 16:49:30 +00:00
Marius Vollmer
73be1d9e8e Changed license terms to the plain LGPL thru-out. 2003-04-05 19:15:35 +00:00
Marius Vollmer
33b001fd89 Prefixed each each exported symbol with SCM_API. 2001-11-02 00:19:12 +00:00
Dirk Herrmann
0527e68763 * Renamed header macros to the SCM_<filename>_H format. 2001-08-31 10:42:19 +00:00
Dirk Herrmann
6cf695375f * Use SCM_CONSP, not SCM_ECONSP. 2001-07-30 18:25:14 +00:00
Thien-Thi Nguyen
a06e3a75b2 Remove "face-lift" comment. 2001-07-09 07:36:48 +00:00
Dirk Herrmann
5843e5c988 * Various minor improvements, for example signedness fixes. 2001-06-23 15:25:57 +00:00
Dirk Herrmann
e81d98ec2d * Introduce SCM_UNUSED and mark unused function parameters.
* Introduce SCM_DEBUG_PAIR_ACCESSES.
* Extend the possibilities of SCM_DEBUG_CELL_ACCESSES.
2001-06-07 21:12:19 +00:00
Dirk Herrmann
dd039d6dc6 * New macro SCM_TRUE_P.
* Use SCM_EQ_P to compare SCM values.
2000-03-29 01:15:56 +00:00
Dirk Herrmann
76a369d95d * SCM_C[AD]R and SCM_SETC[AD]R use SCM_{SET_}?OBJECT now.
* Moved SCM_GCCDR from pairs.h to tags.h.
2000-03-27 12:42:16 +00:00
Dirk Herrmann
2549a7096d Moved some cell related definitions from tags.h and pairs.h to gc.h. 2000-03-26 10:08:52 +00:00
Dirk Herrmann
0cbaaf0b15 Added a set of low level macros for accessing cell entries. 2000-03-24 08:55:14 +00:00
Michael Livshin
89e00824a0 * *.[hc]: add Emacs magic at the end of file, to ensure GNU
indentation style.
2000-03-19 19:01:16 +00:00
Mikael Djurfeldt
4a4c9785e0 * gc.c, gc.h, pairs.h, init.c: Implementation of a new way of
allocating heap.  The basic idea is to trigger GC every Nth
allocated cell and grow heap when free list runs out.  The scheme
has been extended so that GC isn't triggered until all remaining
cells are used.  The implementation is also prepared for
development in the direction of POSIX threads.

* gc.c (SCM_EXPHEAP): In order to grow by a factor of 1.5,
SCM_EXPHEAP should return half of the heap size.
2000-03-15 07:30:53 +00:00
Mikael Djurfeldt
1201a982fa * pairs.h (SCM_NEWCELL, SCM_NEWCELL2): Use new style freelists. 2000-03-14 09:03:32 +00:00
Mikael Djurfeldt
742dd4b21b * pairs.h (SCM_NEWCELL2): double-cell variants of SCM_NEWCELL.
(SCM_CELL_WORD, SCM_CELL_WORDLOC, SCM_SET_CELL_WORD): primitive
multi-cell access macros (used by the ones below).
(SCM_CELL_WORD[0-3], SCM_SET_CELL_WORD[0-3]): multi-cell access
macros.
2000-03-14 06:41:42 +00:00
Mikael Djurfeldt
f12677062e *** empty log message *** 2000-03-12 18:30:33 +00:00
Mikael Djurfeldt
413cb56ff4 * async.c, boolean.h, debug.c, dynl.c, dynwind.c, eval.c, eval.h,
feature.h, filesys.h, fluids.h, fports.c, fports.h, gc.c, gc.h,
  hash.c, keywords.h, macros.c, numbers.c, numbers.h, objects.c,
  objects.h, options.c, pairs.h, ports.c, ports.h, print.c,
  procs.h, ramap.c, read.c, smob.c, smob.h, srcprop.h, stacks.c,
  stacks.h, strports.c, struct.c, struct.h, tag.c, tags.h,
  throw.c, unif.c, unif.h, variable.h, vectors.h, weaks.c,
  weaks.h (SCM_SCM, SCM_BITS, SCM_CARBITS): Renamed from
  SCM_ASSCM, SCM_ASWORD, SCM_CARW).
2000-03-12 17:00:58 +00:00
Mikael Djurfeldt
293bb454ed * pairs.h (SCM_SETAND_CAR, SCM_SETAND_CDR, SCM_SETOR_CAR,
SCM_SETOR_CDR): Corrected SCM_ASSCM/WORD fixes.
2000-03-11 23:38:33 +00:00
Greg J. Badros
c209c88e54 *.[ch]: make a distinction between SCM as a generic
name for a Scheme object (now a void*), and SCM as 32 bit word for
storing tags and immediates (now a long int).  Introduced
SCM_ASWORD and SCM_ASSCM for conversion. Fixed various dubious
code in the process: arbiter.c (use macros), unif.c (scm_array_p),
2000-03-09 18:58:58 +00:00
Greg J. Badros
7866a09b5b * list.c: Moved append docs to append! Thanks Dirk Hermann. Also,
added append docs from R4RS.

* strings.c: Docstring typo fix, + eliminate unneeded IMP tests.
Thanks Dirk Hermann!

* chars.h: Provide SCM_CHARP, SCM_CHAR, SCM_MAKE_CHAR and
deprecate SCM_ICHRP, SCM_ICHR, SCM_MAKICHR.  Thanks Dirk Hermann!

* *.h, *.c: Use SCM_CHARP, SCM_CHAR, SCM_MAKE_CHAR throughout.
Drop use of SCM_P for function prototypes... assume an ANSI C
compiler.  Thanks Dirk Hermann!
2000-03-02 20:54:43 +00:00
Greg J. Badros
d9de38819e * gc.c (scm_debug_newcell): Added SCM_SETCAR of the newly
allocated cell.

* pairs.h: Added a comment about the need for the SCM_SETCAR in
SCM_NEWCELL macro.
2000-01-03 16:31:45 +00:00
Greg J. Badros
1bbd0b849f * *.c: Pervasive software-engineering-motivated rewrite of
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.
1999-12-12 02:36:16 +00:00