|
@@ -70,11 +70,11 @@ extern int isxupper(int c) __THROW; /* uClibc-specific. */
|
|
|
|
|
|
/* Now some non-ansi/iso c99 macros. */
|
|
/* Now some non-ansi/iso c99 macros. */
|
|
|
|
|
|
-#define __isascii(c) (((unsigned int)(c)) <= 0x7f)
|
|
+#define __isascii(c) (((c) & ~0x7f) == 0)
|
|
#define __toascii(c) ((c) & 0x7f)
|
|
#define __toascii(c) ((c) & 0x7f)
|
|
|
|
+#define _tolower(c) (isupper(c) ? tolower(c) : (c))
|
|
|
|
+#define _toupper(c) (islower(c) ? toupper(c) : (c))
|
|
|
|
|
|
-#define _toupper(c) ((c) | 0x20)
|
|
|
|
-#define _tolower(c) ((c) ^ 0x20)
|
|
|
|
|
|
|
|
/* For compatibility with older versions of uClibc. Are these ever used? */
|
|
/* For compatibility with older versions of uClibc. Are these ever used? */
|
|
#define __isxlower(c) __C_isxlower(c) /* uClibc-specific. */
|
|
#define __isxlower(c) __C_isxlower(c) /* uClibc-specific. */
|