* libc/ctype/ctype_.c (_CTYPE_DATA_0_127): Remove _B flag from TAB.

* libc/ctype/ctype_cp.h: Mark non-cased letters in tables for codepages
	720, 862, 874, 1255, and 1256 to _U|_L.  Fix a couple of incorrect
	class mappings.
	* libc/ctype/ctype_iso.h: Mark non-cased letters in ISO-8859 tables
	6, 8, and 11 to _U|_L.  Fix a couple of incorrect class mappings.
	* libc/ctype/isblank.c (isblank): Special case TAB.
	* libc/ctype/islower.c (islower): Check explicitely for _L flag only
	in (_U|_L).
	* libc/ctype/isupper.c (isupper): Ditto, but check for _U flag.
	* libc/include/ctype.h (islower): Same in macro.
	(isupper): Ditto.
	(isblank): Special case TAB.  Redefine macro for GCC only.
This commit is contained in:
Corinna Vinschen 2009-04-09 10:37:58 +00:00
parent 2d647173bb
commit a29a769342
8 changed files with 109 additions and 91 deletions

View File

@ -1,3 +1,19 @@
2009-04-09 Corinna Vinschen <corinna@vinschen.de>
* libc/ctype/ctype_.c (_CTYPE_DATA_0_127): Remove _B flag from TAB.
* libc/ctype/ctype_cp.h: Mark non-cased letters in tables for codepages
720, 862, 874, 1255, and 1256 to _U|_L. Fix a couple of incorrect
class mappings.
* libc/ctype/ctype_iso.h: Mark non-cased letters in ISO-8859 tables
6, 8, and 11 to _U|_L. Fix a couple of incorrect class mappings.
* libc/ctype/isblank.c (isblank): Special case TAB.
* libc/ctype/islower.c (islower): Check explicitely for _L flag only
in (_U|_L).
* libc/ctype/isupper.c (isupper): Ditto, but check for _U flag.
* libc/include/ctype.h (islower): Same in macro.
(isupper): Ditto.
(isblank): Special case TAB. Redefine macro for GCC only.
2009-04-09 Corinna Vinschen <corinna@vinschen.de>
* libc/stdlib/local.h (__mbtowc): Declare extern.

View File

@ -39,7 +39,7 @@ static char sccsid[] = "@(#)ctype_.c 5.6 (Berkeley) 6/1/90";
#define _CTYPE_DATA_0_127 \
_C, _C, _C, _C, _C, _C, _C, _C, \
_C, _B|_C|_S, _C|_S, _C|_S, _C|_S, _C|_S, _C, _C, \
_C, _C|_S, _C|_S, _C|_S, _C|_S, _C|_S, _C, _C, \
_C, _C, _C, _C, _C, _C, _C, _C, \
_C, _C, _C, _C, _C, _C, _C, _C, \
_S|_B, _P, _P, _P, _P, _P, _P, _P, \

View File

