1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-05 06:50:21 +02:00
Commit graph

20 commits

Author SHA1 Message Date
Michael Gran
ba8477ecce Add char-set debugging function
* libguile/srfi-14.c (scm_sys_char_set_dump): new function

* libguile/srfi-14.h: declaration of scm_sys_char_set_dump
2009-09-03 08:29:45 -07:00
Michael Gran
719bb8cd5d Distinguish between all codepoints and designated codepoints in char-sets
* libguile/unidata_to_charset.pl (designated): renamed from full

* libguile/srfi-14.c (scm_char_set_designated): new char-set

* libguile/srfi-14.i.c (cs_designated): renamed from cs_full
2009-09-03 08:23:24 -07:00
Michael Gran
aa2cba9c88 Remove always-true range checks in scm_i_ucs_range_to_char_set
* libguile/srfi-14.c (scm_i_ucs_range_to_char_set): limits are always
  non-negative due to the type of the variable
2009-09-02 06:45:05 -07:00
Michael Gran
08ed805879 Unreachable code in charset set operator
* libguile/srfi-14.c (scm_i_charset_set): remove unreachable code
  in scm_i_charset_set
2009-09-02 06:28:55 -07:00
Michael Gran
aff31b0f99 Optimize charset union operator
* libguile/srfi-14.c (charsets_union): call scm_i_charset_set_range
  instead of setting characters one-by-one.
2009-09-02 06:28:47 -07:00
Michael Gran
f4cdfe6140 The charset complement operator should not include surrogates
* libguile/srfi-14.c (charsets_complement): skip over surrogates
  when making a charset complement
2009-09-02 06:28:42 -07:00
Michael Gran
bde543e88b char-set-filter! does not properly iterate over the charset
* libguile/srfi-14.c (scm_char_set_filter_x): iterate over
  codepoints
2009-09-02 06:28:35 -07:00
Michael Gran
91772d8f8a ucs-range->char-set should not store surrogates and has off-by-one error
* libguile/srfi-14.c (scm_i_ucs_range_to_char_set): new function that
  contains the functionality of ucs_range_to_char_set, fixes
  off-by-one, and doesn't store surroges
  (scm_ucs_range_to_char_set, scm_ucs_range_to_char_set_x): call
  scm_i_ucs_range_to_char_set
  (scm_i_charset_set_range): new helper function
2009-09-02 06:28:29 -07:00
Michael Gran
693e72891f char-set-any improperly unpacks charset data
* libguile/srfi-14.c (scm_char_set_any): unpack the charset correctly
2009-09-02 06:28:20 -07:00
Michael Gran
7165abeba8 char-set-xor! should modify the input parameter
char-set-xor! was not modifying its input parameter.  It isn't
technically required to do so by the spec, but, the other similar
functions do it.

* libguile/srfi-14.c (scm_char_set_xor_x): modify the input parameter
2009-09-02 06:28:11 -07:00
Michael Gran
24d23822ee Surrogate characters shouldn't be in charsets
* libguile/srfi-14.c (charsets_complement): use surrogate #defines instead
  of hardcoded numbers

* libguile/srfi-14.i.c (cs_full_ranges): remove surrogates from full
  charset

* libguile/unidata_to_charset.pl (full): test for surrogates
2009-08-29 00:01:06 -07:00
Michael Gran
d5ecf5797d Fix FUNC_NAME definitions and #endif in srfi-14.[ch]
* libguile/srfi-14.c: whitespace and FUNC_NAME fixes

* libguile/srfi-14.h: #endif comment
2009-08-27 18:52:53 -07:00
Michael Gran
f49dbcadf3 Unicode-capable srfi-14 charsets
* libguile/Makefile.am: distribute new files srfi-14.i.c and
  unidata_to_charset.pl

* chars.c (scm_c_upcase, scm_c_downcase): use unicode-enable toupper
  and tolower

* libguile/srfi-14.h (scm_t_char_range, scm_t_char_set): new structures
  to describe char-sets
  (scm_t_char_set_cursor): new structure to describe char-set-cursors
  (SCM_BITS_PER_LONG): removed
  (SCM_CHARSET_GET): calls function
  New declarations for scm_i_charset_get, scm_i_charset_set,
  scm_i_charset_unset, and scm_debug_char_set.

