home *** CD-ROM | disk | FTP | other *** search
/ Black Box 4 / BlackBox.cdr / lan / soss.arj / INCLUDE / CTYPE.H next >
C/C++ Source or Header  |  1991-04-11  |  907b  |  31 lines

  1. #ifndef lint
  2. static char *rcsidctype = "$Header: ctype.h,v 5.0 86/02/01 00:33:55 ibmacis ibm42a $";
  3. #endif
  4. /* $Source: /ibm/acis/usr/src/include/RCS/ctype.h,v $ */
  5. /*    ctype.h    4.1    83/05/03    */
  6.  
  7. #define    _U    01
  8. #define    _L    02
  9. #define    _N    04
  10. #define    _S    010
  11. #define _P    020
  12. #define _C    040
  13. #define _X    0100
  14.  
  15. extern    char    _ctype_[];
  16.  
  17. #define    isalpha(c)    ((_ctype_+1)[c]&(_U|_L))
  18. #define    isupper(c)    ((_ctype_+1)[c]&_U)
  19. #define    islower(c)    ((_ctype_+1)[c]&_L)
  20. #define    isdigit(c)    ((_ctype_+1)[c]&_N)
  21. #define    isxdigit(c)    ((_ctype_+1)[c]&(_N|_X))
  22. #define    isspace(c)    ((_ctype_+1)[c]&_S)
  23. #define ispunct(c)    ((_ctype_+1)[c]&_P)
  24. #define isalnum(c)    ((_ctype_+1)[c]&(_U|_L|_N))
  25. #define isprint(c)    ((_ctype_+1)[c]&(_P|_U|_L|_N))
  26. #define iscntrl(c)    ((_ctype_+1)[c]&_C)
  27. #define isascii(c)    ((unsigned)(c)<=0177)
  28. #define toupper(c)    ((c)-'a'+'A')
  29. #define tolower(c)    ((c)-'A'+'a')
  30. #define toascii(c)    ((c)&0177)
  31.