1996-08-28 03:59:28 +02:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
*
|
|
|
|
* bit.h--
|
1997-09-07 07:04:48 +02:00
|
|
|
* Standard bit array definitions.
|
1996-08-28 03:59:28 +02:00
|
|
|
*
|
|
|
|
*
|
|
|
|
* Copyright (c) 1994, Regents of the University of California
|
|
|
|
*
|
1997-09-08 04:41:22 +02:00
|
|
|
* $Id: bit.h,v 1.3 1997/09/08 02:39:29 momjian Exp $
|
1996-08-28 03:59:28 +02:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
1997-09-07 07:04:48 +02:00
|
|
|
#ifndef BIT_H
|
1996-08-28 03:59:28 +02:00
|
|
|
#define BIT_H
|
|
|
|
|
1997-09-08 04:41:22 +02:00
|
|
|
typedef bits8 *BitArray;
|
|
|
|
typedef uint32 BitIndex;
|
1996-08-28 03:59:28 +02:00
|
|
|
|
1997-09-07 07:04:48 +02:00
|
|
|
#define BitsPerByte 8
|
1996-08-28 03:59:28 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* BitArraySetBit --
|
1997-09-07 07:04:48 +02:00
|
|
|
* Sets (to 1) the value of a bit in a bit array.
|
1996-08-28 03:59:28 +02:00
|
|
|
*/
|
1997-09-08 04:41:22 +02:00
|
|
|
extern void BitArraySetBit(BitArray bitArray, BitIndex bitIndex);
|
1996-08-28 03:59:28 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* BitArrayClearBit --
|
1997-09-07 07:04:48 +02:00
|
|
|
* Clears (to 0) the value of a bit in a bit array.
|
1996-08-28 03:59:28 +02:00
|
|
|
*/
|
1997-09-08 04:41:22 +02:00
|
|
|
extern void BitArrayClearBit(BitArray bitArray, BitIndex bitIndex);
|
1996-08-28 03:59:28 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* BitArrayBitIsSet --
|
1997-09-07 07:04:48 +02:00
|
|
|
* True iff the bit is set (1) in a bit array.
|
1996-08-28 03:59:28 +02:00
|
|
|
*/
|
1997-09-08 04:41:22 +02:00
|
|
|
extern bool BitArrayBitIsSet(BitArray bitArray, BitIndex bitIndex);
|
1996-08-28 03:59:28 +02:00
|
|
|
|
1997-09-07 07:04:48 +02:00
|
|
|
#endif /* BIT_H */
|