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

22 commits

Author SHA1 Message Date
Mark H Weaver
bbb9f000ad Fix scm_to_utf8_stringn once and for all; optimize; add tests
* libguile/strings.c (scm_to_utf8_stringn): Fix another new bug in this
  recent comedy of errors: pass the size of the preallocated buffer to
  u32_to_u8.  Arrange to call 'scm_i_string_wide_chars' and
  'scm_i_string_length' only once each.  Rename local variables for
  improved code clarity.

* test-suite/standalone/test-conversion.c (test_to_utf8_stringn): New
  function to test scm_to_utf8_stringn.
2012-04-04 18:58:44 -04:00
Mike Gran
022dda6901 New functions scm_is_exact and scm_is_inexact
* doc/ref/api-data.texi (Exact and Inexact Numbers): doc for scm_is_exact
  and scm_is_inexact
* libguile/numbers.c (scm_is_exact, scm_is_inexact): new functions
* libguile/numbers.h: declarations for scm_is_exact and scm_is_inexact
* test/suite/standalone/test-conversion.c (test_is_exact, test_is_inexact):
  new tests
2011-10-09 20:54:37 -07:00
Ludovic Courtès
93003b16b0 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.
2010-08-27 18:59:42 +02:00
Andy Wingo
4ca4826997 remove SCM_HAVE_T_INT64, SCM_HAVE_T_UINT64
* libguile/__scm.h:
* libguile/numbers.h:
* libguile/random.c:
* libguile/srfi-4.c:
* libguile/srfi-4.h:
* libguile/numbers.c:
* test-suite/standalone/test-conversion.c:
* libguile/gen-scmconfig.c: As we require 64-bit integers in
  configure.ac, remove conditional definition of 64-bit types.
2010-07-26 15:00:49 +02:00
Ludovic Courtès
bc4adf1739 Remove unneeded #include <assert.h>.
* libguile/backtrace.c, libguile/eval.c, libguile/gc.c,
  libguile/goops.c, libguile/memoize.c, libguile/threads.c,
  libguile/uniform.c, libguile/vm.c,
  test-suite/standalone/test-conversion.c,
  test-suite/standalone/test-list.c: Don't include <assert.h>.
2009-12-15 20:20:38 +01:00
Ludovic Courtès
56a3dcd431 Remove references to undefined macros.
The intent is to allow compilation with `-Wundef', which in turn should
make it easier to catch erroneous uses of nonexistent macros.

* libguile/__scm.h: Don't assume `BUILDING_LIBGUILE' is defined.

* libguile/conv-uinteger.i.c (SCM_TO_TYPE_PROTO): Remove unneeded CPP
  conditional on `TYPE_MIN == 0'.

* libguile/fports.c: Check for the definition of `HAVE_CHSIZE' and
  `HAVE_FTRUNCATE', not for their value.

* libguile/ports.c: Likewise.

* libguile/numbers.c (guile_ieee_init): Likewise with `HAVE_DINFINITY'
  and `HAVE_DQNAN'.

* test-suite/standalone/test-conversion.c (ieee_init): Likewise.

* libguile/strings.c: Likewise with `SCM_STRING_LENGTH_HISTOGRAM'.

* libguile/strings.h: Likewise.

* libguile/tags.h: Likewise with `HAVE_INTTYPES_H' and `HAVE_STDINT_H'.

* libguile/threads.c: Likewise with `HAVE_PTHREAD_GET_STACKADDR_NP'.

* libguile/vm-engine.c (VM_NAME): Likewise with `VM_CHECK_IP'.

* libguile/gen-scmconfig.c (main): Use "#ifdef HAVE_", not "#if HAVE_".

* libguile/socket.c (scm_setsockopt): Likewise.
2009-11-17 23:42:22 +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
e2e85d1406 Don't use raw divisions by zero in `test-conversion.c'.
* test-suite/standalone/test-conversion.c (ieee_init): New function.
  (guile_Inf, guile_NaN): New variables.
  (test_from_double, test_to_double): Use them.  Divisions by zero made
  `cc' on Tru64 5.1b ("Compaq C V6.5-011") bail out and led to a
  floating point exception when compiled with GCC on the same platform.
  (main): Call `ieee_init ()'.
2009-05-21 00:12:04 +02:00
Ludovic Courtès
d0f452d162 Remove extraneous semicolons from `test-conversion.c'.
* test-suite/standalone/test-conversion.c: Remove extraneous semicolon
  following `DEF[SU]TST' invocations since that made Compaq C
  V6.5-011 (`cc' on Tru64 5.1b) bail out.
2009-05-20 23:53:23 +02:00
Ludovic Courtès
fcbc08686c Support systems whose <inttypes.h> doesn't define `PRIiMAX'. 2008-06-02 21:34:57 +02:00
Ludovic Courtès
5995c6d801 Fix "#include" directives in stand-alone C tests. 2008-04-07 23:59:36 +02:00
Ludovic Courtès
c8bb98a9fa Changes from arch/CVS synchronization 2007-10-10 20:15:08 +00:00
Kevin Ryde
8ab3d8a068 merge from 1.8 branch 2006-10-09 23:40:48 +00:00
Kevin Ryde
6e7d5622ee merge from 1.8 branch 2006-04-16 23:37:40 +00:00
Marius Vollmer
92205699d0 The FSF has a new address. 2005-05-23 19:57:22 +00:00
Marius Vollmer
ad6dec055f Avoid the use of discouraged or deprecated things. 2004-08-19 17:28:53 +00:00
Marius Vollmer
9bd10f4617 (test_locale_strings): New. 2004-08-10 15:45:49 +00:00
Marius Vollmer
eae5018eff (test_to_double, test_from_double): New tests. 2004-08-03 15:06:51 +00:00
Marius Vollmer
3838c384d1 Many more tests for the integer conversion functions. 2004-07-29 14:13:59 +00:00
Marius Vollmer
abe1308cb9 (test_is_signed_integer, test_is_unsigned_integer): Expect inexact
integers to fail.
2004-07-10 14:39:12 +00:00
Marius Vollmer
afdb04ef18 Don't define SCM_T_INTMAX_MIN,
etc, they are now provided by libuile.h.
(test_int_sizes): New.
2004-07-07 15:25:23 +00:00
Marius Vollmer
170bb182fa New file. 2004-07-06 13:13:37 +00:00