srfi-11.scm, srfi-14.scm, srfi-16.scm: Move module the system
directives `export', `export-syntax', `re-export' and
`re-export-syntax' into the `define-module' form. This is the
recommended way of exporting bindings.
(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 "<<".
accounting for the (char-set-union cs2...) in the spec. i.e.,
(char-set-diff+intersection a) -> copy-of-a, empty-set
and the following are equivalent:
(char-set-diff+intersection a (char-set #\a) (char-set #\b))
(char-set-diff+intersection a (char-set #\a #\b))
(scm_char_set_xor_x): disabled the side-effecting code, since it
gives inconsistent results to scm_char_set_xor for the case
(char-set-xor! a a a).
(scm_char_set_diff_plus_intersection_x): added cs2 argument, since
two arguments are compulsory in final spec. also similar changes
as for scm_char_set_diff_plus_intersection.
* srfi-14.h (scm_char_set_diff_plus_intersection_x): added cs2.
they occur in exactly one argument, but were included if they
occured an odd number of times >= 3, e.g, in (char-set-xor a a a)
where a is (char-set #\a). fix it with a "mask" array.
side. Bit sets were handled wrong because I couldn't tell bit
counts from byte counts. Also, the bit array should be 256 / 8
bytes long. Thank you, Gary!
Removed unnecessary protoype for scm_char_set_copy.
* srfi-14.c (scm_char_set_ref, scm_char_set_cursor_next,
scm_end_of_char_set_p): reject negative cursor values.
(scm_list_to_char_set, scm_list_to_char_set_x): when reporting
type error in list component, omit the position (was always 1).
calculating based on garbage.
(scm_char_set_eq, scm_char_set_leq): fix argument number in error
reporting: wasn't incremented due to macro coding.
(scm_char_set): report argument number in error reporting: was
hard coded to 1. remove a couple of local variables.
return #t instead of giving wrong-number-of-arguments . take a
single "rest" argument. use memcmp instead of a loop to compare
the values.
srfi-14.h: update the declaration.
delete!, assoc): don't export until the new bindings have been
created. otherwise "export" thinks they are being re-exported and
a deprecation warning is produced.