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

503 commits

Author SHA1 Message Date
Dirk Herrmann
9eb364fccb * More references to SCM_CHARS removed. 2000-09-26 19:40:10 +00:00
Marius Vollmer
dd47565aeb * numbers.c (scm_istr2flo): Throw an `out of range' error when
exponent is too large instead of returning `#f'.  The rationale is
that in this case the string represents a valid number but we
can't deal with it.
2000-09-20 21:04:19 +00:00
Neil Jerram
2a2a730bfa * Docstring fixes. 2000-08-12 23:15:48 +00:00
Neil Jerram
f0a7af1a86 Docstring fix for scm_logand. 2000-08-12 22:13:32 +00:00
Mikael Djurfeldt
c76b1eafa3 * numbers.c (scm_gr_p, scm_leq_p, scm_geq_p): Turned into
primitive generics.  (Thanks to Nicolas Neuss.)
2000-06-30 16:08:48 +00:00
Dirk Herrmann
2500356c67 * Cleaned up memory error signalling. 2000-06-29 15:54:58 +00:00
Mikael Djurfeldt
f69a01b29c Inserted some comments 2000-06-20 14:55:52 +00:00
Dirk Herrmann
894a712b28 * Un-deprecated the *FIXABLE macros.
* Deprecated SCM_UNPACK_CAR.
* Updated NEWS and RELEASE.
2000-05-25 13:53:49 +00:00
Dirk Herrmann
5610071627 * Makefile.am: Let 'make clean' remove *.x and *.doc files.
* Renamed SCM_STRICT_TYPING to SCM_DEBUG_TYPING_STRICTNESS.
* Removed conditionally compiled code for Turbo C.
* gdbint.c:  Eliminated call to scm_tag.
2000-05-16 12:11:08 +00:00
Dirk Herrmann
3c9f20f849 Reordered some dispatch sequences. 2000-05-16 09:06:23 +00:00
Dirk Herrmann
78166ad555 * Reordered some dispatch sequences.
* scm_bit_extract:  Fixed handling of bignums.
2000-05-15 17:03:59 +00:00
Dirk Herrmann
3a9809dfde * __scm.h: Added section for debugging options.
* New debugging option SCM_DEBUG_DEPRECATED.
* numbers.c numbers.h:  Deprecated a lot of stuff.
2000-05-11 16:03:32 +00:00
Dirk Herrmann
5986c47d3a * Added FIXME comment about the problems with infinite numbers.
* abs/magnitude:  Made independent of each other.
* Avoid using REALPART for real objects.
2000-05-10 13:42:23 +00:00
Dirk Herrmann
7235ee58f5 IS_INF: Undid last change. 2000-05-10 09:25:11 +00:00
Dirk Herrmann
bb62879452 * Added comments.
* Removed static function add1.
2000-05-09 16:55:54 +00:00
Dirk Herrmann
98cb6e75f5 * Fixed IS_INF.
* Reordered some dispatch sequences.
2000-05-09 12:58:53 +00:00
Dirk Herrmann
c2ff8ab0f3 Reordered some dispatch sequences. 2000-05-08 19:34:20 +00:00
Dirk Herrmann
9a00c9fc85 Fixed some goto-related initialization bugs. 2000-05-05 01:30:31 +00:00
Dirk Herrmann
f4c627b33b * scm_divbigbig and scm_divbigint are static now
and only return valid SCM values.
* Reordered some further dispatch sequences.
* Division by zero of inums leads to an error now.
2000-05-03 12:35:56 +00:00
Dirk Herrmann
f8de44c154 * numbers.c (scm_logtest, scm_division): Reordered dispatch sequence.
* removed calls to deprecated scm_makdbl.
2000-05-02 16:41:20 +00:00
Dirk Herrmann
09fb759974 Some dispatch sequence reordering fixes of comparisons of SCM values with
integer constants.
2000-04-28 17:14:49 +00:00
Dirk Herrmann
89a7e495bc * removed code enclosed within #ifdef BADIVSGNS ... #endif.
* scm_quotient: Fixed parameter number in error message.
* scm_remainder: Reordered dispatch sequence.
2000-04-28 08:35:28 +00:00
Mikael Djurfeldt
a059974535 * Makefile.am (DEFS): Added. automake adds -I options to DEFS,
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.)
2000-04-21 14:16:44 +00:00
Mikael Djurfeldt
a1a33b0f99 * numbers.c (scm_odd_p, scm_even_p): Use SCM_WRONG_TYPE_ARG
instead of SCM_ASSERT (0, ...).  (Some compilers will complain
about control reaching end of function otherwise, and, besides,
the new code is not less clear.)
2000-04-21 11:35:39 +00:00
Dirk Herrmann
4219f20d15 Added documentation strings and reordered some dispatch sequences. 2000-04-20 15:51:09 +00:00
Mikael Djurfeldt
495ffc6ec5 * numbers.c (scm_adjbig): Tell scm_must_realloc "what" instead of "who". 2000-04-19 03:26:13 +00:00
Dirk Herrmann
828865c30d * (scm_quotient, scm_modulo): Reordered to handle the case of immediate
numbers parameters first.  Also, only use decoded numbers for numerical
comparison.
2000-04-11 13:00:15 +00:00
Dirk Herrmann
4260a7fced Lots of fixes with respect to strict typing. 2000-04-04 12:13:41 +00:00
Dirk Herrmann
f81e080b24 Fixed some bugs that are due to the fact that SCM is a void* now.
Cleaned up a macro definition.  Thanks to Dale P. Smith for both of
these patches.
2000-03-22 20:48:18 +00:00
Dirk Herrmann
f2961ccd8f A couple of typing problems (at leat partially) resolved. 2000-03-20 18:14:07 +00:00
Dirk Herrmann
3ab9f56eaf scm_ash: Fixed typing problems with the second parameter and added some
documentation.  (Thanks Thien-Thi Nguyen for indicating the problem.)
2000-03-20 04:02:56 +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
Dirk Herrmann
ba11fd4cb6 Only include root.h where it is actually needed. 2000-03-18 08:44:04 +00:00
Dirk Herrmann
7ab3fdd51f Only include strings.h where it is actually needed. 2000-03-17 18:11:58 +00:00
Dirk Herrmann
f04d8caf82 Only include ports.h where it is actually needed. 2000-03-17 16:10:13 +00:00
Dirk Herrmann
003d1fd046 Only include vectors.h in those files, where it is actually needed. 2000-03-17 15:23:03 +00:00
Dirk Herrmann
0fa27efa4a Removed empty file genio.h and references to it. 2000-03-17 13:37:33 +00:00
Mikael Djurfeldt
f3ae5d6080 * __scm.h eq.c, eval.c, gc.c, hc.h, gh_data, hash.c, numbers.c,
numbers.h, objects.c, ramap.c, random.c, unif.c, unif.h: Extensive
rewrite of handling of real and complex numbers.
(SCM_FLOATS, SCM_SINGLES): These #ifdef conditionals have been
removed along with the support for floats.  (Float vectors are
still supported.)

