diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2009-04-09 10:37:58 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2009-04-09 10:37:58 +0000 |
commit | a29a76934280b14aa7f13bbb3e86b1a8a2bcdfb7 (patch) | |
tree | ac75b5c4c52c57f827c51e86ea4602bd48e8150f /newlib/libc/include | |
parent | 2d647173bb2056dfd87a184ac2b6e5ded660a466 (diff) | |
download | cygnal-a29a76934280b14aa7f13bbb3e86b1a8a2bcdfb7.tar.gz cygnal-a29a76934280b14aa7f13bbb3e86b1a8a2bcdfb7.tar.bz2 cygnal-a29a76934280b14aa7f13bbb3e86b1a8a2bcdfb7.zip |
* 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.
Diffstat (limited to 'newlib/libc/include')
-rw-r--r-- | newlib/libc/include/ctype.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/newlib/libc/include/ctype.h b/newlib/libc/include/ctype.h index d223dd09a..c2e393b31 100644 --- a/newlib/libc/include/ctype.h +++ b/newlib/libc/include/ctype.h @@ -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 |