home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
unix
/
volume24
/
mkid2
/
part01
/
bitops.h
< prev
next >
Wrap
C/C++ Source or Header
|
1991-10-09
|
537b
|
16 lines
/* Copyright (c) 1986, Greg McGary */
/* @(#)bitops.h 1.1 86/10/09 */
#define BITTST(ba, bn) ((ba)[(bn) >> 3] & (1 << ((bn) & 0x07)))
#define BITSET(ba, bn) ((ba)[(bn) >> 3] |= (1 << ((bn) & 0x07)))
#define BITCLR(ba, bn) ((ba)[(bn) >> 3] &=~(1 << ((bn) & 0x07)))
#define BITAND(ba, bn) ((ba)[(bn) >> 3] &= (1 << ((bn) & 0x07)))
#define BITXOR(ba, bn) ((ba)[(bn) >> 3] ^= (1 << ((bn) & 0x07)))
extern char *bitsand();
extern char *bitsclr();
extern char *bitsset();
extern char *bitsxor();
extern int bitsany();
extern int bitstst();