1 #include <ctype.h> 2 3 #undef isalnum 4 #undef isalpha 5 #undef iscntrl 6 #undef isdigit 7 #undef isgraph 8 #undef islower 9 #undef isprint 10 #undef ispunct 11 #undef isspace 12 #undef isupper 13 #undef isxdigit isalnum(int c)14int isalnum(int c){ return (_ctype+1)[c]&(_ISupper|_ISlower|_ISdigit); } isalpha(int c)15int isalpha(int c){ return (_ctype+1)[c]&(_ISupper|_ISlower); } iscntrl(int c)16int iscntrl(int c){ return (_ctype+1)[c]&_IScntrl; } isdigit(int c)17int isdigit(int c){ return (_ctype+1)[c]&_ISdigit; } isgraph(int c)18int isgraph(int c){ return (_ctype+1)[c]&(_ISpunct|_ISupper|_ISlower|_ISdigit); } islower(int c)19int islower(int c){ return (_ctype+1)[c]&_ISlower; } isprint(int c)20int isprint(int c){ return (_ctype+1)[c]&(_ISpunct|_ISupper|_ISlower|_ISdigit|_ISblank); } ispunct(int c)21int ispunct(int c){ return (_ctype+1)[c]&_ISpunct; } isspace(int c)22int isspace(int c){ return (_ctype+1)[c]&_ISspace; } isupper(int c)23int isupper(int c){ return (_ctype+1)[c]&_ISupper; } isxdigit(int c)24int isxdigit(int c){ return (_ctype+1)[c]&_ISxdigit; } 25