bpt/guile.git
13 years agoCreate tags for Scheme source
Neil Jerram [Sat, 11 Sep 2010 17:39:00 +0000 (18:39 +0100)]
Create tags for Scheme source

* am/guilec: Set ETAGS_ARGS.

* module/Makefile.am: When adding sources to EXTRA_DIST, add them to
  ETAGS_ARGS too.

13 years agoProvide non-locale C/Scheme string conversion functions
Michael Gran [Sun, 12 Sep 2010 15:29:31 +0000 (08:29 -0700)]
Provide non-locale C/Scheme string conversion functions

* doc/ref/api-data.texi: document scm_to_stringn, scm_from_stringn,
  scm_to_latin1_stringn, and scm_from_latin1_stringn
* libguile/strings.h (scm_to_stringn): make public
  (scm_to_latin1_stringn): new declaration
  (scm_from_latin1_stringn): new declaration
* libguile/strings.c (scm_to_latin1_stringn): new function
  (scm_from_latin1_stringn): new function

13 years agoDocument scm_wrong_type_arg_msg
Neil Jerram [Sat, 11 Sep 2010 17:37:02 +0000 (18:37 +0100)]
Document scm_wrong_type_arg_msg

* doc/ref/api-control.texi: New def for scm_wrong_type_arg_msg.

13 years agoRemove non-existent *environment* APIs from api-undocumented.texi
Neil Jerram [Sat, 11 Sep 2010 15:34:19 +0000 (16:34 +0100)]
Remove non-existent *environment* APIs from api-undocumented.texi

* doc/ref/api-undocumented.texi: Remove entries for the never used,
  and now removed, environment API.

13 years agoRemove unnecessary blank "Indices" page.
Neil Jerram [Sat, 11 Sep 2010 14:45:05 +0000 (15:45 +0100)]
Remove unnecessary blank "Indices" page.

* doc/ref/guile.texi: Remove `Indices' heading.

13 years agonew procedure: source-procedures
Andy Wingo [Fri, 10 Sep 2010 11:29:56 +0000 (13:29 +0200)]
new procedure: source-procedures

* module/system/xref.scm (source-procedures): New public procedure,
  gives the procedures defined at a given source location.

13 years ago(system xref) uses module-submodules
Andy Wingo [Fri, 10 Sep 2010 10:55:09 +0000 (12:55 +0200)]
(system xref) uses module-submodules

* module/system/xref.scm (ensure-callers-db): Fix up to use
  module-submodules.

13 years agoregenerate psyntax-pp.scm
Andy Wingo [Fri, 10 Sep 2010 09:03:59 +0000 (11:03 +0200)]
regenerate psyntax-pp.scm

* module/ice-9/psyntax-pp.scm: Regenerate.

13 years agosimplify module/Makefile.am rules to not require touch
Andy Wingo [Fri, 10 Sep 2010 09:01:23 +0000 (11:01 +0200)]
simplify module/Makefile.am rules to not require touch

* module/Makefile.am (ice-9/psyntax-pp.go, ice-9/psyntax-pp.scm.gen)
  (ice-9/eval.go): Simplify rules to not require `touch', now that .go
  files are checked for freshness, not for synchronicity.

13 years agoClarify feature macro conditionals.
Ludovic Courtès [Tue, 7 Sep 2010 22:38:49 +0000 (00:38 +0200)]
Clarify feature macro conditionals.

* libguile/numbers.c (scm_log10): Check whether `HAVE_COMPLEX_DOUBLE'
  and `HAVE_CLOG10' are defined instead of checking whether they are
  non-zero.
  (scm_sqrt): Likewise for `HAVE_COMPLEX_DOUBLE' and
  `HAVE_USABLE_CSQRT'.

13 years agoUse Gnulib's `isnan' and `isinf' modules.
Ludovic Courtès [Tue, 7 Sep 2010 22:34:27 +0000 (00:34 +0200)]
Use Gnulib's `isnan' and `isinf' modules.

This updates Gnulib to v0.0-4219-g84cdd8b.

* m4/gnulib-cache.m4: Add `isinf' and `isnan'.

* configure.ac: Remove checks for `floatingpoint.h', `ieeefp.h', and
  `nan.h'.

* libguile/gen-scmconfig.c (main): Remove definitions of
  `SCM_HAVE_FLOATINGPOINT_H', `SCM_HAVE_IEEEFP_H', and
  `SCM_HAVE_NAN_H'.

* libguile/numbers.c (isnan)[SCO && !HAVE_ISNAN]: Remove.
  (isinf)[SCO && !HAVE_ISINF]: Remove.
  (xisinf, xisnan): Remove.  Change callers to use `isinf' and `isnan'.
  (guile_ieee_init): Remove the `defined HAVE_ISINF' and `define
  HAVE_ISNAN' conditions.

* libguile/numbers.h: Remove code conditional on
  `SCM_HAVE_FLOATINGPOINT_H', `SCM_HAVE_IEEEFP_H', or `SCM_HAVE_NAN_H'.

13 years agoUse `have-lib' when checking for libltdl.
Ludovic Courtès [Mon, 6 Sep 2010 20:49:24 +0000 (22:49 +0200)]
Use `have-lib' when checking for libltdl.

Suggested by primus <rprimus@gmail.com>.

* configure.ac: Use `AC_LIB_HAVE_LINKFLAGS' when checking for libltdl.

* libguile/Makefile.am (libguile_@GUILE_EFFECTIVE_VERSION@_la_LIBADD):
  Add $(LTLIBLTDL).

* README: Update to make it clear that libgc and libffi don't have a
  `--with-XXX-prefix' option.