@ -22,17 +22,17 @@
0, 0, _L, _L, 0, _L, 0, _L, \
_L, _L, _L, _L, _L, 0, 0, 0, \
0, _P, _P, _L, _P, _P, _L, _L, \
_L, _L, _L, _L, _L, _L, _L, _L, \
0, _L, _L, _L, _L, _L, _L, _L, \
_L, _L, _L, _L, _L, _L, _P, _P, \
_U|_L, _U|_L, _U|_L, _U|_L, _P, _U|_L, _U|_L, _U|_L, \
_U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, \
_U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _P, _P, \
_P, _P, _P, _P, _P, _P, _P, _P, \
_P, _P, _P, _P, _P, _P, _P, _P, \
_P, _P, _P, _P, _P, _P, _P, _P, \
_P, _P, _P, _P, _P, _P, _P, _P, \
_P, _P, _P, _P, _P, _P, _P, _P, \
_P, _P, _P, _P, _P, _P, _P, _P, \
_L, _L, _L, _L, _L, _L, _L, _L, \
_L, _L, _L, _L, _L, _L, _L, _L, \
_U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _P, _U|_L, \
_U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, \
_P, _P, _P, _P, _P, _P, _P, _P, \
_P, _P, _P, _P, _P, _P, _P, _S|_B
#define _CTYPE_CP737_128_256 \
@ -50,13 +50,13 @@
_P, _P, _P, _P, _P, _P, _P, _P, \
_L, _L, _L, _L, _L, _L, _L, _L, \
_L, _L, _U, _U, _U, _U, _U, _U, \
_U, _P, _P, _P, _P, _U, _U, _P, \
_U, _P, _P, _P, _U, _U, _P, _P, \
_P, _P, _P, _P, _P, _P, _P, _S|_B
#define _CTYPE_CP775_128_256 \
_U, _L, _L, _L, _L, _L, _L, _L, \
_L, _L, _U, _L, _L, _U, _U, _U, \
_U, _L, _U, _L, _L, _U, _P, _U, \
_L, _U, _U, _P, _P, _P, _P, _P, \
_L, _U, _U, _L, _P, _U, _P, _P, \
_U, _U, _L, _U, _L, _L, _P, _P, \
_P, _P, _P, _P, _P, _U, _P, _P, \
_P, _P, _P, _P, _P, _U, _U, _U, \
@ -65,7 +65,7 @@
_P, _P, _P, _P, _P, _P, _P, _U, \
_L, _L, _L, _L, _L, _L, _L, _L, \
_L, _P, _P, _P, _P, _P, _P, _P, \
_U, _L, _U, _U, _L, _U, _L, _L, \
_U, _L, _U, _U, _L, _U, _P, _L, \
_U, _L, _U, _L, _L, _U, _U, _P, \
_P, _P, _P, _P, _P, _P, _P, _P, \
_P, _P, _P, _P, _P, _P, _P, _S|_B
@ -73,7 +73,7 @@
_U, _L, _L, _L, _L, _L, _L, _L, \
_L, _L, _L, _L, _L, _L, _U, _U, \
_U, _L, _U, _L, _L, _L, _L, _L, \
_L, _U, _U, _L, _P, _U, _P, _P, \
_L, _U, _U, _L, _P, _U, _P, _L, \
_L, _L, _L, _L, _L, _U, _P, _P, \
_P, _P, _P, _P, _P, _P, _P, _P, \
_P, _P, _P, _P, _P, _U, _U, _U, \
@ -82,8 +82,8 @@
_P, _P, _P, _P, _P, _P, _P, _P, \
_L, _U, _U, _U, _U, _L, _U, _U, \
_U, _P, _P, _P, _P, _P, _U, _P, \
_U, _L, _U, _U, _L, _U, _L, _U, \
_L, _U, _U, _U, _L, _U, _P, _P, \
_U, _L, _U, _U, _L, _U, _P, _L, \
_U, _U, _U, _U, _L, _U, _P, _P, \
_P, _P, _P, _P, _P, _P, _P, _P, \
_P, _P, _P, _P, _P, _P, _P, _S|_B
#define _CTYPE_CP852_128_256 \
@ -131,17 +131,17 @@
_P, _P, _P, _P, _P, _P, _P, _P, \
_P, _P, _P, _P, _P, _P, _L, _U, \
_P, _P, _P, _P, _P, _P, _P, _P, \
_P, _P, _U, _U, _U, _L, _U, _U, \
_P, _P, _U, _U, _U, 0, _U, _U, \
_U, _P, _P, _P, _P, _P, _U, _P, \
_U, _L, _U, _U, _L, _U, _L, _L, \
_U, _L, _U, _U, _L, _U, _P, 0, \
_P, _U, _U, _U, _L, _L, _P, _P, \
_P, _P, _L, _P, _P, _P, _P, _P, \
_P, _P, 0, _P, _P, _P, _P, _P, \
_P, _P, _P, _P, _P, _P, _P, _S|_B
#define _CTYPE_CP858_128_256 \
_U, _L, _L, _L, _L, _L, _L, _L, \
_L, _L, _L, _L, _L, _L, _U, _U, \
_U, _L, _U, _L, _L, _L, _L, _L, \
_L, _U, _U, _L, _P, _U, _P, _P, \
_L, _U, _U, _L, _P, _U, _P, _L, \
_L, _L, _L, _L, _L, _U, _P, _P, \
_P, _P, _P, _P, _P, _P, _P, _P, \
_P, _P, _P, _P, _P, _U, _U, _U, \
@ -150,15 +150,15 @@
_P, _P, _P, _P, _P, _P, _P, _P, \
_L, _U, _U, _U, _U, _P, _U, _U, \
_U, _P, _P, _P, _P, _P, _U, _P, \
_U, _L, _U, _U, _L, _U, _L, _U, \
_L, _U, _U, _U, _L, _U, _P, _P, \
_U, _L, _U, _U, _L, _U, _P, _L, \
_U, _U, _U, _U, _L, _U, _P, _P, \
_P, _P, _P, _P, _P, _P, _P, _P, \
_P, _P, _P, _P, _P, _P, _P, _S|_B
#define _CTYPE_CP862_128_256 \
_L, _L, _L, _L, _L, _L, _L, _L, \
_L, _L, _L, _L, _L, _L, _L, _L, \
_L, _L, _L, _L, _L, _L, _L, _L, \
_L, _L, _L, _P, _P, _P, _P, _P, \
_U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, \
_U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, \
_U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, \
_U|_L, _U|_L, _U|_L, _P, _P, _P, _P, _L, \
_L, _L, _L, _L, _L, _U, _P, _P, \
_P, _P, _P, _P, _P, _P, _P, _P, \
_P, _P, _P, _P, _P, _P, _P, _P, \
@ -193,18 +193,18 @@
0, 0, 0, 0, 0, 0, 0, 0, \
0, _P, _P, _P, _P, _P, _P, _P, \
0, 0, 0, 0, 0, 0, 0, 0, \
_S|_B, _L, _L, _L, _L, _L, _L, _L, \
_L, _L, _L, _L, _L, _L, _L, _L, \
_L, _L, _L, _L, _L, _L, _L, _L, \
_L, _L, _L, _L, _L, _L, _L, _L, \
_L, _L, _L, _L, _L, _L, _L, _L, \
_L, _L, _L, _L, _L, _L, _L, _L, \
_L, _L, _L, _L, _L, _L, _L, _L, \
_L, _L, _L, 0, 0, 0, 0, _P, \
_L, _L, _L, _L, _L, _L, _L, _L, \
_L, _L, _L, _L, _L, _L, _L, _L, \
_S|_B, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, \
_U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, \
_U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, \
_U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, \
_U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, \
_U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, \
_U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, \
_U|_L, _U|_L, _U|_L, 0, 0, 0, 0, _P, \
_U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, \
_U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, \
_P, _P, _P, _P, _P, _P, _P, _P, \
_P, _P, _L, _L, 0, 0, 0, 0
_P, _P, _U|_L, _U|_L, 0, 0, 0, 0
#define _CTYPE_CP1125_128_256 \
_U, _U, _U, _U, _U, _U, _U, _U, \
_U, _U, _U, _U, _U, _U, _U, _U, \
@ -243,7 +243,7 @@
_U, _U, _P, _L, _P, _P, _P, _P, \
_P, _P, _U, _P, _U, _U, _U, _U, \
_L, _P, _P, _P, _P, _P, _P, _P, \
_L, _P, _L, _L, _L, _L, _P, _U, \
0, _P, _L, _P, _L, _L, _L, _L, \
_S|_B, _U, _L, _U, _P, _U, _P, _P, \
_U, _P, _U, _P, _P, _P, _P, _U, \
_P, _P, _U, _L, _L, _P, _P, _P, \
@ -277,7 +277,7 @@
_P, 0, _P, _L, _P, _P, _P, _P, \
0, _P, 0, _P, 0, 0, 0, 0, \
0, _P, _P, _P, _P, _P, _P, _P, \
0, _P, _P, 0, 0, 0, 0, 0, \
0, _P, 0, _P, 0, 0, 0, 0, \
_S|_B, _P, _U, _P, _P, _P, _P, _P, \
_P, _P, 0, _P, _P, _P, _P, _P, \
_P, _P, _P, _P, _P, _P, _P, _P, \
@ -318,29 +318,29 @@
_P, _P, _P, _P, _P, _P, _P, _P, \
_P, _P, _P, _P, _P, _P, _P, _P, \
_P, _P, _P, _P, _P, _P, _P, _P, \
_P, _P, _P, _P, _P, _P, _P, _P, \
_P, _P, _P, _P, _U|_L, _U|_L, _U|_L, _P, \
_P, 0, 0, 0, 0, 0, 0, 0, \
_L, _L, _L, _L, _L, _L, _L, _L, \
_L, _L, _L, _L, _L, _L, _L, _L, \
_L, _L, _L, _L, _L, _L, _L, _L, \
_L, _L, _L, 0, 0, _P, _P, 0
_U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, \
_U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, \
_U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, \
_U|_L, _U|_L, _U|_L, 0, 0, _P, _P, 0
#define _CTYPE_CP1256_128_256 \
_P, _L, _P, _L, _P, _P, _P, _P, \
_P, _P, _L, _P, _U, _L, _L, _L, \
_L, _P, _P, _P, _P, _P, _P, _P, \
_L, _P, _L, _P, _L, _P, _P, _L, \
_P, _U|_L, _P, _L, _P, _P, _P, _P, \
_P, _P, _U|_L, _P, _U, _U|_L, _U|_L, _U|_L, \
_U|_L, _P, _P, _P, _P, _P, _P, _P, \
_U|_L, _P, _U|_L, _P, _L, _P, _P, _U|_L, \
_S|_B, _P, _P, _P, _P, _P, _P, _P, \
_P, _P, _L, _P, _P, _P, _P, _P, \
_P, _P, _U|_L, _P, _P, _P, _P, _P, \
_P, _P, _P, _P, _P, _P, _P, _P, \
_P, _P, _P, _P, _P, _P, _P, _P, \
_L, _L, _L, _L, _L, _L, _L, _L, \
_L, _L, _L, _L, _L, _L, _L, _L, \
_L, _L, _L, _L, _L, _L, _L, _P, \
_L, _L, _L, _L, _P, _L, _L, _L, \
_L, _L, _L, _L, _L, _L, _L, _L, \
_L, _L, _L, _L, _L, _L, _L, _L, \
_U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, \
_U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, \
_U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _P, \
_U|_L, _U|_L, _U|_L, _U|_L, _P, _U|_L, _U|_L, _U|_L, \
_L, _U|_L, _L, _U|_L, _U|_L, _U|_L, _U|_L, _L, \
_L, _L, _L, _L, _U|_L, _U|_L, _L, _L, \
_P, _P, _P, _P, _L, _P, _P, _P, \
_P, _L, _P, _L, _L, _P, _P, _L
_P, _L, _P, _L, _L, _P, _P, _U|_L
#define _CTYPE_CP1257_128_256 \
_P, 0, _P, 0, _P, _P, _P, _P, \
0, _P, 0, _P, 0, _P, _P, _P, \

