summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Gran <spk121@yahoo.com>2009-09-03 08:23:24 -0700
committerMichael Gran <spk121@yahoo.com>2009-09-03 08:23:24 -0700
commit719bb8cd5db10aeb0dad1c16227d6b6abc40e8b6 (patch)
treecddacfe129952ab5f16ae8fadb49b95f9f7179ad
parent0dcd7e61534c9d1e33de904196cb505daf320a42 (diff)
downloadguile-719bb8cd5db10aeb0dad1c16227d6b6abc40e8b6.tar.gz
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
-rw-r--r--libguile/srfi-14.c14
-rw-r--r--libguile/srfi-14.i.c6
-rwxr-xr-xlibguile/unidata_to_charset.pl6
3 files changed, 20 insertions, 6 deletions
diff --git a/libguile/srfi-14.c b/libguile/srfi-14.c
index 33b508d21..822673b92 100644
--- a/libguile/srfi-14.c
+++ b/libguile/srfi-14.c
@@ -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"
diff --git a/libguile/srfi-14.i.c b/libguile/srfi-14.i.c
index d92b4d73e..fd537daf3 100644
--- a/libguile/srfi-14.i.c
+++ b/libguile/srfi-14.i.c
@@ -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
};
diff --git a/libguile/unidata_to_charset.pl b/libguile/unidata_to_charset.pl
index 61c8d100e..d086c8ec4 100755
--- a/libguile/unidata_to_charset.pl
+++ b/libguile/unidata_to_charset.pl
@@ -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;