mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-10 14:00:21 +02:00
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
This commit is contained in:
parent
0dcd7e6153
commit
719bb8cd5d
3 changed files with 20 additions and 6 deletions
|
@ -34,6 +34,18 @@
|
|||
/* Include the pre-computed standard charset data. */
|
||||
#include "libguile/srfi-14.i.c"
|
||||
|
||||
scm_t_char_range cs_full_ranges[] = {
|
||||
{0x0000, SCM_CODEPOINT_SURROGATE_START - 1}
|
||||
,
|
||||
{SCM_CODEPOINT_SURROGATE_END + 1, SCM_CODEPOINT_MAX}
|
||||
};
|
||||
|
||||
scm_t_char_set cs_full = {
|
||||
2,
|
||||
cs_full_ranges
|
||||
};
|
||||
|
||||
|
||||
#define SCM_CHARSET_DATA(charset) ((scm_t_char_set *) SCM_SMOB_DATA (charset))
|
||||
|
||||
#define SCM_CHARSET_SET(cs, idx) \
|
||||
|
@ -2025,6 +2037,7 @@ SCM scm_char_set_hex_digit;
|
|||
SCM scm_char_set_blank;
|
||||
SCM scm_char_set_ascii;
|
||||
SCM scm_char_set_empty;
|
||||
SCM scm_char_set_designated;
|
||||
SCM scm_char_set_full;
|
||||
|
||||
|
||||
|
@ -2102,6 +2115,7 @@ scm_init_srfi_14 (void)
|
|||
scm_char_set_blank = define_charset ("char-set:blank", &cs_blank);
|
||||
scm_char_set_ascii = define_charset ("char-set:ascii", &cs_ascii);
|
||||
scm_char_set_empty = define_charset ("char-set:empty", &cs_empty);
|
||||
scm_char_set_designated = define_charset ("char-set:designated", &cs_designated);
|
||||
scm_char_set_full = define_charset ("char-set:full", &cs_full);
|
||||
|
||||
#include "libguile/srfi-14.x"
|
||||
|
|
|
@ -6253,7 +6253,7 @@ scm_t_char_set cs_empty = {
|
|||
cs_empty_ranges
|
||||
};
|
||||
|
||||
scm_t_char_range cs_full_ranges[] = {
|
||||
scm_t_char_range cs_designated_ranges[] = {
|
||||
{0x0000, 0x0377}
|
||||
,
|
||||
{0x037a, 0x037e}
|
||||
|
@ -7145,7 +7145,7 @@ scm_t_char_range cs_full_ranges[] = {
|
|||
{0x100000, 0x10fffd}
|
||||
};
|
||||
|
||||
scm_t_char_set cs_full = {
|
||||
scm_t_char_set cs_designated = {
|
||||
445,
|
||||
cs_full_ranges
|
||||
cs_designated_ranges
|
||||
};
|
||||
|
|
|
@ -254,8 +254,8 @@ sub empty {
|
|||
return 0;
|
||||
}
|
||||
|
||||
# Full -- All characters except for the surrogates
|
||||
sub full {
|
||||
# Designated -- All characters except for the surrogates
|
||||
sub designated {
|
||||
my($codepoint, $name, $category, $uppercase, $lowercase)= @_;
|
||||
if ($category =~ (/Cs/)) {
|
||||
return 0;
|
||||
|
@ -387,7 +387,7 @@ compute "symbol";
|
|||
compute "blank";
|
||||
compute "ascii";
|
||||
compute "empty";
|
||||
compute "full";
|
||||
compute "designated";
|
||||
|
||||
close $in;
|
||||
close $out;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue