home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / cpm / bdsc-4 / bdslib.ark / CTYPE.H < prev    next >
Text File  |  1983-07-15  |  768b  |  19 lines

  1. /* ctype.h 7/3/83 */
  2.  
  3. #define isupper(c)    (c >= 'A' && c <= 'Z')
  4. #define islower(c)    (c >= 'a' && c <= 'z')
  5. #define isalpha(c)    (isupper(c) || islower(c))
  6. #define isdigit(c)    (c >= '0' && c <= '9')
  7. #define    isspace(c)    (c == ' ' || c == '\t' || c == '\n')
  8. #define    toupper(c)    (islower(c) ? c-32 : c)
  9. #define    tolower(c)    (isupper(c) ? c+32 : c)
  10. #define iswhite(c)    (c == ' ' || c == '\t')
  11. #define    isalnum(c)    (isalpha(c) || isdigit(c))
  12. #define    isprint(c)    (c >= ' ' && c <= '~')
  13. #define    iscntrl(c)    (c == '\0177' || c < '\040')
  14. #define    isascii(c)    (c < '\0200')
  15. #define    ispunct(c)    ((!iscntrl(c)) && (!isalnum(c)))
  16. #define    abs(n)        ((n < 0) ? -n : n)
  17. #define    max(a,b)    ((a > b) ? a : b)
  18. #define    min(a,b)    ((a < b) ? a : b)
  19.