]> git.sur5r.net Git - openldap/commitdiff
Fix for greater than 4-digit CompositionExclusions
authorHoward Chu <hyc@openldap.org>
Wed, 2 Jun 2004 02:17:04 +0000 (02:17 +0000)
committerHoward Chu <hyc@openldap.org>
Wed, 2 Jun 2004 02:17:04 +0000 (02:17 +0000)
libraries/liblunicode/ucdata/ucgendat.c
libraries/liblunicode/ucdata/uctable.h

index 7403a1dd81a7a11a3d92db1779ba9e80545c1b15..8c2690be2584373b439a33b008c5abe055638b8a 100644 (file)
@@ -140,7 +140,7 @@ static ac_uint4 kdecomps_size;
  */
 #define COMPEX_SET(c) (compexs[(c) >> 5] |= (1 << ((c) & 31)))
 #define COMPEX_TEST(c) (compexs[(c) >> 5] & (1 << ((c) & 31)))
-static ac_uint4 compexs[2048];
+static ac_uint4 compexs[8192];
 
 /*
  * Struct for holding a composition pair, and array of composition pairs
@@ -1204,10 +1204,11 @@ cmpcomps(const void *v_comp1, const void *v_comp2)
 static void
 read_compexdata(FILE *in)
 {
-    ac_uint2 i, code;
+    ac_uint2 i;
+    ac_uint4 code;
     char line[512], *s;
 
-    (void) memset((char *) compexs, 0, sizeof(ac_uint4) << 11);
+    (void) memset((char *) compexs, 0, sizeof(compexs));
 
     while (fgets(line, sizeof(line), in)) {
        if( (s=strchr(line, '\n')) ) *s = '\0';
@@ -1218,10 +1219,11 @@ read_compexdata(FILE *in)
            continue;
 
        /*
-         * Collect the code.  Assume max 4 digits
+         * Collect the code.  Assume max 6 digits
          */
 
-       for (s = line, i = code = 0; *s != '#' && i < 4; i++, s++) {
+       for (s = line, i = code = 0; *s != '#' && i < 6; i++, s++) {
+           if (isspace(*s)) break;
             code <<= 4;
             if (*s >= '0' && *s <= '9')
                code += *s - '0';
index b6d0098bb5fd4f887a07090963c9e918b18588e4..6aef2322f23d9614cfbc584c13ca8900ddfd8f6c 100644 (file)
@@ -3004,7 +3004,7 @@ static const ac_uint4 _uccase_map[] = {
        0x000001f2, 0x000001f1, 0x000001f3
 };
 
-static const ac_uint4 _uccomp_size = 3728;
+static const ac_uint4 _uccomp_size = 3684;
 
 static const ac_uint4 _uccomp_data[] = {
        0x0000226e, 0x00000002, 0x0000003c, 0x00000338,
@@ -3927,18 +3927,7 @@ static const ac_uint4 _uccomp_data[] = {
        0x000030f8, 0x00000002, 0x000030f0, 0x00003099,
        0x000030f9, 0x00000002, 0x000030f1, 0x00003099,
        0x000030fa, 0x00000002, 0x000030f2, 0x00003099,
-       0x000030fe, 0x00000002, 0x000030fd, 0x00003099,
-       0x0001d15e, 0x00000002, 0x0001d157, 0x0001d165,
-       0x0001d15f, 0x00000002, 0x0001d158, 0x0001d165,
-       0x0001d160, 0x00000002, 0x0001d15f, 0x0001d16e,
-       0x0001d161, 0x00000002, 0x0001d15f, 0x0001d16f,
-       0x0001d162, 0x00000002, 0x0001d15f, 0x0001d170,
-       0x0001d163, 0x00000002, 0x0001d15f, 0x0001d171,
-       0x0001d1bb, 0x00000002, 0x0001d1b9, 0x0001d165,
-       0x0001d1bc, 0x00000002, 0x0001d1ba, 0x0001d165,
-       0x0001d1bd, 0x00000002, 0x0001d1bb, 0x0001d16e,
-       0x0001d1bf, 0x00000002, 0x0001d1bb, 0x0001d16f,
-       0x0001d1be, 0x00000002, 0x0001d1bc, 0x0001d16e
+       0x000030fe, 0x00000002, 0x000030fd, 0x00003099
 };
 
 static const ac_uint4 _ucdcmp_size = 3848;