13 years agoRename `make-foreign-function' to `pointer->procedure'.
Ludovic Courtès [Mon, 6 Sep 2010 20:24:44 +0000 (22:24 +0200)]
Rename `make-foreign-function' to `pointer->procedure'.

* libguile/foreign.c (scm_make_foreign_function): Rename to...
  (scm_pointer_to_procedure): ... this.
* libguile/foreign.h: Adjust accordingly.
* module/system/foreign.scm: Likewise.
* test-suite/standalone/test-ffi: Likewise.
* test-suite/tests/foreign.test: Likewise.
* doc/ref/api-foreign.texi: Likewise.

13 years agofix to program-module
Andy Wingo [Mon, 6 Sep 2010 11:58:13 +0000 (13:58 +0200)]
fix to program-module

* libguile/programs.c (scm_program_module): Fix an edge case in which
  this function returned non-modules. Thanks to José Antonio Ortega
  Ruiz, Caballero del Cálculo Lambda for the report.

13 years agoAdd `.version' to the distribution.
Ludovic Courtès [Sat, 4 Sep 2010 18:37:34 +0000 (20:37 +0200)]
Add `.version' to the distribution.

* Makefile.am (EXTRA_DIST): Add `.version'.  Remove `m4/autobuild.m4'.

13 years agoBump version number for 1.9.12.
Ludovic Courtès [Sat, 4 Sep 2010 18:20:14 +0000 (20:20 +0200)]
Bump version number for 1.9.12.

* GUILE-VERSION (GUILE_MICRO_VERSION): Increment.

13 years agofix guile-tools --help and --version
Andy Wingo [Sat, 4 Sep 2010 18:00:33 +0000 (11:00 -0700)]
fix guile-tools --help and --version

* meta/guile-tools.in: Fix --help and --version.

13 years agoboot-9 refactor
Andy Wingo [Sat, 4 Sep 2010 17:24:52 +0000 (10:24 -0700)]
boot-9 refactor

* module/ice-9/boot-9.scm (make-root-module, make-scm-module): Remove
  these functions; they are only called once, so we inline them at their
  call sites.
  (the-root-module, the-scm-module): The aforementioned call sites.

13 years agoUpdate `NEWS' for 1.9.12.
Ludovic Courtès [Sat, 4 Sep 2010 14:56:15 +0000 (16:56 +0200)]
Update `NEWS' for 1.9.12.

* NEWS: Update.

13 years agoDon't say "source file is newer" when either file is inaccessible.
Ludovic Courtès [Sat, 4 Sep 2010 14:13:42 +0000 (16:13 +0200)]
Don't say "source file is newer" when either file is inaccessible.

* libguile/load.c (compiled_is_fresh): Don't emit "source file is newer"
  warning when either FULL_FILENAME or COMPILED_FILENAME could not be
  stat'd.  This is consistent with what load/compiled-file-name do.

13 years agoCompare source/compiled file timestamps with nano-second resolution.
Ludovic Courtès [Sat, 4 Sep 2010 14:07:58 +0000 (16:07 +0200)]
Compare source/compiled file timestamps with nano-second resolution.

* libguile/load.c (compiled_is_fresh): Rename `res' to
  `compiled_is_newer'.  Use `get_stat_mtime' to compare with nano-second
  resolution when available.

* module/ice-9/boot-9.scm (load)[fresh-compiled-file-name]: Likewise,
  using `stat:mtimensec'.

13 years agoUse Gnulib's `stat-time' module; update Gnulib.
Ludovic Courtès [Sat, 4 Sep 2010 13:16:35 +0000 (15:16 +0200)]
Use Gnulib's `stat-time' module; update Gnulib.

This updates Gnulib files to v0.0-4207-gc82b481.

* m4/gnulib-cache.m4: Add `stat-time'.

13 years agoAdd an entertaining `procedure->pointer' test.
Ludovic Courtès [Sat, 4 Sep 2010 12:38:20 +0000 (14:38 +0200)]
Add an entertaining `procedure->pointer' test.

* test-suite/tests/foreign.test ("procedure->pointer")["bijection"]: New
  test.

13 years agoFix the `put-bytevector' tests.
Ludovic Courtès [Fri, 3 Sep 2010 14:23:02 +0000 (16:23 +0200)]
Fix the `put-bytevector' tests.

* libguile/vports.c (sf_write): Add comment about what happens when DATA
  contains binary data.

* test-suite/tests/r6rs-ports.test ("7.2.11 Binary
  Output")["put-bytevector [2 args]", "put-bytevector [3 args]",
  "put-bytevector [4 args]"]: Require a Latin-1 locale.

13 years agoAdd license header to `test-ffi'.
Ludovic Courtès [Fri, 3 Sep 2010 13:32:31 +0000 (15:32 +0200)]
Add license header to `test-ffi'.

* test-suite/standalone/test-ffi: Add license header.

13 years agoAdd `procedure->pointer' to the FFI.
Ludovic Courtès [Fri, 3 Sep 2010 13:12:54 +0000 (15:12 +0200)]
Add `procedure->pointer' to the FFI.

* libguile/foreign.c (make_cif): New procedure, with code formerly in
  `scm_make_foreign_function'.
  (scm_make_foreign_function): Use it.
  (invoke_closure, scm_procedure_to_pointer)[FFI_CLOSURES]: New
  functions.

* libguile/foreign.h (scm_procedure_to_pointer): New declaration.

* module/system/foreign.scm: Export `procedure->pointer' when available.

* test-suite/standalone/test-ffi (f-callback-1, f-callback-2): New
  procedures and related tests.

* test-suite/standalone/test-ffi-lib.c (test_ffi_callback_1,
  test_ffi_callback_2): New functions.

* test-suite/tests/foreign.test ("procedure->pointer"): New test prefix.

* doc/ref/api-foreign.texi (Dynamic FFI): Document `procedure->pointer'.

