scm_i_make_ratio(), so fractions are only read.
scm_i_fraction_reduce() modifies a fraction when reading it. A
race condition might lead to fractions being corrupted by reading
them concurrently.
* numbers.h: remove SCM_FRACTION_SET_NUMERATOR,
SCM_FRACTION_SET_DENOMINATOR, SCM_FRACTION_REDUCED_BIT,
SCM_FRACTION_REDUCED_SET, SCM_FRACTION_REDUCED_CLEAR,
SCM_FRACTION_REDUCED.
scm_t_intmax values.
(scm_uint2str): New, for scm_t_uintmax.
(scm_iint2str): Argument type changed to scm_t_intmax,
reimplemented in terms of scm_uint2str.
(scm_number_p): Export as "number?" to Scheme.
(scm_is_complex, scm_is_number): New.
(scm_c_make_rectangular, scm_c_make_polar): New.
(scm_make_rectangular, scm_make_polar): Use above.
(scm_c_real_part, scm_c_imag_part, scm_c_magnitude, scm_c_angle):
New.
(scm_make_complex): Discouraged by moving to discouraged.h and
discouraged.c. Replaced all uses with scm_c_make_rectangular.
(scm_i_short2big, scm_i_int2big, scm_i_uint2big, scm_i_size2big,
scm_i_ptrdiff2big, scm_i_long_long2big, scm_i_ulong_long2big):
Removed prototypes.
(scm_make_real, scm_num2dbl, scm_float2num, scm_double2num):
Discouraged by moving to discouraged.h and discouraged.c.
Replaced all uses with scm_from_double.
(scm_num2float, scm_num2double): Discouraged by moving prototype
to discouraged.h and rewriting in terms of scm_to_double.
Replaced all uses with scm_to_double.
(scm_to_double): Do not implement in terms of scm_num2dbl, use
explicit code.
(scm_from_double): Do not implement in terms of scm_make_real, use
explicit code.
SCM_I_INUMP, SCM_I_NINUMP and SCM_I_INUM, respectively and adding
deprecated versions to deprecated.h and deprecated.c. Changed all
uses to either use the SCM_I_ variants or scm_is_*, scm_to_*, or
scm_from_*, as appropriate.
throughout guile, has not been part of an official release yet,
and the concept of sloppy predicates has never been a good idea.
(SCM_FRACTION_NUMERATOR, SCM_FRACTION_DENOMINATOR,
SCM_FRACTION_SET_NUMERATOR, SCM_FRACTION_SET_DENOMINATOR):
Simplified.
of SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
* numbers.h, deprecated.h (SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP,
SCM_SLOPPY_COMPLEXP): Deprecated and moved from numbers.h to
deprecated.h.
* configure.in: Checking for unsetenv().
2003-05-30 Stefan Jahn <stefan@lkcc.org>
* posix.c (s_scm_putenv): Use the new HAVE_UNSETENV
appropriately for mingw32 hosts.
* numbers.h: Defining copysign(), isnan() and finite() to
be prefixed by a single '_' for mingw32 hosts.
SCM_HAVE_FLOATINGPOINT_H. Replace usage of HAVE_IEEEFP_H with
SCM_HAVE_IEEEFP_H. Replace usage of HAVE_NAN_H with
SCM_HAVE_NAN_H. Replace usage of STDC_HEADERS with
SCM_HAVE_STDC_HEADERS. Replace usage of ptrdiff_t with
scm_t_ptrdiff. Replace usage of HAVE_LONG_LONGS with
"SCM_SIZEOF_LONG_LONG != 0".
* configure.in: Include `win32-socket.o' in the list of object
files if networking is enabled on Win32.
2001-11-07 Stefan Jahn <stefan@lkcc.org>
* win32-socket.[ch]: New files. Defines Winsock-API error codes
and makes them available through Guile. That is because the
Winsock-API does not store its errors in `errno' and thus cannot
return error messages via `strerror (errno)'.
* socket.c (scm_init_socket): Initialize `win32-socket' part
here under M$-Windows.
* numbers.h: Added missing declaration of
`scm_sys_check_number_conversions()'.
* error.c: Local definition of SCM_I_STRERROR and SCM_I_ERRNO
and use in `(strerror)' and `(system-error)'.
* Makefile.am (EXTRA_libguile_la_SOURCES): Added
`win32-socket.[ch]' to extra source and header files.
SCM_T_SIGNED_BITS_MIN): New.
* numbers.h (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM):
Use them to make these macros computable by the preprocessor.
non-pair cells.
(SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM): Make sure
the return value is signed. Thanks to Brian Crowder for the bug
report.
(SCM_SRS): Avoid unnecessary casting and don't unpack input
values. With this patch, SCM_SRS can be safely used for other
types than scm_t_signed_bits. However, it should still better be
an internal macro and thus be renamed to SCM_I_SRS.
(SCM_MAKINUM, SCM_INUM): Use proper casting.