Merge branch 'fpga' of git://www.denx.de/git/u-boot-microblaze
[oweals/u-boot.git] / include / linux / ctype.h
index afa36392297a341ce79e7d52a0231453776b7a89..42f9305a0280e9909d6edcd95f007ad3125fc2f0 100644 (file)
@@ -15,7 +15,7 @@
 #define _X     0x40    /* hex digit */
 #define _SP    0x80    /* hard space (0x20) */
 
-extern unsigned char _ctype[];
+extern const unsigned char _ctype[];
 
 #define __ismask(x) (_ctype[(int)(unsigned char)(x)])
 
@@ -31,6 +31,12 @@ extern unsigned char _ctype[];
 #define isupper(c)     ((__ismask(c)&(_U)) != 0)
 #define isxdigit(c)    ((__ismask(c)&(_D|_X)) != 0)
 
+/*
+ * Rather than doubling the size of the _ctype lookup table to hold a 'blank'
+ * flag, just check for space or tab.
+ */
+#define isblank(c)     (c == ' ' || c == '\t')
+
 #define isascii(c) (((unsigned char)(c))<=0x7f)
 #define toascii(c) (((unsigned char)(c))&0x7f)