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

⟦77c3ff540⟧ TextFile

    Length: 999 (0x3e7)
    Types: TextFile
    Notes: UNIX file
    Names: »egrep.h«

Derivation

└─⟦f27320a65⟧ Bits:30001972 Commodore 900 hard disk image with partial source code
    └─⟦f4b8d8c84⟧ UNIX V7 Filesystem
        └─ ⟦this⟧ »cmd/egrep/egrep.h« 

TextFile



/*
 * general header
 */
#include	<stdio.h>
#include	<rico.h>


/*
 * bit diddling
 */
#define	NCHARS	128		/* chars in ASCII set */
#define	NBCHAR	8		/* bits per char */

#define	bitset( c, p)	((p)[(c)>>3] |= bitmask[(c)&7])
#define	bitclr( c, p)	((p)[(c)>>3] &= ~bitmask[(c)&7])
#define	bitcom( c, p)	((p)[(c)>>3] ^= bitmask[(c)&7])
#define	bittst( c, p)	((p)[(c)>>3] & bitmask[(c)&7])


extern bool	eflag;		/* next arg is regular expression */
extern bool	fflag;		/* next arg is file containing rex */
extern bool	vflag;		/* line matches if rex NOT found */
extern bool	cflag;		/* only print # matches */
extern bool	lflag;		/* only print name of files that match */
extern bool	nflag;		/* also print line # */
extern bool	bflag;		/* also print block # */
extern bool	sflag;		/* only provide exit status */
extern bool	hflag;		/* do not print file names */
extern bool	yflag;		/* lower case also matches upper case input */
extern char	bitmask[];	/* used by bit-ops */

extern char	*newbits( );