View File

@ -34,7 +34,7 @@
_L, _L, _L, _L, _L, _L, _L, _L, \
_L, _L, _L, _L, _L, _L, _L, _L, \
_L, _L, _L, _L, _L, _L, _L, _P, \
_L, _L, _L, _L, _L, _L, _L, _L
_L, _L, _L, _L, _L, _L, _L, _P
#define _CTYPE_ISO_8859_3_128_256 \
_C, _C, _C, _C, _C, _C, _C, _C, \
_C, _C, _C, _C, _C, _C, _C, _C, \
@ -42,7 +42,7 @@
_C, _C, _C, _C, _C, _C, _C, _C, \
_S|_B, _U, _P, _P, _P, 0, _U, _P, \
_P, _U, _U, _U, _U, _P, 0, _U, \
_P, _L, _P, _P, _P, _L, _L, _P, \
_P, _L, _P, _P, _P, _P, _L, _P, \
_P, _L, _L, _L, _L, _P, 0, _L, \
_U, _U, _U, 0, _U, _U, _U, _U, \
_U, _U, _U, _U, _U, _U, _U, _U, \
@ -95,12 +95,12 @@
0, 0, 0, 0, _P, _P, 0, 0, \
0, 0, 0, 0, 0, 0, 0, 0, \
0, 0, 0, _P, 0, 0, 0, _P, \
0, _L, _L, _L, _L, _L, _L, _L, \
_L, _L, _L, _L, _L, _L, _L, _L, \
0, _L, _L, _L, _L, _L, _L, _L, \
_L, _L, _L, 0, 0, 0, 0, 0, \
_L, _L, _L, _L, _L, _L, _L, _L, \
_L, _L, _L, _P, _P, _P, _P, _P, \
0, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, \
_U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, \
_U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, \
_U|_L, _U|_L, _U|_L, 0, 0, 0, 0, 0, \
_P, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, \
_U|_L, _U|_L, _U|_L, _P, _P, _P, _P, _P, \
_P, _P, _P, 0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, 0, 0, 0
#define _CTYPE_ISO_8859_7_128_256 \
@ -109,7 +109,7 @@
_C, _C, _C, _C, _C, _C, _C, _C, \
_C, _C, _C, _C, _C, _C, _C, _C, \
_S|_B, _P, _P, _P, _P, _P, _P, _P, \
_P, _P, _P, _P, _P, _P, _P, _P, \
_P, _P, _P, _P, _P, _P, 0, _P, \
_P, _P, _P, _P, _P, _P, _U, _P, \
_U, _U, _U, _P, _U, _P, _U, _U, \
_L, _U, _U, _U, _U, _U, _U, _U, \
@ -119,7 +119,7 @@
_L, _L, _L, _L, _L, _L, _L, _L, \
_L, _L, _L, _L, _L, _L, _L, _L, \
_L, _L, _L, _L, _L, _L, _L, _L, \
_L, _L, _L, _L, _L, _L, _L, _P
_L, _L, _L, _L, _L, _L, _L, 0
#define _CTYPE_ISO_8859_8_128_256 \
_C, _C, _C, _C, _C, _C, _C, _C, \
_C, _C, _C, _C, _C, _C, _C, _C, \
@ -132,11 +132,11 @@
0, 0, 0, 0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, 0, 0, _L, \
_L, _L, _L, _L, _L, _L, _L, _L, \
_L, _L, _L, _L, _L, _L, _L, _L, \
_L, _L, _L, _L, _L, _L, _L, _L, \
_L, _L, _L, 0, 0, _P, _P, 0
0, 0, 0, 0, 0, 0, 0, _P, \
_U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, \
_U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, \
_U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, \
_U|_L, _U|_L, _U|_L, 0, 0, _P, _P, 0
#define _CTYPE_ISO_8859_9_128_256 \
_C, _C, _C, _C, _C, _C, _C, _C, \
_C, _C, _C, _C, _C, _C, _C, _C, \
@ -176,27 +176,27 @@
_C, _C, _C, _C, _C, _C, _C, _C, \
_C, _C, _C, _C, _C, _C, _C, _C, \
_C, _C, _C, _C, _C, _C, _C, _C, \
_S|_B, _L, _L, _L, _L, _L, _L, _L, \
_L, _L, _L, _L, _L, _L, _L, _L, \
_L, _L, _L, _L, _L, _L, _L, _L, \
_L, _L, _L, _L, _L, _L, _L, _L, \
_L, _L, _L, _L, _L, _L, _L, _L, \
_L, _L, _L, _L, _L, _L, _L, _L, \
_L, _P, _L, _L, _P, _P, _P, _P, \
_S|_B, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, \
_U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, \
_U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, \
_U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, \
_U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, \
_U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, \
_U|_L, _P, _U|_L, _U|_L, _P, _P, _P, _P, \
_P, _P, _P, 0, 0, 0, 0, _P, \
_L, _L, _L, _L, _L, _L, _L, _P, \
_P, _P, _P, _P, _P, _P, _P, _L, \
_L, _L, _L, _L, _L, _L, _L, _L, \
_L, _L, _L, _L, 0, 0, 0, 0
_U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _P, \
_P, _P, _P, _P, _P, _P, _P, _U|_L, \
_U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, _U|_L, \
_U|_L, _U|_L, _U|_L, _U|_L, 0, 0, 0, 0
#define _CTYPE_ISO_8859_13_128_256 \
_C, _C, _C, _C, _C, _C, _C, _C, \
_C, _C, _C, _C, _C, _C, _C, _C, \
_C, _C, _C, _C, _C, _C, _C, _C, \
_C, _C, _C, _C, _C, _C, _C, _C, \
_S|_B, _P, _P, _P, _P, _P, _P, _P, \
_P, _P, _U, _P, _P, _P, _P, _P, \
_U, _P, _U, _P, _P, _P, _P, _P, \
_P, _P, _P, _P, _P, _P, _P, _P, \
_P, _P, _L, _P, _P, _P, _P, _P, \
_L, _P, _L, _P, _P, _P, _P, _P, \
_U, _U, _U, _U, _U, _U, _U, _U, \
_U, _U, _U, _U, _U, _U, _U, _U, \
_U, _U, _U, _U, _U, _U, _U, _P, \
@ -227,10 +227,10 @@
_C, _C, _C, _C, _C, _C, _C, _C, \
_C, _C, _C, _C, _C, _C, _C, _C, \
_C, _C, _C, _C, _C, _C, _C, _C, \
_S|_B, _P, _P, _P, _P, _P, _P, _P, \
_P, _P, _P, _P, _P, _P, _P, _P, \
_P, _P, _P, _P, _P, _P, _P, _P, \
_P, _P, _P, _P, _P, _P, _P, _P, \
_S|_B, _P, _P, _P, _P, _P, _U, _P, \
_L, _P, _P, _P, _P, _P, _P, _P, \
_P, _P, _P, _P, _U, _P, _P, _P, \
_L, _P, _P, _P, _U, _L, _U, _P, \
_U, _U, _U, _U, _U, _U, _U, _U, \
_U, _U, _U, _U, _U, _U, _U, _U, \
_U, _U, _U, _U, _U, _U, _U, _P, \

