|
|
DataMuseum.dkPresents historical artifacts from the history of: CP/M |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about CP/M Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 1664 (0x680)
Types: TextFile
Names: »CTYPE.H«
└─⟦fa5b86546⟧ Bits:30002725 SW1609 Digital Research C - CCP/M - Oct 83
└─⟦this⟧ »CTYPE.H«
/****************************************************************************/
/* */
/* CTYPE */
/* ----- */
/* */
/* CTYPE.H - macros to classify ASCII-coded integers by table lookup. */
/* */
/* */
/* Note: Integer args are undefined for all int values > 127, */
/* except for macro 'isascii()'. */
/* Assumes: */
/* User will link with standard library functions. */
/* Compiler can handle declarator initializers and */
/* '#defines' with parameters. */
/* */
/****************************************************************************/
/*
* Bit patterns for character class DEFINEs
*/
#define __c 01
#define __p 02
#define __d 04
#define __u 010
#define __l 020
#define __s 040
#define __cs 041
#define __ps 042
#ifndef CTYPE
extern char __atabÆÅ;
#endif
/*
* Character Class Testing and Conversion DEFINEs:
*/
#define isascii(ch) ((ch) < 0200)
#define isalpha(ch) (__atabÆchÅ & (__u ø __l))
#define isupper(ch) (__atabÆchÅ & __u)
#define islower(ch) (__atabÆchÅ & __l)
#define isdigit(ch) (__atabÆchÅ & __d)
#define isalnum(ch) (__atabÆchÅ & (__u ø __l ø __d))
#define isspace(ch) (__atabÆchÅ & __s)
#define ispunct(ch) (__atabÆchÅ & __p)
#define isprint(ch) (__atabÆchÅ & (__u ø __l ø __d ø __p))
#define iscntrl(ch) (__atabÆchÅ & __c)
#define tolower(ch) (isupper(ch) ? (ch)+('a'-'A') : (ch))
#define toupper(ch) (islower(ch) ? (ch)+('A'-'a') : (ch))
#define toascii(ch) ((ch) & 0177)
«eof»