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

142 commits

Author SHA1 Message Date
Marius Vollmer
8507ec804f (scm_complex_p): New, export as "complex?" to Scheme.
(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.
2004-08-03 17:12:14 +00:00
Marius Vollmer
cba42c9344 * numbers.h. numbers.c (scm_make_ratio): Renamed to
scm_i_make_ratio and made static, replaced uses with scm_divide.
2004-08-03 15:55:42 +00:00
Marius Vollmer
55f26379b3 (scm_is_rational): New.
(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.
2004-08-03 15:03:35 +00:00
Marius Vollmer
c71b07063e * discouraged.h, discouraged.c: New files.
* deprecated.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP, SCM_EQ_P,
SCM_NEGATE_BOOL, SCM_BOOL, SCM_BOOT_NOT): Promoted from being
deprecated to being discouraged by moving to discouraged.h.

* numbers.h, numbers.c, discouraged.h, discouraged.c
(scm_short2num, scm_ushort2num, scm_int2num, scm_uint2num,
scm_long2num, scm_ulong2num, scm_size2num, scm_ptrdiff2num,
scm_num2short, scm_num2ushort, scm_num2int, scm_num2uint,
scm_num2long, scm_num2ulong, scm_num2size, scm_num2ptrdiff,
scm_long_long2num, scm_ulong_long2num, scm_num2long_long,
scm_num2ulong_long): Discouraged by moving to discouraged.h and
discouraged.c and reimplementing in terms of scm_from_* and
scm_to_*.

* numbers.h, numbers.c: Removed GUILE_DEBUG code.
(scm_i_short2big, scm_i_ushort2big, scm_i_int2big, scm_i_uint2big,
scm_i_size2big, scm_i_ptrdiff2big): Removed.
(scm_i_long2big, scm_i_ulong2big): New, explicit definitions.
* conv-integer.i.c, conv-uinteger.i.c: Use them instead of
explicit code.
2004-08-02 15:57:04 +00:00
Marius Vollmer
d1b5b4001e * numbers.h (scm_to_schar, scm_to_uchar, scm_to_char,
scm_to_short, scm_to_ushort, scm_to_int, scm_to_uint, scm_to_long,
scm_to_ulong, scm_to_long_long, scm_to_ulong_long, scm_to_intmax,
scm_to_uintmax, scm_to_size_t, scm_to_ssize_t scm_from_schar,
scm_from_uchar, scm_from_char, scm_from_short, scm_from_ushort,
scm_from_int, scm_from_uint, scm_from_long, scm_from_ulong,
scm_from_long_long, scm_from_ulong_long, scm_from_intmax,
scm_from_uintmax, scm_from_size_t, scm_from_ssize_t): No longer
defined in terms of scm_to_signed_integer, etc, but in terms of
scm_to_int8, etc.
2004-07-29 15:48:44 +00:00
Marius Vollmer
bfd7932e66 * conv-integer.i.c, conv-uinteger.i.c: New files, used to generate
the functions below.

* numbers.c, numbers.h (scm_to_int8, scm_to_uint8, scm_to_int16,
scm_to_uint16, scm_to_int32, scm_to_uint32, scm_to_int64,
scm_to_uint64, scm_from_int8, scm_from_uint8, scm_from_int16,
scm_from_uint16, scm_from_int32, scm_from_uint32, scm_from_int64,
scm_from_uint64): Turned from macros into proper functions.
(scm_to_signed_integer, scm_to_unsigned_integer,
scm_from_signed_integer, scm_from_unsigned_integer): Generate via
conv-integer.i.c and conv-uinteger.i.c, as well.
2004-07-29 13:42:50 +00:00
Marius Vollmer
3aa13a0579 (SCM_INUMP, SCM_NINUMP, SCM_INUM): Deprecated by reenaming them to
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.
2004-07-23 15:29:27 +00:00
Marius Vollmer
5a572ca13c * numbers.h (SCM_MAKINUM, SCM_I_MAKINUM): Renamed SCM_MAKINUM to
SCM_I_MAKINUM and changed all uses.
* deprecated.h, deprecated.c (SCM_MAKINUM): Newly deprecated.
2004-07-08 15:41:48 +00:00
Marius Vollmer
22008a7804 (scm_to_short, scm_to_ushort): It's SHRT_MIN, etc, not SHORT_MIN.
(scm_to_size_t): Use SIZE_MAX instead of cooking our own.
(scm_to_long_long, scm_to_ulong_long, scm_to_int8, scm_to_uint8,
scm_to_int16, scm_to_uint16, scm_to_int32, scm_to_uint32,
scm_to_int64, scm_to_uint64, scm_to_intmax, scm_to_uintmax,
scm_from_long_long, scm_from_ulong_long, scm_from_int8,
scm_from_uint8, scm_from_int16, scm_from_uint16, scm_from_int32,
scm_from_uint32, scm_from_int64, scm_from_uint64, scm_from_intmax,
scm_from_uintmax): New.
2004-07-07 15:22:56 +00:00
Marius Vollmer
73e4de09b9 (scm_is_integer, scm_is_signed_integer, scm_is_unsigned_integer,
scm_to_signed_integer, scm_to_unsigned_integer, scm_to_schar,
scm_to_uchar, scm_to_char, scm_to_short, scm_to_ushort, scm_to_long,
scm_to_ulong, scm_to_size_t, scm_to_ssize_t, scm_from_schar,
scm_from_uchar, scm_from_char, scm_from_short, scm_from_ushort,
scm_from_int, scm_from_uint, scm_from_long, scm_from_ulong,
scm_from_size_t, scm_from_ssize_t, scm_is_real, scm_to_double,
scm_from_double): New.

* deprecated.h, boolean.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOL,
SCM_NEGATE_BOOL, SCM_BOOLP): Deprecated by moving into "deprecated.h".
Replaced all uses with scm_is_false, scm_is_true, scm_from_bool, and
scm_is_bool, respectively.
2004-07-06 10:23:30 +00:00
Dirk Herrmann
651f07f82e * numbers.h (SCM_SLOPPY_FRACTIONP): Removed. It was not used
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.
2004-05-15 15:50:24 +00:00
Marius Vollmer
fba8fdc0d3 (SCM_I_BIG_MPZ): Use SCM_CELL_OBJECT_LOC instead of taking the address
of SCM_CELL_WORD_1, the latter being no longer an lvalue.
2004-05-06 16:42:07 +00:00
Kevin Ryde
d885e204fd (scm_modulo_expt): Renamed from
scm_modular_expt, matching scheme level name `modulo-expt'.
2004-03-25 21:55:20 +00:00
Kevin Ryde
32c9168774 Add copyright years based on ChangeLog entries. 2004-03-25 21:38:59 +00:00
Kevin Ryde
518b750845 2004-03-26 Eric Hanchrow <offby1@blarg.net>
* numbers.c, numbers.h (scm_modular_expt): New function.
2004-03-25 21:35:53 +00:00
Marius Vollmer
f92e85f735 * print.c (scm_iprin1): Handle fractions.
* objects.h (scm_class_fraction): New.
* objects.c (scm_class_fraction): New.
(scm_class_of): Handle fractions.

* hash.c (scm_hasher): Handle fractions.

* numbers.c: New code for handling fraction all over the place.
(scm_odd_p, scm_even_p): Handle inexact integers.
(scm_rational_p): New function, same as scm_real_p.
(scm_round_number, scm_truncate_number, scm_ceiling, scm_floor):
New exact functions that replace the inexact 'dsubr'
implementations.
(scm_numerator, scm_denominator): New.

* numbers.h (SCM_NUMP): Recognize fractions.
(SCM_FRACTIONP, SCM_SLOPPY_FRACTIONP, SCM_FRACTION_NUMERATOR,
SCM_FRACTION_DENOMINATOR, SCM_FRACTION_SET_NUMERATOR,
SCM_FRACTION_SET_DENOMINATOR, SCM_FRACTION_REDUCED_BIT,
SCM_FRACTION_REDUCED_SET, SCM_FRACTION_REDUCED_CLEAR,
SCM_FRACTION_REDUCED): New.
(scm_floor, scm_ceiling, scm_truncate_number, scm_round_number):
New prototypes.
(scm_make_ratio, scm_rationalize, scm_numerator, scm_denominator,
scm_rational_p): New prototypes.
(scm_i_dbl2num, scm_i_fraction2double, scm_i_fraction_equalp,
scm_i_print_fraction): New prototypes.

* goops.c (create_standard_classes): Create "<fraction>" class.

* gc-mark.c (scm_gc_mark_dependencies): Handle fractions.

* gc-card.c (scm_i_sweep_card): Include scm_tc16_fraction as a
case in the switch, but do nothing for now.

* eval.c (SCM_CEVAL, SCM_APPLY, call_dsubr_1): Convert fractions
to doubles when calling 'dsubr' functions.

* eq.c (scm_eqv_p, scm_equal_p): Handle fractions.
2003-11-18 19:59:53 +00:00
Dirk Herrmann
f03314f920 * numbers.h (SCM_INEXACTP): Removed uses of SCM_TYP16S.
* tags.h, deprecated.h (SCM_TYP16S): Deprecated and moved from
	tags.h to deprecated.h.
2003-09-21 07:54:23 +00:00
Dirk Herrmann
534c55a97d This set of patches introduces a new tc7 code scm_tc7_number for
numbers.  Bignums, reals and complex numbers are turned from smobs
	into subtypes of scm_tc7_number.

	* tags.h (scm_tc7_number): New.

	* eq.c (scm_equal_p), eval.c (SCM_CEVAL), evalext.c
	(scm_self_evaluating_p), gc-card.c (scm_i_sweep_card), gc-mark.c
	(scm_gc_mark_dependencies), goops.c (create_smob_classes), hash.c
	(scm_hasher), numbers.c, numbers.h (SCM_NUMP), objects.c
	(scm_class_of), print.c (scm_iprin1), smob.c
	(scm_smob_prehistory): Don't handle bignums, reals and complex
	numbers as subtypes of scm_tc7_smob any more.

	* numbers.h, tags.h (scm_tc16_big, scm_tc16_real,
	scm_tc16_complex): Moved definitions from tags.h to numbers.h.
2003-09-18 20:55:40 +00:00
Dirk Herrmann
0d5e348022 * numbers.h (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Removed uses
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.
2003-09-06 09:17:29 +00:00
Dirk Herrmann
5d7d39ff5d * numbers.h (SCM_MAKINUM): Define in terms of scm_tc2_int.
(SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Define in terms of the
	respective SLOPPY macro.
2003-09-04 20:04:30 +00:00
Stefan Jahn
1e498fbd0f 2003-05-30 Stefan Jahn <stefan@lkcc.org>
* 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.
2003-05-30 09:39:34 +00:00
Rob Browning
0b85efff1d oops -- reverse accidental commit. 2003-04-16 19:45:12 +00:00
Rob Browning
3b8b889c93 *** empty log message *** 2003-04-16 19:45:11 +00:00
Rob Browning
5384438984 * numbers.h: remove the gmp.h #include (not needed now). 2003-04-07 01:50:35 +00:00
Marius Vollmer
73be1d9e8e Changed license terms to the plain LGPL thru-out. 2003-04-05 19:15:35 +00:00
Rob Browning
d3e7e88dcb * numbers.h: remove SCM_BIGDIG conditionals, reorganize, and
rewrite to handle GMP bignums.
2003-04-04 21:49:55 +00:00
Rob Browning
f0ad7455ec * numbers.h: fix various preprocessor usages of new public
symbols to expect 0 or 1 values rather than 1 or undefined.
i.e. change #ifdef to #if, etc.
2003-03-27 20:09:18 +00:00
Rob Browning
22185d5f65 * numbers.h: replace usage of HAVE_FLOATINGPOINT_H with
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".
2003-03-25 23:57:58 +00:00
Marius Vollmer
232898d93d Conditionally include floatingpoint.h, ieeefp.h, and nan.h. Provide
declarations for scm_inf_p, scm_nan_p, scn_inf, and scm_nan.
2002-05-06 22:27:42 +00:00
Marius Vollmer
760eb0ce25 (SCM_MAKE_BIGNUM_TAG): New. 2001-11-25 15:12:39 +00:00
Stefan Jahn
b4e15479e9 2001-11-07 Stefan Jahn <stefan@lkcc.org>
* 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.
2001-11-07 15:08:45 +00:00
Marius Vollmer
33b001fd89 Prefixed each each exported symbol with SCM_API. 2001-11-02 00:19:12 +00:00
Marius Vollmer
c0060c9589 Corrected definition of SCM_MOST_POSITIVE_FIXNUM. Boy was I confused. 2001-10-06 20:48:27 +00:00
Marius Vollmer
004c0902ff * tags.h (SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
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.
2001-10-06 19:58:02 +00:00
Dirk Herrmann
14282d0f5c * numbers.h: Removed old comment about using SCM_CAR to access
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.
2001-10-05 17:43:49 +00:00
Mikael Djurfeldt
581ded70a3 * validate.h (SCM_NUM2FLOAT, SCM_NUM2DOUBLE,
SCM_VALIDATE_FLOAT_COPY, SCM_VALIDATE_DOUBLE_COPY): New
macros. (The NUM names might soon change.)

* numbers.h: Added missing declarations.
2001-09-23 21:25:26 +00:00
Dirk Herrmann
dee01b012c * Removed deprecated stuff.
* Some more renamings to SCM_<filename>_H.
2001-08-31 12:13:50 +00:00
Dirk Herrmann
3c9a524f01 * Rewrote string->number stuff. 2001-07-30 19:35:15 +00:00
Thien-Thi Nguyen
a06e3a75b2 Remove "face-lift" comment. 2001-07-09 07:36:48 +00:00
Marius Vollmer
92c2555f69 replace "scm_*_t" with "scm_t_*". 2001-06-14 19:50:43 +00:00
Marius Vollmer
4d87842bb3 (SCM_SRS): Cast shiftee to scm_signed_bits_t.
(SCM_INUM): Cast result to scm_signed_bits_t.
2001-06-14 17:41:21 +00:00
Michael Livshin
c014a02eec revert the ill-considered part of the 2001-05-24 changes 2001-05-26 20:51:22 +00:00
Michael Livshin
1be6b49ccb * validate.h
(SCM_NUM2{SIZE,PTRDIFF,SHORT,USHORT,BITS,UBITS,INT,UINT}[_DEF]):
new macros.

* unif.h: type renaming:
scm_array -> scm_array_t
scm_array_dim -> scm_array_dim_t
the old names are deprecated, all in-Guile uses changed.

* tags.h (scm_ubits_t): new typedef, representing unsigned
scm_bits_t.

* stacks.h: type renaming:
scm_info_frame -> scm_info_frame_t
scm_stack -> scm_stack_t
the old names are deprecated, all in-Guile uses changed.

* srcprop.h: type renaming:
scm_srcprops -> scm_srcprops_t
scm_srcprops_chunk -> scm_srcprops_chunk_t
the old names are deprecated, all in-Guile uses changed.

* gsubr.c, procs.c, print.c, ports.c, read.c, rdelim.c, ramap.c,
rw.c, smob.c, sort.c, srcprop.c, stacks.c, strings.c, strop.c,
strorder.c, strports.c, struct.c, symbols.c, unif.c, values.c,
vectors.c, vports.c, weaks.c:
various int/size_t -> size_t/scm_bits_t changes.

* random.h: type renaming:
scm_rstate -> scm_rstate_t
scm_rng -> scm_rng_t
scm_i_rstate -> scm_i_rstate_t
the old names are deprecated, all in-Guile uses changed.

* procs.h: type renaming:
scm_subr_entry -> scm_subr_entry_t
the old name is deprecated, all in-Guile uses changed.

* options.h (scm_option_t.val): unsigned long -> scm_bits_t.
type renaming:
scm_option -> scm_option_t
the old name is deprecated, all in-Guile uses changed.

* objects.c: various long -> scm_bits_t changes.
(scm_i_make_class_object): flags: unsigned long -> scm_ubits_t

* numbers.h (SCM_FIXNUM_BIT): deprecated, renamed to
SCM_I_FIXNUM_BIT.

* num2integral.i.c: new file, multiply included by numbers.c, used
to "templatize" the various integral <-> num conversion routines.

* numbers.c (scm_mkbig, scm_big2num, scm_adjbig, scm_normbig,
scm_copybig, scm_2ulong2big, scm_dbl2big, scm_big2dbl):
deprecated.
(scm_i_mkbig, scm_i_big2inum, scm_i_adjbig, scm_i_normbig,
scm_i_copybig, scm_i_short2big, scm_i_ushort2big, scm_i_int2big,
scm_i_uint2big, scm_i_long2big, scm_i_ulong2big, scm_i_bits2big,
scm_i_ubits2big, scm_i_size2big, scm_i_ptrdiff2big,
scm_i_long_long2big, scm_i_ulong_long2big, scm_i_dbl2big,
scm_i_big2dbl, scm_short2num, scm_ushort2num, scm_int2num,
scm_uint2num, scm_bits2num, scm_ubits2num, scm_size2num,
scm_ptrdiff2num, scm_num2short, scm_num2ushort, scm_num2int,
scm_num2uint, scm_num2bits, scm_num2ubits, scm_num2ptrdiff,
scm_num2size): new functions.

* modules.c (scm_module_reverse_lookup): i, n: int -> scm_bits_t.x

* load.c: change int -> size_t in various places (where the
variable is used to store a string length).
(search-path): call scm_done_free, not scm_done_malloc.

* list.c (scm_ilength): return a scm_bits_t, not long.
some other {int,long} -> scm_bits_t changes.

* hashtab.c: various [u]int -> scm_bits_t changes.
scm_ihashx_closure -> scm_ihashx_closure_t (and made a typedef).
(scm_ihashx): n: uint -> scm_bits_t
use scm_bits2num instead of scm_ulong2num.

* gsubr.c: various int -> scm_bits_t changes.

* gh_data.c (gh_scm2double): no loss of precision any more.

* gh.h (gh_str2scm): len: int -> size_t
(gh_{get,set}_substr): start: int -> scm_bits_t,
len: int -> size_t
(gh_<num>2scm): n: int -> scm_bits_t
(gh_*vector_length): return scm_[u]size_t, not unsigned long.
(gh_length): return scm_bits_t, not unsigned long.

* fports.h: type renaming:
scm_fport -> scm_fport_t
the old name is deprecated, all in-Guile uses changed.

* fports.c (fport_fill_input): count: int -> scm_bits_t
(fport_flush): init_size, remaining, count: int -> scm_bits_t

* debug.h (scm_lookup_cstr, scm_lookup_soft, scm_evstr): removed
those prototypes, as the functions they prototype don't exist.

* fports.c (default_buffer_size): int -> size_t
(scm_fport_buffer_add): read_size, write_size: int -> scm_bits_t
default_size: int -> size_t
(scm_setvbuf): csize: int -> scm_bits_t

* fluids.c (n_fluids): int -> scm_bits_t
(grow_fluids): old_length, i: int -> scm_bits_t
(next_fluid_num, scm_fluid_ref, scm_fluid_set_x): n: int ->
scm_bits_t
(scm_c_with_fluids): flen, vlen: int -> scm_bits_t

* filesys.c (s_scm_open_fdes): changed calls to SCM_NUM2LONG to
the new and shiny SCM_NUM2INT.

* extensions.c: extension -> extension_t (and made a typedef).

* eval.h (SCM_IFRAME): cast to scm_bits_t, not int.  just so
there are no nasty surprises if/when the various deeply magic tag
bits move somewhere else.

* eval.c: changed the locals used to store results of SCM_IFRAME,
scm_ilength and such to be of type scm_bits_t (and not int/long).
(iqq): depth, edepth: int -> scm_bits_t
(scm_eval_stack): int -> scm_bits_t
(SCM_CEVAL): various vars are not scm_bits_t instead of int.
(check_map_args, scm_map, scm_for_each): len: long -> scm_bits_t
i: int -> scm_bits_t

* environments.c: changed the many calls to scm_ulong2num to
scm_ubits2num.
(import_environment_fold): proc_as_ul: ulong -> scm_ubits_t

* dynwind.c (scm_dowinds): delta: long -> scm_bits_t

* debug.h: type renaming:
scm_debug_info -> scm_debug_info_t
scm_debug_frame -> scm_debug_frame_t
the old names are deprecated, all in-Guile uses changed.
(scm_debug_eframe_size): int -> scm_bits_t

* debug.c (scm_init_debug): use scm_c_define instead of the
deprecated scm_define.

* continuations.h: type renaming:
scm_contregs -> scm_contregs_t
the old name is deprecated, all in-Guile uses changed.
(scm_contregs_t.num_stack_items): size_t -> scm_bits_t
(scm_contregs_t.num_stack_items): ulong -> scm_ubits_t

* continuations.c (scm_make_continuation): change the type of
stack_size form long to scm_bits_t.

* ports.h: type renaming:
scm_port_rw_active -> scm_port_rw_active_t (and made a typedef)
scm_port -> scm_port_t
scm_ptob_descriptor -> scm_ptob_descriptor_t
the old names are deprecated, all in-Guile uses changed.
(scm_port_t.entry): int -> scm_bits_t.
(scm_port_t.line_number): int -> long.
(scm_port_t.putback_buf_size): int -> size_t.

* __scm.h (long_long, ulong_long): deprecated (they pollute the
global namespace and have little value besides that).
(SCM_BITS_LENGTH): new, is the bit size of scm_bits_t (i.e. of an
SCM handle).
(ifdef spaghetti): include sys/types.h and sys/stdtypes.h, if they
exist (for size_t & ptrdiff_t)
(scm_sizet): deprecated.

* Makefile.am (noinst_HEADERS): add num2integral.i.c
2001-05-24 00:50:51 +00:00
Rob Browning
61fa6c373f * numbers.h (scm_dblproc): deprecation expired - removed.
(SCM_UNEGFIXABLE): deprecation expired - removed.
  (SCM_FLOBUFLEN): deprecation expired - removed.
  (SCM_INEXP): deprecation expired - removed.
  (SCM_CPLXP): deprecation expired - removed.
  (SCM_REAL): deprecation expired - removed.
  (SCM_IMAG): deprecation expired - removed.
  (SCM_REALPART): deprecation expired - removed.
  (scm_makdbl): deprecation expired - removed.
  (SCM_SINGP): deprecation expired - removed.
  (SCM_NUM2DBL): deprecation expired - removed.
  (SCM_NO_BIGDIG): deprecation expired - removed.
2001-04-28 17:28:04 +00:00
Dirk Herrmann
e4b265d817 * Avoid redundant casting of argument numbers to char* and vice versa. 2001-04-10 07:57:05 +00:00
Marius Vollmer
caf08e652e * numbers.c (scm_num2ulong): Check that a bignum is positive
before looking at the magnitude.  Correctly check for overflow
during conversion.
(scm_num2long_long): Likewise.
(scm_num2ulong_long): New.
(ULONG_LONG_MAX): Define if not already defined.
* numbers.h: (scm_num2ulong_long): New prototype.
2001-03-15 20:04:41 +00:00
Dirk Herrmann
5c75b29f1d * Cleaned up some limits-definitions. 2001-01-18 13:35:45 +00:00
Dirk Herrmann
6a0476fd11 * SCM_SETCHARS deprecated. 2000-11-23 13:54:49 +00:00
Dirk Herrmann
405aaef932 * Eliminated all remaining calls to SCM_CHARS. 2000-09-26 21:53:49 +00:00
Mikael Djurfeldt
9ea8cdcb43 * numbers.h: Put #ifdef HAVE_LONG_LONGS around declarations using
the long_long type.  (Thanks to Bernard Urban.)
2000-06-20 14:57:45 +00:00