is known to be #f if no entry is found. Thus, use !SCM_FALSEP
instead of SCM_NIMP to test for that case.
* strings.h (SCM_SET_STRING_LENGTH): Cast the length to
scm_t_bits instead of long.
whether the integral type fits in a fixnum, not the compiler.
This removes a spurious compiler warning. Also, honor the
NO_PREPRO_MAGIC flag to suppress any preprocessor tests. This is
needed for `long long's.
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.
(coop_create): Set mother_awake_p before creating or signalling
mother; wait until mother is going to sleep before returning.
(mother): Reset mother_awake_p before going to sleep.
protected_objects is now protected from garbage collection using
scm_gc_register_root instead of scm_permanent_object.
(get_option_setting): New static function that computes an option
setting as it was formerly done in the function scm_options.
(get_documented_option_setting): New static function that
returns option documentation as it was formerly done in the
function scm_options. Note that documentation C strings are no
longer precomputed into SCM objects. Instead, they are converted
into SCM strings every time get_documented_option_setting is
called.
(change_option_setting): New static functions that modifies the
option setting as it was formerly done in the function
scm_options. The function is now exception safe, i. e. won't
cause a memory leak when interrupted. Further, only non-immediate
option values are added to the protection list.
(scm_options): This function now has only the purpose to dispatch
to to get_option_setting, get_documented_option_setting or
change_option_setting, depending on the arguments given to
scm_options.
(scm_init_opts): Don't convert documentation C strings into SCM
strings. Further, don't protect any object values: They _must_
be immediate values, otherwise there is no guarantee that they
have not been collected before anyway.
* options.[ch] (scm_t_option): Made type unsigned, name into a
constant char* and val into a scm_t_bits type.
(scm_options, scm_init_opts): The number of options is guaranteed
to be larger or equal to zero. Thus, the type is changed to
unsigned.
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.
* num2float.i.c: New file, multiply included by numbers.c, used
to "templatize" the float <-> num conversion routines.
* numbers.c: New functions: scm_num2float, scm_float2num,
scm_num2double, scm_double2num.
(scm_char_set_hash): val needs to be long, not just unsigned.
(scm_char_set): need 1L, not just 1 in "<<".
(scm_list_to_char_set): need 1L, not just 1 in "<<".
(scm_list_to_char_set_x): need 1L, not just 1 in "<<".
(scm_list_to_char_set_x): FUNC_NAME was wrong - added a _x.
(scm_string_to_char_set): string length var needed to be
scm_sizet, not int.
(scm_string_to_char_set): need 1L, not just 1 in "<<".
(scm_string_to_char_set_x): string length var needed to be
scm_sizet, not int.
(scm_string_to_char_set_x): need 1L, not just 1 in "<<".
(scm_char_set_filter): need 1L, not just 1 in "<<".
(scm_char_set_filter_x): need 1L, not just 1 in "<<".
(scm_ucs_range_to_char_set): need 1L, not just 1 in "<<".
(scm_ucs_range_to_char_set_x): need 1L, not just 1 in "<<".
(scm_char_set_adjoin): need 1L, not just 1 in "<<".
(scm_char_set_delete): need 1L, not just 1 in "<<".
(scm_char_set_adjoin_x): need 1L, not just 1 in "<<".
(scm_char_set_delete_x): need 1L, not just 1 in "<<".
(scm_major_version): support integer *_VERSION macros.
(scm_minor_version): support integer *_VERSION macros.
(scm_micro_version): support integer *_VERSION macros.
(scm_version): support integer *_VERSION macros.