1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-03 13:20:26 +02:00
Commit graph

4609 commits

Author SHA1 Message Date
Rob Browning
63ce14e776 (scm_resolv_error): don't cause an exception while
trying to throw an exception -- call scm_misc_error with correct
arguments.  The previous arguments needed a format escape that
wasn't in any of the format strings.
2004-08-07 03:48:17 +00:00
Rob Browning
a00eaf19f8 *** empty log message *** 2004-08-07 03:48:03 +00:00
Kevin Ryde
f8a8200bc0 Amend #if and comments for cmp_d and get_d about unreleased gmp, don't
know when or as what version number it will come out.
2004-08-06 01:26:26 +00:00
Kevin Ryde
8f094b9720 *** empty log message *** 2004-08-06 01:08:37 +00:00
Kevin Ryde
4d6ed8fe44 (scm_array_fill_x): For byvect char fill, force signed char
so as not to depend on signedness of plain char.  For byvect range
check, throw out-of-range rather than wrong-type-arg.
2004-08-06 01:04:05 +00:00
Kevin Ryde
bcb88c93fa *** empty log message *** 2004-08-06 00:29:13 +00:00
Kevin Ryde
bebf6a08af (scm_uniform_vector_ref, scm_array_set_x): For byvect, force
signed byte range checks by using scm_to_schar and scm_from_schar,
don't want to depend on signedness of C char.
2004-08-06 00:21:13 +00:00
Kevin Ryde
99de794f0d *** empty log message *** 2004-08-05 01:19:35 +00:00
Kevin Ryde
37eb673bc6 (scm_copy_file): Use fstat on the input fd rather than
stat on the filename, to be certain a file rename can't mean we get
info on one filesystem object but open another.  This fstat usage is
similar to Emacs copy-file.
2004-08-05 01:02:58 +00:00
Kevin Ryde
29e6112441 *** empty log message *** 2004-08-05 00:46:34 +00:00
Kevin Ryde
7305dd202d Update docstrings per doc/ref/api-scheduling.texi. 2004-08-05 00:40:26 +00:00
Kevin Ryde
f070ba1332 (scm_system_star): Use scm_from_int on SIGINT and SIGQUIT,
since that's what those values are.
2004-08-05 00:33:58 +00:00
Kevin Ryde
9bebea882a (scm_try_arbiter): Use scm_i_misc_mutex instead of
SCM_DEFER_INTS.
(scm_release_arbiter): Use scm_i_misc_mutex so return value can be
guaranteed if multiple threads compete to unlock.
2004-08-05 00:20:13 +00:00
Kevin Ryde
fcc3adc2f9 (scm_setgroups): Enhance docstring, per doc/ref/posix.texi. 2004-08-05 00:19:14 +00:00
Marius Vollmer
7241f21353 *** empty log message *** 2004-08-03 17:24:44 +00:00
Marius Vollmer
5ad8c0c95b * num2integral.i.c, num2float.i.c: Removed.
* Makefile.am (noinst_HEADERS): Updated.
2004-08-03 17:24:28 +00:00
Marius Vollmer
96d8c21757 *** empty log message *** 2004-08-03 17:16:29 +00:00
Marius Vollmer
7a72bb4181 (scm_make_complex): Discouraged by moving to discouraged.h and
discouraged.c.  Replaced all uses with scm_c_make_rectangular.
2004-08-03 17:13:16 +00:00
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
f9656a9f82 *** empty log message *** 2004-08-03 15:56:49 +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
759aa8f9e0 *** empty log message *** 2004-08-03 15:07:37 +00:00
Marius Vollmer
d9a67fc441 (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.
2004-08-03 15:06:12 +00:00
Marius Vollmer
8672c728f0 (scm_init_guile_1): Call scm_i_init_discouraged. 2004-08-03 15:04:48 +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
b9bd8526f0 * 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_*.  Changed all uses
to the new scm_from_* and scm_to_* functions.
2004-08-02 16:14:04 +00:00
Marius Vollmer
531bf3e6a8 *** empty log message *** 2004-08-02 16:13:29 +00:00
Marius Vollmer
dee91fb9d4 * gen-scmconfig.h.in (SCM_I_GSC_ENABLE_DISCOURAGED): New.
* gen-scmconfig.c (SCM_ENABLE_DISCOURAGED): Emit based on above.
2004-08-02 16:10:17 +00:00
Marius Vollmer
4f1d009fc1 * discouraged.h, discouraged.c: New files. 2004-08-02 15:57:31 +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
385609b992 (SCM_EVALIM, SCM_EVALIM2, SCM_XEVAL, SCM_XEVALCAR): Renamed to SCM_I_*
in order to avoid collisions with the versions defined in
deprecated.h.
2004-08-02 15:48:58 +00:00
Kevin Ryde
5ec82e960f *** empty log message *** 2004-08-02 00:37:57 +00:00
Kevin Ryde
ed7ba6d12f (SCM_DEFER_INTS, SCM_ALLOW_INTS): Add comments about past
and current usage and migration.
2004-08-02 00:36:49 +00:00
Kevin Ryde
58f2898942 *** empty log message *** 2004-07-31 01:28:49 +00:00
Kevin Ryde
01046395ac (scm_copy_file): Avoid fd leak when destination file
cannot be opened.
2004-07-31 01:19:26 +00:00
Kevin Ryde
3572cd6b8f * error.c (scm_strerror): Use scm_i_misc_mutex around strerror since
it's not thread safe.
	(scm_syserror): Use scm_strerror rather than SCM_I_STRERROR, to take
	advantage of this.
	* fports.c (scm_open_file): Use scm_strerror likewise.
	* filesys.c (scm_stat, scm_lstat): Ditto.
2004-07-31 01:13:29 +00:00
Kevin Ryde
fd08c23657 * error.c (scm_strerror): Use scm_i_misc_mutex around strerror since
it's not thread safe.
	(scm_syserror): Use scm_strerror rather than SCM_I_STRERROR, to take
	advantage of this.
	* fports.c (scm_open_file): Use scm_strerror likewise.
2004-07-31 01:12:24 +00:00
Kevin Ryde
4af3c6f17c (scm_strerror): Use scm_i_misc_mutex around strerror since
it's not thread safe.
(scm_syserror): Use scm_strerror rather than SCM_I_STRERROR, to take
advantage of this.
2004-07-31 01:11:15 +00:00
Kevin Ryde
7426a638b7 (scm_gensym): Use scm_i_misc_mutex around gensym_counter
update, for thread safety.
(gensym_counter): Move into scm_gensym which is its only user.
(scm_init_symbols): No need to explicitly initialize gensym_counter.
2004-07-31 01:08:20 +00:00
Marius Vollmer
51fdb325b0 *** empty log message *** 2004-07-29 15:49:04 +00:00
Marius Vollmer
4627df5a6b * gen-scmconfig.c (SCM_SIZEOF_INTMAX, SCM_SIZEOF_SIZE_T): New. 2004-07-29 15:48:54 +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
03696aab8c *** empty log message *** 2004-07-29 14:04:02 +00:00
Marius Vollmer
e88d45aa73 * __scm.h (SCM_I_UTYPE_MAX, SCM_I_TYPE_MAX, SCM_I_TYPE_MIN,
SCM_I_SIZE_MAX, SCM_I_SSIZE_MIN, SCM_I_SSIZE_MAX): New.

* __scm.h, gen-scmconfig.c (SCM_I_LLONG_MAX, SCM_I_LLONG_MIN,
SCM_I_ULLONG_MAX, SCM_T_INT8_MIN, SCM_T_INT8_MAX, SCM_T_UINT8_MAX,
SCM_T_INT16_MIN, SCM_T_INT16_MAX, SCM_T_UINT16_MAX,
SCM_T_INT32_MIN, SCM_T_INT32_MAX, SCM_T_UINT32_MAX,
SCM_T_INT64_MIN, SCM_T_INT64_MAX, SCM_T_UINT64_MAX,
SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX, SCM_T_UINTMAX_MAX): Moved
definition into __scm.h, using new SCM_I_TYPE_MIN, etc.
2004-07-29 14:03:40 +00:00
Marius Vollmer
d0fefc7de5 Removed SCM_I_GSC_*_LIMITS macros, they are no longer used. 2004-07-29 14:03:30 +00:00
Marius Vollmer
9d3ebce493 Added docs. 2004-07-29 13:54:15 +00:00
Marius Vollmer
7ff8176bdb (noinst_HEADERS): Added conv-integer.i.c and conv-uinteger.i.c. 2004-07-29 13:43:49 +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
Kevin Ryde
1f15779e06 *** empty log message *** 2004-07-29 00:13:22 +00:00
Kevin Ryde
e8a590639c (scm_ttyname): Use scm_i_misc_mutex for thread safety. 2004-07-29 00:12:25 +00:00