ctype.h

Go to the documentation of this file.
00001 #ifndef _LINUX_CTYPE_H
00002 #define _LINUX_CTYPE_H
00003 
00004 #define _U      0x01    ///< upper 
00005 #define _L      0x02    ///< lower 
00006 #define _D      0x04    ///< digit 
00007 #define _C      0x08    ///< cntrl 
00008 #define _P      0x10    ///< punct 
00009 #define _S      0x20    ///< white space (space/lf/tab) 
00010 #define _X      0x40    ///< hex digit 
00011 #define _SP     0x80    ///< hard space (0x20) 
00012 
00013 extern unsigned char _ctype[];
00014 extern char _ctmp;
00015 
00016 #define isalnum(c) ((_ctype+1)[c]&(_U|_L|_D))
00017 #define isalpha(c) ((_ctype+1)[c]&(_U|_L))
00018 #define iscntrl(c) ((_ctype+1)[c]&(_C))
00019 #define isdigit(c) ((_ctype+1)[c]&(_D))
00020 #define isgraph(c) ((_ctype+1)[c]&(_P|_U|_L|_D))
00021 #define islower(c) ((_ctype+1)[c]&(_L))
00022 #define isprint(c) ((_ctype+1)[c]&(_P|_U|_L|_D|_SP))
00023 #define ispunct(c) ((_ctype+1)[c]&(_P))
00024 #define isspace(c) ((_ctype+1)[c]&(_S))
00025 #define isupper(c) ((_ctype+1)[c]&(_U))
00026 #define isxdigit(c) ((_ctype+1)[c]&(_D|_X))
00027 
00028 #define isascii(c) (((unsigned) c)<=0x7f)
00029 #define toascii(c) (((unsigned) c)&0x7f)
00030 
00031 #define tolower(c) (_ctmp=c,isupper(_ctmp)?_ctmp-('A'-'a'):_ctmp)
00032 #define toupper(c) (_ctmp=c,islower(_ctmp)?_ctmp-('a'-'A'):_ctmp)
00033 
00034 #endif

Generated on Mon May 1 21:47:00 2006 for KernelAPI by  doxygen 1.4.6-5