diff options
Diffstat (limited to 'libc/include/ctype.h')
-rw-r--r-- | libc/include/ctype.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libc/include/ctype.h b/libc/include/ctype.h index a724a4c..245b1c0 100644 --- a/libc/include/ctype.h +++ b/libc/include/ctype.h @@ -15,8 +15,9 @@ extern unsigned char __ctype[]; #define __CT_p 0x20 /* punctuation */ #define __CT_x 0x40 /* hexadecimal */ -#define toupper(c) (islower(c) ? (c)^0x20 : (c)) -#define tolower(c) (isupper(c) ? (c)^0x20 : (c)) +/* Define these as simple old style ascii versions */ +#define toupper(c) (((c)>='a'&&(c)<='z') ? (c)^0x20 : (c)) +#define tolower(c) (((c)>='A'&&(c)<='Z') ? (c)^0x20 : (c)) #define _toupper(c) ((c)^0x20) #define _tolower(c) ((c)^0x20) #define toascii(c) ((c)&0x7F) |