home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / SIMTEL / HITECH-C / Z80V309.EXE / lha / CTYPE.H < prev    next >
Text File  |  1979-11-30  |  896b  |  26 lines

  1. #define    _U    0x01
  2. #define    _L    0x02
  3. #define    _N    0x04
  4. #define    _S    0x08
  5. #define _P    0x10
  6. #define _C    0x20
  7. #define    _X    0x40
  8.  
  9. extern    unsigned char    _ctype_[];    /* in libc.lib */
  10.  
  11. #define    isalpha(c)    ((_ctype_+1)[c]&(_U|_L))
  12. #define    isupper(c)    ((_ctype_+1)[c]&_U)
  13. #define    islower(c)    ((_ctype_+1)[c]&_L)
  14. #define    isdigit(c)    ((_ctype_+1)[c]&_N)
  15. #define    isxdigit(c)    ((_ctype_+1)[c]&(_N|_X))
  16. #define    isspace(c)    ((_ctype_+1)[c]&_S)
  17. #define ispunct(c)    ((_ctype_+1)[c]&_P)
  18. #define isalnum(c)    ((_ctype_+1)[c]&(_U|_L|_N))
  19. #define isprint(c)    ((_ctype_+1)[c]&(_P|_U|_L|_N|_S))
  20. #define isgraph(c)    ((_ctype_+1)[c]&(_P|_U|_L|_N))
  21. #define iscntrl(c)    ((_ctype_+1)[c]&_C)
  22. #define isascii(c)    (!((c)&0xFF80))
  23. #define toupper(c)    ((c)-'a'+'A')
  24. #define tolower(c)    ((c)-'A'+'a')
  25. #define toascii(c)    ((c)&0x7F)
  26.