home *** CD-ROM | disk | FTP | other *** search
/ Fish 'n' More 2 / fishmore-publicdomainlibraryvol.ii1991xetec.iso / dirs / mkid_448.lzh / Mkid / src / bitops.h < prev    next >
C/C++ Source or Header  |  1991-02-01  |  537b  |  16 lines

  1. /* Copyright (c) 1986, Greg McGary */
  2. /* @(#)bitops.h    1.1 86/10/09 */
  3.  
  4. #define    BITTST(ba, bn)    ((ba)[(bn) >> 3] &  (1 << ((bn) & 0x07)))
  5. #define    BITSET(ba, bn)    ((ba)[(bn) >> 3] |= (1 << ((bn) & 0x07)))
  6. #define    BITCLR(ba, bn)    ((ba)[(bn) >> 3] &=~(1 << ((bn) & 0x07)))
  7. #define    BITAND(ba, bn)    ((ba)[(bn) >> 3] &= (1 << ((bn) & 0x07)))
  8. #define    BITXOR(ba, bn)    ((ba)[(bn) >> 3] ^= (1 << ((bn) & 0x07)))
  9.  
  10. extern char *bitsand();
  11. extern char *bitsclr();
  12. extern char *bitsset();
  13. extern char *bitsxor();
  14. extern int bitsany();
  15. extern int bitstst();
  16.