Home
       ctype.h - scc - simple c99 compiler
  HTML git clone git://git.simple-cc.org/scc
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
   DIR README
   DIR LICENSE
       ---
       ctype.h (1222B)
       ---
            1 #ifndef _CTYPE_H
            2 #define _CTYPE_H
            3 
            4 extern int isalnum(int);
            5 extern int isalpha(int);
            6 extern int islower(int);
            7 extern int isupper(int);
            8 extern int isdigit(int);
            9 extern int isxdigit(int);
           10 extern int iscntrl(int);
           11 extern int isgraph(int);
           12 extern int isspace(int);
           13 extern int isblank(int);
           14 extern int isprint(int);
           15 extern int ispunct(int);
           16 extern int tolower(int);
           17 extern int toupper(int);
           18 
           19 
           20 #define _U  0x01 /* upper */
           21 #define _L  0x02 /* lower */
           22 #define _D  0x04 /* digit */
           23 #define _C  0x08 /* cntrl */
           24 #define _P  0x10 /* punct */
           25 #define _S  0x20 /* white space (space/lf/tab) */
           26 #define _X  0x40 /* hex char */
           27 #define _SP 0x80 /* hard space (0x20) */
           28 
           29 extern const unsigned char __ctype[];
           30 
           31 #define isalnum(c)  ((__ctype+1)[c] & (_U|_L|_D))
           32 #define isalpha(c)  ((__ctype+1)[c] & (_U|_L))
           33 #define iscntrl(c)  ((__ctype+1)[c] & (_C))
           34 #define isdigit(c)  ((__ctype+1)[c] & (_D))
           35 #define isgraph(c)  ((__ctype+1)[c] & (_P|_U|_L|_D))
           36 #define islower(c)  ((__ctype+1)[c] & (_L))
           37 #define isprint(c)  ((__ctype+1)[c] & (_P|_U|_L|_D|_SP))
           38 #define ispunct(c)  ((__ctype+1)[c] & (_P))
           39 #define isspace(c)  ((__ctype+1)[c] & (_S))
           40 #define isupper(c)  ((__ctype+1)[c] & (_U))
           41 #define isxdigit(c) ((__ctype+1)[c] & (_D|_X))
           42 
           43 #endif