DataMuseum.dk

Presents historical artifacts from the history of:

CP/M

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about CP/M

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦3f06c3f1f⟧ TextFile

    Length: 1664 (0x680)
    Types: TextFile
    Names: »CTYPE.H«

Derivation

└─⟦93c4d868c⟧ Bits:30005869 SW1609 Digital Research C v. 1.11 - May 84
    └─ ⟦this⟧ »CTYPE.H« 
└─⟦b85731168⟧ Bits:30002664 Digital Research C - CCP/M - May 84
    └─ ⟦this⟧ »CTYPE.H« 

TextFile

/****************************************************************************/
/*									    */
/*				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();
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»