00001
00002
00003
00004
00005
00006
00007
00008
00015 #ifndef DEF_BITS_H
00016 #define DEF_BITS_H
00017
00018 typedef unsigned char Bits;
00019 extern int bitsInByte[256];
00020
00021 Bits *bitAlloc (int bitCount);
00022 Bits *bitRealloc (Bits *b, int bitCount, int newBitCount);
00023 Bits *bitClone (Bits* orig, int bitCount);
00024 void bitFree (Bits **pB);
00025 void bitSetOne (Bits *b, int bitIx);
00026 void bitClearOne (Bits *b, int bitIx);
00027 void bitSetRange (Bits *b, int startIx, int bitCount);
00028 int bitReadOne (Bits *b, int bitIx);
00029 int bitCountRange (Bits *b, int startIx, int bitCount);
00030 int bitFindSet (Bits *b, int startIx, int bitCount);
00031 int bitFindClear (Bits *b, int startIx, int bitCount);
00032 void bitClear (Bits *b, int bitCount);
00033 void bitClearRange (Bits *b, int startIx, int bitCount);
00034 void bitAnd (Bits *a, Bits *b, int bitCount);
00035 void bitOr (Bits *a, Bits *b, int bitCount);
00036 void bitXor (Bits *a, Bits *b, int bitCount);
00037 void bitNot (Bits *a, int bitCount);
00038 void bitPrint (Bits *a, int startIx, int bitCount);
00039 void bitsInByteInit ();
00040
00041
00042 #endif
00043