Browse Source

Support ISblank properly

Eric Andersen 22 years ago
parent
commit
acda8279a2
2 changed files with 4 additions and 0 deletions
  1. 3 0
      extra/locale/gen_ctype_from_glibc.c
  2. 1 0
      libc/misc/locale/_locale.h

+ 3 - 0
extra/locale/gen_ctype_from_glibc.c

@@ -71,6 +71,7 @@ bbits_t basic_bits[] =
   {ISpunct , "ISpunct" },
   {ISalpha , "ISalpha" },
   {ISxdigit, "ISxdigit"},
+  {ISblank,  "ISblank"},
   {0, NULL}
 };
 
@@ -257,6 +258,8 @@ Defaults:\n\
 		x2type[i] |= ISpunct;
 	if(isxdigit(i))
 		x2type[i] |= ISxdigit;
+	if(isblank(i))
+		x2type[i] |= ISblank;
 	x2trans[i] = i;
 	if(toupper(x2trans[i]) != x2trans[i])
 		x2trans[i] = toupper(x2trans[i]);

+ 1 - 0
libc/misc/locale/_locale.h

@@ -17,6 +17,7 @@ enum
   ISpunct  = ISbit (5),        /* 32  Punctuation.       */
   ISalpha  = ISbit (6),        /* 64  Alphabetic.        */
   ISxdigit = ISbit (7),        /* 128 Hexnumeric.        */
+  ISblank  = ISbit (8),        /* 256 Blank.             */
 };
 
 extern const unsigned char *_uc_collate_b;