瀏覽代碼

Revert Erik's changes... they were broken since there weren't enough
bits for the extra ISblank flag. Instead, hardwire isblank() to not
depend on locale for now. At least it will work for space and tab
in the immenent release. This will all be blown away for the next
release anyway, as I should be committing my new stuff in the next
day or two.

Manuel Novoa III 23 年之前
父節點
當前提交
bc0bc39645
共有 4 個文件被更改,包括 10 次插入24 次删除
  1. 0 3
      extra/locale/gen_ctype_from_glibc.c
  2. 8 18
      libc/misc/ctype/ctype.c
  3. 2 2
      libc/misc/ctype/ctype_C.c
  4. 0 1
      libc/misc/locale/_locale.h

+ 0 - 3
extra/locale/gen_ctype_from_glibc.c

@@ -71,7 +71,6 @@ bbits_t basic_bits[] =
   {ISpunct , "ISpunct" },
   {ISalpha , "ISalpha" },
   {ISxdigit, "ISxdigit"},
-  {ISblank,  "ISblank"},
   {0, NULL}
 };
 
@@ -258,8 +257,6 @@ 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]);

+ 8 - 18
libc/misc/ctype/ctype.c

@@ -41,6 +41,14 @@ toascii( int c )
 }
 #endif
 
+#ifdef L_isblank
+#undef isblank
+int
+isblank( int c )
+{
+    return ((c == ' ') || (c == '\t'));
+}
+#endif
 
 /* locale depended */
 #ifndef __UCLIBC_HAS_LOCALE__
@@ -118,15 +126,6 @@ isspace( int c )
 }
 #endif
 
-#ifdef L_isblank
-#undef isblank
-int
-isblank( int c )
-{
-    return (c == ' ' || c == '\t');
-}
-#endif
-
 #ifdef L_isupper
 #undef isupper
 int
@@ -275,15 +274,6 @@ isspace( int c )
 }
 #endif
 
-#ifdef L_isblank
-#undef isblank
-int
-isblank( int c )
-{
-    return _UC_ISCTYPE(c, ISblank);
-}
-#endif
-
 #ifdef L_isupper
 #undef isupper
 int

+ 2 - 2
libc/misc/ctype/ctype_C.c

@@ -8,7 +8,7 @@ const unsigned char _uc_ctype_b_C[LOCALE_BUF_SIZE] = {
 	/* 0x06, 6, 06 */	IScntrl,
 	/* 0x07, 7, 07 */	IScntrl,
 	/* 0x08, 8, 010 */	IScntrl,
-	/* 0x09, 9, 011 */	IScntrl|ISspace|ISblank,
+	/* 0x09, 9, 011 */	IScntrl|ISspace,
 	/* 0x0a, 10, 012 */	IScntrl|ISspace,
 	/* 0x0b, 11, 013 */	IScntrl|ISspace,
 	/* 0x0c, 12, 014 */	IScntrl|ISspace,
@@ -31,7 +31,7 @@ const unsigned char _uc_ctype_b_C[LOCALE_BUF_SIZE] = {
 	/* 0x1d, 29, 035 */	IScntrl,
 	/* 0x1e, 30, 036 */	IScntrl,
 	/* 0x1f, 31, 037 */	IScntrl,
-	/* 0x20, 32, 040 */	ISprint|ISspace|ISblank,
+	/* 0x20, 32, 040 */	ISprint|ISspace,
 	/* 0x21, 33, 041 */	ISprint|ISpunct,
 	/* 0x22, 34, 042 */	ISprint|ISpunct,
 	/* 0x23, 35, 043 */	ISprint|ISpunct,

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

@@ -17,7 +17,6 @@ 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;