View File

@ -37,5 +37,5 @@ No supporting OS subroutines are required.
int
_DEFUN(isblank,(c),int c)
{
return(__ctype_ptr__[c+1] & _B);
return ((__ctype_ptr__[c+1] & _B) || (c == '\t'));
}

View File

@ -38,6 +38,6 @@ No supporting OS subroutines are required.
int
_DEFUN(islower,(c),int c)
{
return(__ctype_ptr__[c+1] & _L);
return ((__ctype_ptr__[c+1] & (_U|_L)) == _L);
}

View File

@ -38,6 +38,6 @@ No supporting OS subroutines are required.
int
_DEFUN(isupper,(c),int c)
{
return(__ctype_ptr__[c+1] & _U);
return ((__ctype_ptr__[c+1] & (_U|_L)) == _U);
}

View File

@ -46,8 +46,8 @@ extern __IMPORT char *__ctype_ptr__;
#ifndef __cplusplus
#define isalpha(c) ((__ctype_ptr__)[(unsigned)((c)+1)]&(_U|_L))
#define isupper(c) ((__ctype_ptr__)[(unsigned)((c)+1)]&_U)
#define islower(c) ((__ctype_ptr__)[(unsigned)((c)+1)]&_L)
#define isupper(c) (((__ctype_ptr__)[(unsigned)((c)+1)]&(_U|_L))==_U)
#define islower(c) (((__ctype_ptr__)[(unsigned)((c)+1)]&(_U|_L))==_L)
#define isdigit(c) ((__ctype_ptr__)[(unsigned)((c)+1)]&_N)
#define isxdigit(c) ((__ctype_ptr__)[(unsigned)((c)+1)]&(_X|_N))
#define isspace(c) ((__ctype_ptr__)[(unsigned)((c)+1)]&_S)
@ -57,8 +57,10 @@ extern __IMPORT char *__ctype_ptr__;
#define isgraph(c) ((__ctype_ptr__)[(unsigned)((c)+1)]&(_P|_U|_L|_N))
#define iscntrl(c) ((__ctype_ptr__)[(unsigned)((c)+1)]&_C)
#if !defined(__STRICT_ANSI__) || __STDC_VERSION__ >= 199901L
#define isblank(c) ((__ctype_ptr__)[(unsigned)((c)+1)]&_B)
#if defined(__GNUC__) && \
(!defined(__STRICT_ANSI__) || __STDC_VERSION__ >= 199901L)
#define isblank(c) \
__extension__ ({ int __c = (c); ((__ctype_ptr__)[(unsigned)((__c)+1)]&_B) || (__c) == '\t';})
#endif