* test-suite/tests/srfi-14.test: new tests

* libguile/srfi-14.c (SCM_CHARSET_DATA): new macro
  (SCM_CHARSET_SET, SCM_CHARSET_UNSET): call function
  (BYTES_PER_CHARSET, LONGS_PER_CHARSET): removed
  (scm_i_charset_get, scm_i_charset_set, scm_i_charset_unset)
  (charsets_equal, charsets_leq, charsets_union)
  (charsets_intersection, charsets_complement, charsets_xor): new
  functions that are low-level charset operators
  (charset_print, charset_free): modified for new charset struct
  (charset_cursor_print, charset_cursor_free): new function
  (make_char_set, scm_char_set_p, scm_char_set_eq, scm_car_set_leq)
  (scm_char_set_hash, scm_char_set_cursor, scm_char_set_ref)
  (scm_char_set_cursor_next, scm_end_of_char_set_p, scm_char_set_fold)
  (scm_char_set_unfold, scm_char_set_unfold_x, scm_char_set_for_each)
  (scm_char_set_map, scm_char_set_copy, scm_char_set, scm_list_to_char_set)
  (scm_list_to_char_set_x, scm_string_to_char_set, scm_string_to_char_set_x)
  (scm_char_set_filter, scm_char_set_filter_x, scm_ucs_range_to_char_set)
  (scm_ucs_range_to_char_set_x, scm_to_char_set, scm_char_set_size)
  (scm_char_set_count, scm_char_set_to_list, scm_char_set_to_string)
  (scm_char_set_contains_p, scm_char_set_every, scm_char_set_any)
  (scm_char_set_adjoin, scm_char_set_delete, scm_char_set_adjoin_x)
  (scm_char_set_delete_x, scm_char_set_complement, scm_char_set_union)
  (scm_char_set_intersection, scm_char_set_difference, scm_char_set_xor)
  (scm_char_set_diff_plus_intersection, scm_char_set_complement_x)
  (scm_char_set_union_x, scm_char_set_intersection_x, scm_char_set_difference_x)
  (scm_char_set_xor_x, scm_char_set_diff_plus_intersection_x): modified
  to use new charset and charset-cursor data structures
  (CSET_BLANK_PRED, CSET_SYMBOL_PRED, CSET_PUNCT_PRED, CSET_LOWER_PRED)
  (CSET_UPPER_PRED, CSET_LETTER_PRED, CSET_DIGIT_PRED, CSET_WHITESPACE_PRED)
  (CSET_CONTROL_PRED, CSET_HEX_DIGIT_PRED, CSET_ASCII_PRED, CSET_LETTER_PRED)
  (CSET_LETTER_AND_DIGIT_PRED, CSET_PRINTING_PRED, CSET_TRUE_PRED)
  (CSET_FALSE_PRED): removed
  (scm_srfi_14_compute_char_sets): removed - too slow to iterate
  over all of unicode at startup
  (scm_debug_char_set) [SCM_CHARSET_DEBUG]: new function
2009-08-27 07:43:33 -07:00
Neil Jerram
53befeb700 Change Guile license to LGPLv3+
(Not quite finished, the following will be done tomorrow.
   module/srfi/*.scm
   module/rnrs/*.scm
   module/scripts/*.scm
   testsuite/*.scm
   guile-readline/*
)
2009-06-17 00:22:09 +01:00
Ludovic Courtès
6caac03c93 Changes from arch/CVS synchronization 2007-07-29 14:58:21 +00:00
Ludovic Courtès
a17d26545d Changes from arch/CVS synchronization 2006-09-20 12:48:45 +00:00
Kevin Ryde
2b829bbb3d merge from 1.8 branch 2006-04-17 00:05:42 +00:00
Marius Vollmer
92205699d0 The FSF has a new address. 2005-05-23 19:57:22 +00:00
Marius Vollmer
d2e53ed6f8 *** empty log message *** 2004-09-22 17:41:37 +00:00
Marius Vollmer
63181a97f5 * srfi-13.c, srfi-13.h, srfi-14.c, srfi-14.h: New files.
* strop.h, strop.c: Removed, they are now empty.
* Makefile.am: Updated for new and removed files.
2004-08-24 22:12:08 +00:00