13 years agoFix for `submodules' in (ice-9 session) (closes #30062)
Jose A. Ortega Ruiz [Tue, 31 Aug 2010 12:13:43 +0000 (14:13 +0200)]
Fix for `submodules' in (ice-9 session) (closes #30062)

* module/ice-9/session.scm (submodules): replace implementation to
  use `module-submodules' instead of `module-obarray' (the latter
  doesn't include submodules anymore).

* test-suite/tests/session.test: new test suite for session, checking
  the exported procedures that use `submodules'.

Signed-off-by: Jose A. Ortega Ruiz <jao@gnu.org>
13 years agomodule-ref-submodule deprecation fixes
Andy Wingo [Tue, 31 Aug 2010 16:22:59 +0000 (09:22 -0700)]
module-ref-submodule deprecation fixes

* module/ice-9/boot-9.scm (module-ref-submodule)
  (module-define-submodule!): Pull deprecated shims here, as we need
  them before loading (ice-9 deprecated). Also bugfix to only define the
  module if there is no local variable, even if it is unbound.

* module/ice-9/deprecated.scm: Remove from here.

13 years agoback-compat in (rnrs) for deprecated modules-in-value-namespace
Andy Wingo [Fri, 3 Sep 2010 04:29:26 +0000 (21:29 -0700)]
back-compat in (rnrs) for deprecated modules-in-value-namespace

* module/rnrs.scm (rnrs): Work around some unavoidable (I think)
  behavior when back-compatible unified namespaces are enabled; see
  comments in source.

13 years agomodule-local-variable optimization
Andy Wingo [Fri, 3 Sep 2010 03:48:08 +0000 (20:48 -0700)]
module-local-variable optimization

* libguile/modules.c (scm_module_local_variable): An optimization in the
  common no-module-binder case.

13 years agoFix memory leak in `lock-mutex' (aka. `scm_lock_mutex'.)
Ludovic Courtès [Thu, 2 Sep 2010 12:42:14 +0000 (14:42 +0200)]
Fix memory leak in `lock-mutex' (aka. `scm_lock_mutex'.)

The memory leak is trivially reproducible with:

  (define m (make-mutex))
  (let loop () (lock-mutex m) (unlock-mutex m) (loop))

or similarly with:

  (define p (delay (+ 1 2)))
  (let loop () (force p) (loop))

since `force' acquires P's mutex.

It could also lead to premature release of a thread waiting in
`fat_mutex_lock' when a former owner's `do_thread_exit' is run.

* libguile/threads.c (fat_mutex_unlock): When `m->level' becomes 0,
  remove MUTEX from `t->mutexes'.
  (fat_mutex_lock): Update comment above the `t->mutexes' assignment.
  (do_thread_exit): Add an assertion making sure that each mutex in
  `t->mutexes' is owned by T.

13 years agoAvoid calls to `scm_current_thread' in `fat_mutex_unlock'.
Ludovic Courtès [Thu, 2 Sep 2010 09:22:01 +0000 (11:22 +0200)]
Avoid calls to `scm_current_thread' in `fat_mutex_unlock'.

* libguile/threads.c (fat_mutex_unlock): Use `t->handle' instead of
  calling `scm_current_thread'.

13 years agoFix typos.
Ludovic Courtès [Wed, 1 Sep 2010 22:04:39 +0000 (00:04 +0200)]
Fix typos.

* module/system/repl/repl.scm (run-repl): Fix variable name: `k', not
  `key'.

* module/texinfo/docbook.scm: Use `(srfi srfi-1)' for `fold'.

13 years agoSRFI-1: Rewrite `drop-right!', `drop-while', `reduce', etc. in Scheme.
Ludovic Courtès [Wed, 1 Sep 2010 22:03:07 +0000 (00:03 +0200)]
SRFI-1: Rewrite `drop-right!', `drop-while', `reduce', etc. in Scheme.

This partially reverts commit e9508fbb7df0b1ead007637f16d80cf831776307
(May 3 2005).

* module/srfi/srfi-1.scm (take!, drop-right!, reduce, reduce-right,
  take-while, take-while!, drop-while, span, span!, lset-adjoin): New
  procedures.

* srfi/srfi-1.c (scm_srfi1_drop_right_x, scm_srfi1_drop_while,
  scm_srfi1_lset_adjoin, scm_srfi1_reduce, scm_srfi1_reduce_right,
  scm_srfi1_span, scm_srfi1_span_x, scm_srfi1_take_x,
  scm_srfi1_take_while, scm_srfi1_take_while_x): Rewrite as
  proxies to the corresponding Scheme procedures.

* benchmark-suite/benchmarks/srfi-1.bm ("drop-while"): New benchmark
  prefix.

13 years agoRewrite `fport_flush' using Gnulib's `full_write'.
Ludovic Courtès [Wed, 1 Sep 2010 13:04:59 +0000 (15:04 +0200)]
Rewrite `fport_flush' using Gnulib's `full_write'.

* libguile/fports.c (fport_flush): Rewrite using `full_write'.

13 years agopopen.test: Don't auto-compile `popen-child.scm'.
Ludovic Courtès [Wed, 1 Sep 2010 13:03:24 +0000 (15:03 +0200)]
popen.test: Don't auto-compile `popen-child.scm'.

* test-suite/tests/popen.test ("open-output-pipe")["no duplicate"]:
  Disable auto-compilation of `popen-child.scm'.

13 years agoAdd `test-suite/tests/popen-child.scm' to the distribution.
Ludovic Courtès [Wed, 1 Sep 2010 12:52:36 +0000 (14:52 +0200)]
Add `test-suite/tests/popen-child.scm' to the distribution.

* test-suite/Makefile.am (SCM_TESTS): Add `tests/popen-child.scm'.

