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 14 int isalnum(int c){ return (_ctype+1)[c]&(__U|__L|__N); } 15 int isalpha(int c){ return (_ctype+1)[c]&(__U|__L); } 16 int iscntrl(int c){ return (_ctype+1)[c]&__C; } 17 int isdigit(int c){ return (_ctype+1)[c]&__N; } 18 int isgraph(int c){ return (_ctype+1)[c]&(__P|__U|__L|__N); } 19 int islower(int c){ return (_ctype+1)[c]&__L; } 20 int isprint(int c){ return (_ctype+1)[c]&(__P|__U|__L|__N|__B); } 21 int ispunct(int c){ return (_ctype+1)[c]&__P; } 22 int isspace(int c){ return (_ctype+1)[c]&__S; } 23 int isupper(int c){ return (_ctype+1)[c]&__U; } 24 int isxdigit(int c){ return (_ctype+1)[c]&__X; } 25