DataMuseum.dk

Presents historical artifacts from the history of:

Commodore CBM-900

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

See our Wiki for more about Commodore CBM-900

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦5c516321e⟧ TextFile

    Length: 985 (0x3d9)
    Types: TextFile
    Notes: UNIX file
    Names: »ctype.h«

Derivation

└─⟦eafc30061⟧ Bits:30001199 Commodore 900 hard disk image
    └─⟦8281d0872⟧ UNIX V7 Filesystem
        └─ ⟦294235107⟧ »vol3.fd« UNIX V7 Filesystem
            └─ ⟦this⟧ »usr/include/ctype.h« 
└─⟦f27320a65⟧ Bits:30001972 Commodore 900 hard disk image with partial source code
    └─⟦2d53db1df⟧ UNIX V7 Filesystem
        └─ ⟦this⟧ »include/ctype.h« 
└─⟦eafc30061⟧ Bits:30001199 Commodore 900 hard disk image
    └─⟦5ec4c54f2⟧ UNIX V7 Filesystem
        └─ ⟦this⟧ »usr/include/ctype.h« 

TextFile

/*
 * Character type classification routines.
 * (This is implemented by table lookup).
 */

#ifndef	_U

extern	readonly	char	_ctype[];

/* Bits classifications */
#define	_U	01		/* Upper case alphabetic */
#define	_L	02		/* Lower case alphabetic */
#define	_A	(_U|_L)		/* Alphabetic */
#define	_D	010		/* Digit */
#define	_S	020		/* White space character */
#define	_P	040		/* Punctuation character */
#define	_C	0100		/* Control character */
#define	_X	0200		/* Printable but nothing else */

#define	isalpha(c)	((_ctype+1)[(c)]&_A)
#define	isupper(c)	((_ctype+1)[(c)]&_U)
#define	islower(c)	((_ctype+1)[(c)]&_L)
#define	isdigit(c)	((_ctype+1)[(c)]&_D)
#define	isalnum(c)	((_ctype+1)[(c)]&(_A|_D))
#define	isspace(c)	((_ctype+1)[(c)]&_S)
#define	ispunct(c)	((_ctype+1)[(c)]&_P)
#define	isprint(c)	((_ctype+1)[(c)]&(_P|_X|_A|_D))
#define	iscntrl(c)	((_ctype+1)[(c)]&_C)
#define	isascii(c)	(((c)&~0177)==0)
#define	tolower(c)	((c)|('a'-'A'))
#define	toupper(c)	((c)&~('a'-'A'))
#endif