[PATCH 3/3] make_unicode: Mark tab and nbsp as not blank in wine_wctype_table.

Jeff Smith whydoubt at gmail.com
Wed Jan 1 01:46:16 CST 2020


Keep them marked as blank in wctype_table (used by IsCharBlankW) though.

Signed-off-by: Jeff Smith <whydoubt at gmail.com>
---
 dlls/ucrtbase/tests/misc.c | 14 ++++++--------
 libs/port/wctype.c         |  4 ++--
 tools/make_unicode         |  5 ++++-
 3 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/dlls/ucrtbase/tests/misc.c b/dlls/ucrtbase/tests/misc.c
index 6b5977c4d8..2accee2dac 100644
--- a/dlls/ucrtbase/tests/misc.c
+++ b/dlls/ucrtbase/tests/misc.c
@@ -649,8 +649,8 @@ static void test_isblank(void)
     for(c = 0; c <= 0xffff; c++) {
         if(c == '\t' || c == ' ' || c == 0x3000 || c == 0xfeff) {
             if(c == '\t') {
-                todo_wine ok(!p_iswctype(c, _BLANK), "tab shouldn't be blank\n", c);
-                todo_wine ok(!p__iswctype_l(c, _BLANK, NULL), "tab shouldn't be blank\n");
+                ok(!p_iswctype(c, _BLANK), "tab shouldn't be blank\n", c);
+                ok(!p__iswctype_l(c, _BLANK, NULL), "tab shouldn't be blank\n");
             } else {
                 ok(p_iswctype(c, _BLANK), "%d should be blank\n", c);
                 ok(p__iswctype_l(c, _BLANK, NULL), "%d should be blank\n", c);
@@ -658,12 +658,10 @@ static void test_isblank(void)
             ok(p_iswblank(c), "%d should be blank\n", c);
             ok(p__iswblank_l(c, NULL), "%d should be blank\n", c);
         } else {
-            todo_wine_if(c == 0xa0) {
-                ok(!p_iswctype(c, _BLANK), "%d shouldn't be blank\n", c);
-                ok(!p__iswctype_l(c, _BLANK, NULL), "%d shouldn't be blank\n", c);
-                ok(!p_iswblank(c), "%d shouldn't be blank\n", c);
-                ok(!p__iswblank_l(c, NULL), "%d shouldn't be blank\n", c);
-            }
+            ok(!p_iswctype(c, _BLANK), "%d shouldn't be blank\n", c);
+            ok(!p__iswctype_l(c, _BLANK, NULL), "%d shouldn't be blank\n", c);
+            ok(!p_iswblank(c), "%d shouldn't be blank\n", c);
+            ok(!p__iswblank_l(c, NULL), "%d shouldn't be blank\n", c);
         }
     }
 }
diff --git a/libs/port/wctype.c b/libs/port/wctype.c
index 5439e7db57..8c4dff4479 100644
--- a/libs/port/wctype.c
+++ b/libs/port/wctype.c
@@ -40,7 +40,7 @@ const unsigned short wine_wctype_table[17152] =
     0x2800, 0x1200, 0x3d00, 0x3e00, 0x3f00, 0x4000, 0x4100, 0x4200,
     /* values */
     0xe220, 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, 0xe220,
-    0xe220, 0x9268, 0x8228, 0x9228, 0xa228, 0x8228, 0xe220, 0xe220,
+    0xe220, 0x9228, 0x8228, 0x9228, 0xa228, 0x8228, 0xe220, 0xe220,
     0xe220, 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, 0xe220,
     0xe220, 0xe220, 0xe220, 0xe220, 0x8220, 0x8220, 0x8220, 0x9220,
     0xa248, 0xb210, 0xb210, 0x5210, 0x5210, 0x5210, 0xb210, 0xb210,
@@ -59,7 +59,7 @@ const unsigned short wine_wctype_table[17152] =
     0xe220, 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, 0xe220,
     0xe220, 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, 0xe220,
     0xe220, 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, 0xe220, 0xe220,
-    0x7248, 0xb210, 0x5210, 0x5210, 0x5210, 0x5210, 0xb210, 0xb210,
+    0x7208, 0xb210, 0x5210, 0x5210, 0x5210, 0x5210, 0xb210, 0xb210,
     0xb210, 0xb210, 0x1310, 0xb210, 0xb210, 0xe230, 0xb210, 0xb210,
     0x5210, 0x5210, 0x3214, 0x3214, 0xb210, 0x1312, 0xb210, 0xb210,
     0xb210, 0x3214, 0x1310, 0xb210, 0xb210, 0xb210, 0xb210, 0xb210,
diff --git a/tools/make_unicode b/tools/make_unicode
index 1aaeff38a4..fe426b1315 100755
--- a/tools/make_unicode
+++ b/tools/make_unicode
@@ -299,7 +299,7 @@ my %special_categories =
     "xdigit" => [ ord('0')..ord('9'),ord('A')..ord('F'),ord('a')..ord('f'),
                   0xff10..0xff19, 0xff21..0xff26, 0xff41..0xff46 ],
     "space"  => [ 0x09..0x0d, 0x85 ],
-    "blank"  => [ 0x09, 0x20, 0xa0, 0x3000, 0xfeff ],
+    "blank"  => [ 0x20, 0x3000, 0xfeff ],
     "cntrl"  => [ 0x070f, 0x200c, 0x200d,
                   0x200e, 0x200f, 0x202a, 0x202b, 0x202c, 0x202d, 0x202e,
                   0x206a, 0x206b, 0x206c, 0x206d, 0x206e, 0x206f, 0xfeff,
@@ -2255,6 +2255,9 @@ sub dump_string_type_table($)
 
     my @table = @category_table;
 
+    $table[0x09] |= $ctype{"blank"};
+    $table[0xa0] |= $ctype{"blank"};
+
     # add the direction in the high 4 bits of the category
     for (my $i = 0; $i < 65536; $i++)
     {
-- 
2.23.0




More information about the wine-devel mailing list