13 years agoAdd new debug meta-command ,error-message
Jose A. Ortega Ruiz [Mon, 30 Aug 2010 04:37:24 +0000 (06:37 +0200)]
Add new debug meta-command ,error-message

* module/system/repl/error-handling.scm: use the error string to
  construct the <debug> instance.

* module/system/repl/command.scm: new debug command `error-message'
  that extracts the new <debug> field, available to stack commands as
  `message'.

* doc/ref/scheme-using.texi: documentation for new command.

* module/system/repl/debug.scm: <debug> stores the error string in a
  new field.

13 years agofix #y back-compat shim
Andy Wingo [Mon, 30 Aug 2010 04:01:54 +0000 (21:01 -0700)]
fix #y back-compat shim

* module/ice-9/deprecated.scm (#\y): #y was in fact a syntax for
  s8vectors, not bitvectors. Fix.

13 years agobitvector work
Andy Wingo [Mon, 30 Aug 2010 03:48:32 +0000 (20:48 -0700)]
bitvector work

* test-suite/Makefile.am:
* test-suite/tests/bitvectors.test: Add a new file to test bitvectors.

* libguile/uniform.c (scm_c_uniform_vector_length): Don't call
  scm_uniform_vector_elements, as we don't need to be able to access the
  elements with pointers to bytes. Fixes uniform-vector-length on
  bitvectors.

13 years agodocstrings in syntax-rules
Andy Wingo [Mon, 30 Aug 2010 02:27:23 +0000 (19:27 -0700)]
docstrings in syntax-rules

* module/ice-9/psyntax.scm (syntax-rules): Allow a docstring between the
  literals and the first clause.

13 years agodefine* usage in boot-9
Andy Wingo [Sun, 29 Aug 2010 18:59:10 +0000 (11:59 -0700)]
define* usage in boot-9

* module/ice-9/boot-9.scm (make-module, make-mutable-parameter): Use
  define*.

13 years agoadd flag to vtables to indicate that their layout is valid
Andy Wingo [Sun, 29 Aug 2010 18:37:29 +0000 (11:37 -0700)]
add flag to vtables to indicate that their layout is valid

* libguile/struct.h (SCM_VTABLE_FLAG_VALIDATED): New flag, indicates
  that the layout of a vtable has been validated. The other flags have
  been renumbered.

* libguile/struct.c (scm_i_struct_inherit_vtable_magic): Set the
  VALIDATED flag if everything goes through.
  (scm_struct_vtable_p): If the struct should be a vtable but isn't
  validated, throw an error.
  (scm_make_vtable_vtable): Validate the incoming user_fields layout
  bit. Set the VALIDATED flag.
  (scm_c_make_structv): Add a comment about the case in which we delay
  scm_i_struct_inherit_vtable_magic.

13 years agodeprecate passing a number as the destination to `format'
Andy Wingo [Sat, 28 Aug 2010 20:43:46 +0000 (13:43 -0700)]
deprecate passing a number as the destination to `format'

* module/ice-9/format.scm (format): Deprecate having a number as the
  destination.
* doc/ref/misc-modules.texi (Formatted Output): Update docs.

13 years agothreadsafety in deprecation, extensions
Andy Wingo [Sat, 28 Aug 2010 19:15:53 +0000 (12:15 -0700)]
threadsafety in deprecation, extensions

* libguile/deprecation.c (scm_c_issue_deprecation_warning):
* libguile/extensions.c (scm_c_register_extension, load_extension): Add
  locks around global data structures.

13 years agonet-db.test tweak
Andy Wingo [Sat, 28 Aug 2010 19:02:12 +0000 (12:02 -0700)]
net-db.test tweak

* test-suite/tests/net-db.test: Throw 'unresolved if we have a crap DNS
  that is returning results for all addresses.

13 years agothreadsafe object properties
Andy Wingo [Sat, 28 Aug 2010 18:57:51 +0000 (11:57 -0700)]
threadsafe object properties

* libguile/objprop.c: Add locking around the properties weak hash, to
  avoid corrupting the whash.

13 years agoREADME fix for PKG_CONFIG=true
Andy Wingo [Sat, 28 Aug 2010 17:41:27 +0000 (10:41 -0700)]
README fix for PKG_CONFIG=true

* README: Add note that if you override pkg-config, you need to set
  libffi flags as well. Thanks to Mark Weaver.

13 years agoSeveral fixes to R6RS libraries
Andreas Rottmann [Sat, 28 Aug 2010 17:16:30 +0000 (10:16 -0700)]
Several fixes to R6RS libraries

* module/rnrs/arithmetic/fixnums.scm (fixnum-width): Make this return an
  an exact integer instead of an inexact number.

* module/rnrs/base.scm (assertion-violation): Implement.

* module/rnrs/conditions.scm (simple-conditions): Allow also simple
  conditions as argument.

* module/rnrs/enums.scm (define-enumeration): Properly construct empty
  enumeration sets.

* module/rnrs/exceptions.scm (guard): Don't restrict the body to a
  single expression.

* module/rnrs/records/syntactic.scm (define-record-type0): Expand into a
  series of definitions only.

13 years agoRevert "don't autocompile while snarfing"
Andy Wingo [Fri, 27 Aug 2010 20:11:17 +0000 (13:11 -0700)]
Revert "don't autocompile while snarfing"

This reverts commit 176ee5c82a9e6c775722cfe96711f2a02cdb7672, which
added autocomp inhibitions in the wrong place.

13 years agoRevert "[build] Rewrite guile-func-name-check in Scheme, adding features."
Andy Wingo [Fri, 27 Aug 2010 20:05:23 +0000 (13:05 -0700)]
Revert "[build] Rewrite guile-func-name-check in Scheme, adding features."

This reverts commit 6832604efa0f175a70be700624c365547fb27878. Not only
does this fail on a fresh build due to a lack of "guile", but even if it
did have its Makefile fixed, it would take too long to run, because the
rest of Guile isn't compiled.

The right thing is to avoid invoking Guile until after at least psyntax
and boot-9 have been compiled.

This commit can be reinstated if we move doc snarfing to a phase that
happens after module/ is compiled.

13 years agodon't autocompile while snarfing
Andy Wingo [Fri, 27 Aug 2010 19:56:54 +0000 (12:56 -0700)]
don't autocompile while snarfing

* am/snarf (GUILE_SNARF): Don't autocompile while snarfing, as we
  probably don't have a compiled Guile at this point.

13 years agoDocument (ice-9 match).
Ludovic Courtès [Fri, 27 Aug 2010 16:58:13 +0000 (18:58 +0200)]
Document (ice-9 match).

* doc/ref/Makefile.am (guile_TEXINFOS): Add `match.texi'.

* doc/ref/guile.texi (Guile Modules): Include `match.texi'.

* doc/ref/match.texi: New file.

* doc/ref/sxml-match.texi (sxml-match): Add xref to `match.texi'.

* module/ice-9/match.scm: Note lack of support for `(pat => exp)'.

13 years agoSRFI-1: Choose better benchmark names.
Ludovic Courtès [Fri, 27 Aug 2010 13:44:55 +0000 (15:44 +0200)]
SRFI-1: Choose better benchmark names.

* benchmark-suite/benchmarks/srfi-1.bm ("fold"): Rename sub-tests to
  "big" and "small".

13 years agoSRFI-1: Rewrite `break' and `break!' in Scheme.
Ludovic Courtès [Fri, 27 Aug 2010 13:43:30 +0000 (15:43 +0200)]
SRFI-1: Rewrite `break' and `break!' in Scheme.

This partially reverts commit 6e9f3c2676c0101590d4229653e9c628cb293064
(Tue May 3 2005).

* module/srfi/srfi-1.scm (break, break!): New procedures.

* srfi/srfi-1.c (scm_srfi1_break, scm_srfi1_break_x): Rewrite as
  proxies to the corresponding Scheme procedures.

* test-suite/standalone/test-srfi-1.c (failure): New function.
  (tests): Add `scm_srfi1_break' test.  Use `failure'.

13 years agoSRFI-1: Rewrite `fifth', `sixth', etc. in Scheme.
Ludovic Courtès [Fri, 27 Aug 2010 10:51:47 +0000 (12:51 +0200)]
SRFI-1: Rewrite `fifth', `sixth', etc. in Scheme.

This partially reverts commit 03731332d5dc8d650b947f5126427402c2b1d8bb
(Tue May 3 2005).

* module/srfi/srfi-1.scm (fifth, sixth, seventh, eighth, ninth, tenth):
  New procedures.

* srfi/srfi-1.c (scm_srfi1_fifth, scm_srfi1_sixth, scm_srfi1_seventh,
  scm_srfi1_eighth, scm_srfi1_ninth, scm_srfi1_tenth): Rewrite as
  proxies to the corresponding Scheme procedure.

* test-suite/tests/srfi-1.test ("eighth")["() -1"]: Change exception
  type to `exception:wrong-type-arg'.
  ("fifth")["() -1"]: Likewise.
  ("ninth")["() -1"]: Likewise.
  ("seventh")["() -1"]: Likewise.
  ("sixth")["() -1"]: Likewise.
  ("tenth")["() -1"]: Likewise.

13 years agoRemove unneeded #:use-module.
Ludovic Courtès [Fri, 27 Aug 2010 10:36:23 +0000 (12:36 +0200)]
Remove unneeded #:use-module.

* module/system/vm/frame.scm: Remove use of (srfi srfi-1).

13 years agoAssorted `syntax-check' fixes.
Ludovic Courtès [Fri, 20 Aug 2010 19:08:49 +0000 (21:08 +0200)]
Assorted `syntax-check' fixes.

* doc/ref/Makefile.am ($(snarf_doc).am): Untabify.

* libguile/eval.c: Remove unnecessary <assert.h> inclusion.

* .x-sc_m4_quote_check: Update.

* libguile/error.c (scm_error_scm): Use `EXIT_FAILURE' instead of 1.
* libguile/init.c (fixconfig, scm_boot_guile): Likewise.
* libguile/null-threads.h (scm_i_pthread_exit): Likewise.
* libguile/script.c (scm_compile_shell_switches): Likewise.
* test-suite/standalone/test-conversion.c: Likewise.
* test-suite/standalone/test-list.c: Likewise.
* test-suite/standalone/test-unwind.c: Likewise.

* libguile/async.c: Remove unnecessary inclusion of <signal.h>.

* NEWS: "filesystem" -> "file system".
* doc/ref/r6rs.texi: Ditto.

* cfg.mk (local-checks-to-skip): New variable.

* .x-sc_m4_quote_check, .x-sc_obsolete_symbols, .x-sc_program_name,
  .x-sc_prohibit_atoi_atof, .x-sc_prohibit_magic_number_exit: New
  files.

* .gitignore: Update.

13 years agofix <letrec> docs
Andy Wingo [Fri, 27 Aug 2010 16:16:44 +0000 (09:16 -0700)]
fix <letrec> docs

* doc/ref/compiler.texi (Tree-IL): Fix docs for external representation
  of letrec. Thanks to No Itisnt.

13 years ago[build] Rewrite guile-func-name-check in Scheme, adding features.
Thien-Thi Nguyen [Thu, 26 Aug 2010 21:21:41 +0000 (23:21 +0200)]
[build] Rewrite guile-func-name-check in Scheme, adding features.

* libguile/guile-func-name-check: Rewrite in Scheme; add inhibition
  directives, string-literal handling, failureful exit on error.
* libguile/guile-snarf-docs.in: Use ‘@top_builddir@/meta/guile’.
* libguile/pairs.c: Add guile-func-name-check inhibition directive.

13 years ago[build] Refine libguile/*.doc snarfing.
Thien-Thi Nguyen [Thu, 26 Aug 2010 16:36:48 +0000 (18:36 +0200)]
[build] Refine libguile/*.doc snarfing.

* libguile/guile-snarf-docs.in: Rewrite to incorporate all
  three phases of snarfing: func-name check, cpp, tokenization.
  Also, require/check new command-line syntax.
* libguile/Makefile.am (AM_V_FILTER): Delete var.
  (AM_V_FILTER_, AM_V_FILTER_0): Likewise.
  (.c.doc): Run ./guile-snarf-docs; use new command-line syntax.

13 years agoconsolidate sitedir definition
Andy Wingo [Wed, 25 Aug 2010 14:24:27 +0000 (10:24 -0400)]
consolidate sitedir definition

* configure.ac (sitedir): Fix definition to point to the
  version-specific sitedir.

* libguile/Makefile.am (libpath.h): Take sitedir definition from
  configure.ac.

13 years agoupdate download location in manual
Andy Wingo [Wed, 25 Aug 2010 13:49:09 +0000 (09:49 -0400)]
update download location in manual

* doc/ref/intro.texi (Obtaining and Installing Guile): Update download
  location.

13 years ago[build] Use AM_SILENT_RULES for generating cpp-E.c, cpp-SIG.c.
Thien-Thi Nguyen [Thu, 19 Aug 2010 09:11:25 +0000 (11:11 +0200)]
[build] Use AM_SILENT_RULES for generating cpp-E.c, cpp-SIG.c.

* libguile/Makefile.am (.syms.c): Prefix first command
  with $(AM_V_GEN); unconditionally silence second command.

13 years agoobjcodes.c comments
Andy Wingo [Thu, 19 Aug 2010 05:47:55 +0000 (22:47 -0700)]
objcodes.c comments

* libguile/objcodes.c: Comments from Noah Lavine

13 years agoWhitespace fix
Noah Lavine [Sun, 18 Jul 2010 17:25:23 +0000 (13:25 -0400)]
Whitespace fix

Add a space in libguile/objcodes.c to comply with the GNU Coding Standards.

13 years ago[build] Fix sed portability bug: Don't use '\n' in sed script.
Thien-Thi Nguyen [Wed, 18 Aug 2010 17:34:46 +0000 (19:34 +0200)]
[build] Fix sed portability bug: Don't use '\n' in sed script.

Regression introduced 2010-07-22, "[build] Overhaul
<errno.h>, <signal.h> cpp symbol extraction/checking".
See: <http://autobuild.josefsson.org/guile/log-201008181002653292000.txt>

* libguile/Makefile.am (.syms.c): Convert
  one-liner sed script to while-read-echo loop.

13 years ago[build] Create libguile/version.h using the configure script.
Thien-Thi Nguyen [Wed, 28 Jul 2010 12:27:42 +0000 (14:27 +0200)]
[build] Create libguile/version.h using the configure script.

* configure.ac (AC_CONFIG_FILES): Add libguile/version.h.

* libguile/Makefile.am (version.h): Delete target.
  (EXTRA_DIST): Remove version.h.in.
  (BUILT_SOURCES): Remove version.h.
  (MOSTLYCLEANFILES): Remove version.h, version.h.tmp.
* libguile/version.h.in (SCM_MAJOR_VERSION): Use conventional
  @VAR@ instead of @-VAR-@ for ‘GUILE_MAJOR_VERSION’.
  (SCM_MINOR_VERSION, SCM_MICRO_VERSION, SCM_EFFECTIVE_VERSION): Likewise
  for ‘GUILE_MINOR_VERSION’, ‘GUILE_MICRO_VERSION’, ‘GUILE_EFFECTIVE_VERSION’.

13 years agoupdate scsh doc
Andy Wingo [Tue, 17 Aug 2010 15:48:49 +0000 (08:48 -0700)]
update scsh doc

* doc/ref/scsh.texi (The Scheme shell (scsh)): Remove broken link to
  arglist.com/guile/, and add note about bitrotting.

13 years agofurther discouraged excision
Andy Wingo [Mon, 16 Aug 2010 17:28:59 +0000 (10:28 -0700)]
further discouraged excision

* libguile/gen-scmconfig.h.in: Remove a DISCOURAGED define.

13 years agoa number of doc fixes
Andy Wingo [Thu, 12 Aug 2010 11:04:08 +0000 (13:04 +0200)]
a number of doc fixes

* doc/ref/api-control.texi (Handling Errors): Update docs for
  display-error.

* libguile/backtrace.h (scm_i_display_error): Change prototype to
  s/stack/frame/.
* libguile/throw.c (handler_message): Change invocation of
  scm_i_display_error to pass a frame.

* doc/ref/api-deprecated.texi (Deprecation): Update wording.

* doc/ref/api-evaluation.texi (Local Evaluation): Remove section on
  local-eval.

* doc/ref/api-macros.texi: Fix a couple typos.

* doc/ref/api-memory.texi (Objects): Remove terrible section.
* doc/ref/api-procedures.texi (Procedure Properties): Remove docs for
  closure?.
  (Compiled Procedures): Update wording.

* doc/ref/guile.texi (API Reference): Remove reference to "Objects".

13 years agominor NEWS tweaks
Andy Wingo [Thu, 12 Aug 2010 09:14:38 +0000 (11:14 +0200)]
minor NEWS tweaks

* NEWS: Minor tweaks.

13 years agoreindent psyntax.scm
Andy Wingo [Mon, 9 Aug 2010 19:17:57 +0000 (21:17 +0200)]
reindent psyntax.scm

* module/ice-9/psyntax.scm: Reindent.

13 years agoupdate comments in psyntax.scm
Andy Wingo [Mon, 9 Aug 2010 19:15:18 +0000 (21:15 +0200)]
update comments in psyntax.scm

* module/ice-9/psyntax.scm: Update comments. Fix a couple of needless
  conses in and-map.

* module/ice-9/psyntax-pp.scm (#{and-map*\ 35}): Regen.

13 years ago@apply for multiple args in the boot memoizer
Andy Wingo [Tue, 17 Aug 2010 04:25:29 +0000 (21:25 -0700)]
@apply for multiple args in the boot memoizer

* libguile/memoize.c (m_apply): Fix for multiple arguments, as in
  (@apply proc foo bar baz).

13 years agoFix i18n tests when no French locale is available.
Ludovic Courtès [Mon, 16 Aug 2010 10:27:14 +0000 (12:27 +0200)]
Fix i18n tests when no French locale is available.

* test-suite/tests/i18n.test ("number->locale-string")["French"]: Move
  `under-french-locale-or-unresolved' within each `pass-if'.

13 years agoLink test-srfi-1 to libguile as well
Andreas Rottmann [Sun, 15 Aug 2010 14:52:00 +0000 (16:52 +0200)]
Link test-srfi-1 to libguile as well

With an installed copy of libguile in place, test-srfi-1 would be run
using that instead of the in-tree libguile.

* test-suite/standalone/Makefile.am (test_srfi_1_LDADD): Add libguile.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
13 years agoAdd `string->pointer' and `pointer->string' to the FFI.
Ludovic Courtès [Sun, 15 Aug 2010 14:42:33 +0000 (16:42 +0200)]
Add `string->pointer' and `pointer->string' to the FFI.

* libguile/foreign.c (scm_string_to_pointer, scm_pointer_to_string): New
  functions.

* libguile/foreign.h (scm_string_to_pointer, scm_pointer_to_string): New
  declarations.

* module/system/foreign.scm: Export `string->pointer' and
  `pointer->string'.

* test-suite/tests/foreign.test ("pointer<->string"): New test prefix.

* doc/ref/api-foreign.texi (Void Pointers and Byte Access): Add
  `string->pointer' and `pointer->string'.

13 years agoAdd `number->locale-string' tests.
Ludovic Courtès [Fri, 6 Aug 2010 13:36:51 +0000 (15:36 +0200)]
Add `number->locale-string' tests.

* test-suite/tests/i18n.test ("number->locale-string"): New test prefix.

13 years agoExplicit definitions for `memp' and `assp' in `(rnrs list)'; the predicate
Julian Graham [Mon, 9 Aug 2010 00:23:14 +0000 (20:23 -0400)]
Explicit definitions for `memp' and `assp' in `(rnrs list)'; the predicate
argument to Guile's `member' and `assoc' functions has a different expected
arity.

* module/rnrs/lists.scm (memp, assp): Wrap the predicate function with a
  two-argument wrapper before calling Guile's underlying implemenation.
* test-suite/Makefile.am: Add test-suite/tests/r6rs-lists.test to
  SCM_TESTS.
* test-suite/tests/r6rs-lists.test: New file.

13 years agoExplicit definitions for `vector-for-each' and `vector-map'; Guile's SRFI-1
Julian Graham [Sun, 8 Aug 2010 23:32:23 +0000 (19:32 -0400)]
Explicit definitions for `vector-for-each' and `vector-map'; Guile's SRFI-1
`for-each' and `map' implementations do not operate on lists and vectors
interchangeably.

* module/rnrs/base.scm (vector-for-each, vector-map): New functions.
* test-suite/Makefile.am: Add test-suite/tests/r6rs-base.test to SCM_TESTS.
* test-suite/tests/r6rs-base.test: New file.

13 years agofurther rnrs incompat note
Andy Wingo [Sun, 8 Aug 2010 12:33:46 +0000 (14:33 +0200)]
further rnrs incompat note

* doc/ref/r6rs.texi: Note about rnrs io ports.

13 years agoloose ends from "discouraged" removal
Andy Wingo [Sun, 8 Aug 2010 12:26:26 +0000 (14:26 +0200)]
loose ends from "discouraged" removal

* README: Remove docs on "discouraged".

* configure.ac: Remove one more "discouraged" thing.

* doc/ref/api-deprecated.texi: Rename from api-discdepr.texi, and remove
  sections on "discouraged".

* doc/ref/Makefile.am:
* doc/ref/guile.texi: Update referrers.

13 years agoremove "discouraged" infrastructure
Andy Wingo [Sun, 8 Aug 2010 12:15:47 +0000 (14:15 +0200)]
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.

13 years agodeprecated all discouraged functions
Andy Wingo [Sun, 8 Aug 2010 11:43:40 +0000 (13:43 +0200)]
deprecated all discouraged functions

* libguile/Makefile.am:
* libguile/discouraged.c: Remove discouraged.c.

* libguile/deprecated.c:
* libguile/deprecated.h:
* libguile/discouraged.h: All functions and declarations moved from
  discouraged.[ch] to deprecated.[ch], adding deprecation warnings.

* libguile/init.c: Remove discouraged init.

* libguile/numbers.c (scm_num2float, scm_num2double): Deprecate.

* test-suite/standalone/test-num2integral.c: Port to modern API.

13 years agomore r6rs incompat
Andy Wingo [Sun, 8 Aug 2010 11:00:57 +0000 (13:00 +0200)]
more r6rs incompat

* doc/ref/r6rs.texi (R6RS Incompatibilities): Add section on string
  syntax.

13 years agoadd section on toplevel expansion to r6rs incompatibilities
Andy Wingo [Sun, 8 Aug 2010 10:58:05 +0000 (12:58 +0200)]
add section on toplevel expansion to r6rs incompatibilities

* doc/ref/r6rs.texi (R6RS Incompatibilities): Add a section about
  toplevel expansion, before taking a look at fixing it...

13 years agomore NEWS updates
Andy Wingo [Fri, 6 Aug 2010 15:42:04 +0000 (17:42 +0200)]
more NEWS updates

* NEWS: Update some more.

13 years agofix stack narrowing for tail-call to throw
Andy Wingo [Fri, 6 Aug 2010 15:39:44 +0000 (17:39 +0200)]
fix stack narrowing for tail-call to throw

* module/system/repl/debug.scm (narrow-stack->vector): Fix for the
  tail-call to `throw' case, as in `(quit)'.

13 years ago,x unbound does not quit repl
Andy Wingo [Fri, 6 Aug 2010 15:28:10 +0000 (17:28 +0200)]
,x unbound does not quit repl

* module/system/repl/repl.scm (run-repl): Catch errors executing
  metacommands. Feature on top of feature...

13 years agoupdate NEWS for 1.9.12 (mostly)
Andy Wingo [Fri, 6 Aug 2010 11:45:26 +0000 (13:45 +0200)]
update NEWS for 1.9.12 (mostly)

* NEWS: Update for 1.9.12.

13 years agoadd docs for extensiondir; misc other fixes
Andy Wingo [Fri, 6 Aug 2010 11:43:47 +0000 (13:43 +0200)]
add docs for extensiondir; misc other fixes

* libguile/foreign.c (scm_i_pointer_print): Print in hexadecimal.

* doc/ref/api-foreign.texi (Modules and Extensions): Update for
  "extensiondir", and a discussion of Guile versions.
  (Foreign Variables): Fix discussion of types.
  (Void Pointers and Byte Access): Fix typo.

13 years agoremove type discusison from dynamic-pointer docstring
Andy Wingo [Fri, 6 Aug 2010 11:41:58 +0000 (13:41 +0200)]
remove type discusison from dynamic-pointer docstring

* doc/ref/api-foreign.texi:
* libguile/dynl.c (scm_dynamic_pointer): Remove discussion of types from
  the docstring.

13 years agos/extensionsdir/extensiondir/
Andy Wingo [Fri, 6 Aug 2010 11:15:58 +0000 (13:15 +0200)]
s/extensionsdir/extensiondir/

* libguile/Makefile.am (libpath.h): Change "extensionsdir" to
  "extensiondir".
* meta/guile-2.0.pc.in (extensiondir): Likewise.

13 years ago%site-dir is specific to the effective version
Andy Wingo [Fri, 6 Aug 2010 11:15:29 +0000 (13:15 +0200)]
%site-dir is specific to the effective version

* libguile/load.h:
* libguile/load.c (scm_sys_global_site_dir): New API, is what %site-dir
  used to be.
  (scm_sys_site_dir): Changed to be a version-specific dir.
  (scm_init_load_path): Search the version-specific sitedir before the
  global one.

* libguile/Makefile.am (libpath.h): Update SCM_SITE_DIR and
  SCM_GLOBAL_SITE_DIR, as appropriate.

13 years agoonly one Value History section
Andy Wingo [Fri, 6 Aug 2010 10:27:11 +0000 (12:27 +0200)]
only one Value History section

* doc/ref/repl-modules.texi: Remove section on Value History, it's
  covered in scheme-using.
* doc/ref/scheme-using.texi: Rename "Value Historyx" section to "Value
  History".
* doc/ref/guile.texi: Update xref.

13 years agoadd settable identifier syntax docs
Andy Wingo [Fri, 6 Aug 2010 10:16:49 +0000 (12:16 +0200)]
add settable identifier syntax docs

* doc/ref/api-macros.texi (Identifier Macros): Add documentation for
  settable identifier syntax.

13 years agoletrec* in docs, and some r6rs fixes
Andy Wingo [Fri, 6 Aug 2010 09:52:27 +0000 (11:52 +0200)]
letrec* in docs, and some r6rs fixes

* doc/ref/api-binding.texi: Add docs for letrec*, and revise some other
  text.
* doc/ref/compiler.texi: Update <letrec> for in-order?.
* doc/ref/r6rs.texi: Add letrec* entry.

* module/rnrs.scm:
* module/rnrs/base.scm: Export letrec*.

13 years agofold 1.9.11 news into main body
Andy Wingo [Thu, 5 Aug 2010 09:17:09 +0000 (11:17 +0200)]
fold 1.9.11 news into main body

* NEWS: Update.

13 years agofix vector-move-right! and vector-move-left!
Andy Wingo [Wed, 4 Aug 2010 19:48:00 +0000 (21:48 +0200)]
fix vector-move-right! and vector-move-left!

* libguile/vectors.c (scm_vector_move_left_x, scm_vector_move_right_x):
  Fix some bugs reported by Michael Lucy -- both variants would happily
  write beyond the end, and vector-move-right! didn't increment the
  counter before copying in the reverse direction.

* test-suite/tests/vectors.test ("vector-move-left!"):
  ("vector-move-right!"): Add tests.