1 /**************************************************************************** 2 **************************************************************************** 3 *** 4 *** This header was automatically generated from a Linux kernel header 5 *** of the same name, to make information necessary for userspace to 6 *** call into the kernel available to libc. It contains only constants, 7 *** structures, and macros generated from the original header, and thus, 8 *** contains no copyrightable information. 9 *** 10 **************************************************************************** 11 ****************************************************************************/ 12 #ifndef _LINUX_CTYPE_H 13 #define _LINUX_CTYPE_H 14 15 #define _U 0x01 16 #define _L 0x02 17 #define _D 0x04 18 #define _C 0x08 19 #define _P 0x10 20 #define _S 0x20 21 #define _X 0x40 22 #define _SP 0x80 23 24 #define __ismask(x) (_ctype[(int)(unsigned char)(x)]) 25 26 #define isalnum(c) ((__ismask(c)&(_U|_L|_D)) != 0) 27 #define isalpha(c) ((__ismask(c)&(_U|_L)) != 0) 28 #define iscntrl(c) ((__ismask(c)&(_C)) != 0) 29 #define isdigit(c) ((__ismask(c)&(_D)) != 0) 30 #define isgraph(c) ((__ismask(c)&(_P|_U|_L|_D)) != 0) 31 #define islower(c) ((__ismask(c)&(_L)) != 0) 32 #define isprint(c) ((__ismask(c)&(_P|_U|_L|_D|_SP)) != 0) 33 #define ispunct(c) ((__ismask(c)&(_P)) != 0) 34 #define isspace(c) ((__ismask(c)&(_S)) != 0) 35 #define isupper(c) ((__ismask(c)&(_U)) != 0) 36 #define isxdigit(c) ((__ismask(c)&(_D|_X)) != 0) 37 38 #define isascii(c) (((unsigned char)(c))<=0x7f) 39 #define toascii(c) (((unsigned char)(c))&0x7f) 40 41 #define tolower(c) __tolower(c) 42 #define toupper(c) __toupper(c) 43 #endif 44