File:  [Research Unix] / researchv10no / cmd / hdr / sets.h
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:35 2018 UTC (8 years, 1 month ago) by root
Branches: belllabs, MAIN
CVS tags: researchv10, HEAD
researchv10 Norman

/*
 *	Set manipulation macros for use with programs preprocessed
 *	by sets(1).
 */
#define	SETS_UNIT_SIZE	8
#define	SETS_SHIFT	3
#define	SETS_MASK	07

#define	in(s, c)	(((s)[((int)c) >> SETS_SHIFT]) & (1 << (((int)c) & SETS_MASK)))
#define	insert(s, c)	(((s)[((int)c) >> SETS_SHIFT]) |= (1 << (((int)c) & SETS_MASK)))
#define	delete(s,c)	(((s)[((int)c) >> SETS_SHIFT]) &= ~(1 << (((int)c) & SETS_MASK)))

typedef	char	*setptr;

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.