* module/srfi/srfi-45.scm (eager): Accept any number of arguments.
Store the list of arguments in the value record. Previously, only one
argument was accepted, and that value was stored in the value record.
(delay): Support expressions that return any number of arguments.
(force): Return the list of values stored in the value record.
(promise?): Export.
* doc/ref/srfi-modules.texi (SRFI-45): Update docs. Remove typing
for simplicity in discussing multiple values.
* test-suite/tests/srfi-45.test: Add tests. Add FSF copyright for 2010
and 2013. Add missing year to André van Tonder's copyright notice.
* libguile/numbers.c (idbl2str): Print large numbers in scientific
notation only if the exponent is >= 7 and the least significant
non-zero digit has value >= radix^4.
* test-suite/tests/numbers.test ("number->string"): Add tests.
* configure.ac: Remove `doc/ref/effective-version.texi' from the
`AC_CONFIG_FILES'.
* doc/ref/Makefile.am ($(srcdir)/effective-version.texi): New target.
* libguile/r6rs-ports.c (scm_get_bytevector_some, scm_get_bytevector_n,
scm_get_bytevector_n_x, scm_get_bytevector_all): Use
`scm_get_byte_or_eof' and `scm_peek_byte_or_eof' instead of their
`char' counterparts.
Reported by Chris K. Jester-Young.
Fixes <http://bugs.gnu.org/13757>.
* libguile/numbers.c (idbl2str): Reimplement.
(mem2decimal_from_point): Accept negative exponents larger than
SCM_MAXEXP that produce subnormals.
(SCM_MAX_DBL_PREC): Removed preprocessor macro.
(scm_dblprec, fx_per_radix): Removed static variables.
(init_dblprec, init_fx_radix): Removed static functions.
(scm_init_numbers): Remove initialization code for 'scm_dblprec'
and 'fx_per_radix'.
* test-suite/tests/numbers.test ("number->string"): Restore tests that
previously failed. Remove comments about problems in the number
printer that are now fixed.
* libguile/numbers.c (scm_i_divide2double): New function.
(scm_i_divide2double_lo2b): New variable.
(scm_i_fraction2double, log_of_fraction): Use 'scm_i_divide2double'.
(do_divide): Removed. Its code is now in 'scm_divide'.
(scm_divide2real): Removed. Superceded by 'scm_i_divide2double'.
(scm_divide): Inherit code from 'do_divide', but without support for
forcing a 'double' result (that functionality is now implemented by
'scm_i_divide2double'). Add FIXME comments in cases where divisions
might not be as precise as they should be.
(scm_init_numbers): Initialize 'scm_i_divide2double_lo2b'.
* test-suite/tests/numbers.test (dbl-epsilon-exact, dbl-max-exp): New
variables.
("exact->inexact"): Add tests.
("inexact->exact"): Add test for largest finite inexact.
* module/web/http.scm ("Host"): Parse and write IP-literals treating
escapes as uri module does: remove brackets on parse, replace them on
write.
* test-suite/tests/web-http.test ("request headers"): Add tests.
* doc/ref/web.texi: Say `World Wide Web'; the hyphenated form is almost
never used (c.f. w3.org).
General predicate arguments are named `obj'. Fill in arguments
omitted from some procedure definitions (e.g. `request-method').
Minor tweaks, such as using en-dash and missing markup as appropriate.
Wrap very long deffn lines.
* module/web/*.scm: Expand texinfo markup in doc strings. Synchronize
with changes in web.texi.
* module/ice-9/boot-9.scm (false-if-exception): Add optional #:warning
TEMPLATE ARG... tail, which indicates that we should print a warning
on failure.
(load-in-vicinity): Use the new #:warning.
(make-autoload-interface): Surround the bits that load modules with a
false-if-exception with #:warning. Fixes
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12202.
* test-suite/tests/syncase.test ("missing autoloads do not foil
psyntax"): Add a test.
* libguile/numbers.c (scm_inexact_to_exact): Implement conversion of a
double to an exact rational without using the mpq functions.
* test-suite/tests/numbers.test (dbl-mant-dig): Simplify initializer.
(dbl-epsilon, dbl-min-exp): New variables.
("inexact->exact"): Add tests. Fix broken "2.0**i to exact and back"
test, and change it to "2.0**i to exact", to avoid use of
'exact->inexact'.
* libguile/numbers.c (log_of_exact_integer_with_size): Removed.
(log_of_exact_integer): Handle bignums too large to fit in a double
using 'scm_i_big2dbl_2exp' instead of 'scm_integer_length' and
'scm_ash'.
(log_of_fraction): Use 'log_of_exact_integer' instead of
'log_of_exact_integer_with_size'.
* libguile/numbers.c (scm_i_big2dbl_2exp): New static function.
(scm_i_big2dbl): Reimplement in terms of 'scm_i_big2dbl_2exp',
with proper rounding.
* test-suite/tests/numbers.test ("exact->inexact"): Add tests.
* libguile/numbers.c (left_shift_exact_integer,
floor_right_shift_exact_integer, round_right_shift_exact_integer): New
static functions.
(scm_round_ash): New procedure.
(scm_ash): Reimplement in terms of 'left_shift_exact_integer' and
'floor_right_shift_exact_integer'.
* libguile/numbers.h: Add prototype for scm_round_ash. Rename the
second argument of 'scm_ash' from 'cnt' to 'count'.
* test-suite/tests/numbers.test (round-ash, ash): Add new unified
testing framework for 'ash' and 'round-ash'. Previously, the tests
for 'ash' were not very comprehensive; for example, they did not
include a single test where the number to be shifted was a bignum.
* doc/ref/api-data.texi (Bitwise Operations): Add documentation for
'round-ash'. Improve documentation for `ash'.
* meta/guile.m4 (GUILE_PKG): New macro, chooses a version of Guile
against which to compile.
(GUILE_FLAGS, GUILE_PROGS): Rewrite to call GUILE_PKG as necessary, to
respect any previous call to GUILE_PKG, and to not require
guile-tools.
* libguile/posix.c (scm_execl, scm_execlp, scm_execle)
(scm_open_process): Remove casts for ancient mingw.
(scm_utime): If we fall back to utime, assert that flags is 0.
(scm_getlogin): Rely on gnulib.
* libguile/iselect.h: If we do not have sys/select.h, don't provide
scm_std_select, SELECT_TYPE, FD_SET, FD_ZERO, FD_ISSET, or FD_CLR.
Guile should not be setting these macros in public API. This is an
incompatible change on mingw, but oh well.
* libguile/threads.c: Rely on gnulib's select, and use that to implement
scm_std_select.
* libguile/deprecated.h:
* libguile/deprecated.c: Only provide scm_internal_select if we have
sys/select.h.
* libguile/posix.c: Reorder includes to fix mingw include-order
problem. Remove ttyname shims; gnulib is the place to fix that.
Remove winsock2 include, as gnulib seems to handle that OK. Rely on
the new pipe-posix gnulib module. Don't bother shimming getlogin, etc
on mingw; gnulib is the place for shims.
* libguile/fports.c: Reorder includes to put system includes first;
fixes windows/winsock2 include error problem. Rely on Gnulib's
select module.
(fport_input_waiting): Use select instead of scm_std_select.
* configure.ac (alarm): Check for decl.
* libguile/scmsigs.c: Reorder includes to put system includes first.
Fixes include order on mingw. Remove #define for alarm, as we will
use HAVE_DECL_ALARM. Remove #defines for sleep and usleep, as they
are not used.
(scm_alarm): Only define if HAVE_DECL_ALARM.
* libguile/socket.c (scm_init_socket): Remove mingw-specific code.
* libguile/fports.c: Remove ftruncate redefine; mingw is fine.
(scm_i_fdes_to_port): If we have no F_GETFL, just do an fstat. The
right place for an F_GETFL replacement would be in gnulib.
(fport_input_waiting): Remove an outdated comment.
* libguile/error.c (SCM_I_STRERROR, SCM_I_ERRNO): Remove, replacing uses
with strerror and errno.
* libguile/win32-socket.c:
* libguile/win32-socket.h: Remove. Mingw has suitable replacements.
* configure.ac:
* libguile/Makefile.am (EXTRA_libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES):
(noinst_HEADERS): Update for win32-socket removal.