* numbers.c (scm_floprint, scm_floequal): Removed.
(scm_print_real, scm_print_complex, scm_real_equalp,
scm_complex_equalp): New functions.

* numbers.c (scm_makdbl): no malloc'ing needed, so the
{DEFER,ALLOW}_INTS thing removed.
2000-03-14 06:41:12 +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
Greg J. Badros
8a525303c7 * numbers.c (scm_copy_big_dec, scm_copy_smaller, scm_big_ior,
scm_big_xor, scm_big_and, scm_big_test): Added new lowlevel bignum
logical functions from SCM.

(logand, logior, logxor, logtest, logbit?): Extended scheme
logical functions to use bignums from SCM.

(lognot): Removed call to `SCM_VALIDATE_INUM' that prevented
lognot from using bignums.
2000-03-09 22:58:32 +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
3dd632c9ae * numbers.c: Use SCM_VALIDATE_LONG_COPY, and longs, not ints, in
various logXXX primitives.  Thanks Eric Moore!
2000-03-08 18:16:50 +00:00
Greg J. Badros
b6791b2e94 * error.h, error.c: Added `scm_wrong_type_arg_msg' to support
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).
2000-03-03 00:09:54 +00:00
Mikael Djurfeldt
a3c8b9fce9 * strports.c (st_end_input): Inserted parenthesis to get operator
grouping correct.

* fports.c, list.c, numbers.c, ports.c, stime.c, symbols.c,
filesys.c, posix.c: Converted docstrings to ANSI C format and
escaped " occurring inside string literals.
2000-01-18 14:13:31 +00:00
Mikael Djurfeldt
b380b88547 * alist.c, chars.c, debug.c, dynl.c, dynwind.c, error.c, eval.c,
evalext.c, filesys.c, gc.c, hash.c, hashtab.c, ioext.c,
   keywords.c, list.c, load.c, macros.c, net_db.c, numbers.c,
   objprop.c, ports.c, posix.c, print.c, procprop.c, procs.c,
   ramap.c, regex-posix.c, root.c, scmsigs.c, simpos.c, socket.c,
   stacks.c, stime.c, strings.c, strop.c, strports.c, struct.c,
   symbols.c, throw.c, unif.c, vectors.c, version.c, vports.c,
   weaks.c: Converted docstrings to ANSI C format.
2000-01-18 11:24:03 +00:00
Greg J. Badros
2cd04b426f * scm_validate.h: Added SCM_VALIDATE_ULONG_COPY,
SCM_VALIDATE_LONG_COPY

* numbers.c: Use SCM_VALIDATE_ULONG_COPY, instead of
SCM_VALIDATE_INUM_COPY to let bigger numbers be used.  Rename a
couple of formal arguments (and fix their uses) to make arguments
match the documentation.
2000-01-17 19:44:01 +00:00
Greg J. Badros
c1bfcf602b * scm_validate.h: Added SCM_NUM2LONG_DEF macro. Make
SCM_OUT_OF_RANGE use SCM_MAKINUM, not scm_long2num.  Added
SCM_COERCE_ROSTRING macro.  Added SCM_VALIDATE_NONEMPTYLIST
macro.  Fix SCM_VALIDATE_STRINGORSUBSTR macro to not use SLOPPY
variants.

* ports.c (scm_port_closed_p): Validate that the arg is a PORT,
then return whether it's an open port (was validating that it was
an open port -- this was a bug I introduced back in December, but
my careful reading of diffs caught it).

* numbers.c: Recombine the two conditional-compilation paths for
all the log* primitives -- they were split based on #ifndef
scm_long2num;  factored out a SCM_LOGOP_RETURN macro, and fixed
some bugs and inconsistencies in the two sets of implementations.
(scm_lognot) Fixed *atrocious* re-use of a SCM as an integer!

* ioext.c: Use SCM_ASSERT_RANGE in a couple places, and
SCM_VALIDATE_INUM_COPY once where it should've been used.

* fluids.c (scm_internal_with_fluids): Use
SCM_VALIDATE_LIST_COPYLEN.

* filesys.c: Use SCM_NUM2LONG instead of SCM_VALIDATE_INUM_COPY;
this is questionable as it relaxes type safety, but other changes
were useful and all SCM_NUM2LONG's should probably be
revisited. Use SCM_OUT_OF_RANGE, SCM_WRONG_TYPE_ARG.

* evalext.c: line-break change on 1 line.

* eval.c (nconc2last): Takes a non-empty list as its first
argument, not just a list.

* dynl.c: Use new SCM_COERCE_ROSTRING macro.
2000-01-12 01:51:18 +00:00
Greg J. Badros
c3ee75204c * *.c, snarf.h: Replace GUILE_PROC1 with SCM_DEFINE1 throughout. 2000-01-06 19:51:45 +00:00
Greg J. Badros
3b3b36ddb7 * *.[ch]: Whitespace changes -- added space after SCM_VALIDATE_*
macros and SCM_DEFINE macros to match GNU coding standards.
2000-01-05 19:25:37 +00:00