6b37de0e2b9a4f2402de85eefdc86bdc0806b1be tdreszer Tue Jan 29 14:17:41 2013 -0800 Corrected bug Angie found in previous checkin. 'Clone' is always a clone. Also changed lmBit routines to require lm, rather than suggest that it is optional. diff --git src/inc/bits.h src/inc/bits.h index 16df498..8b119bd 100644 --- src/inc/bits.h +++ src/inc/bits.h @@ -14,40 +14,37 @@ /* Convert number of bits to number of bytes needed to store bits. */ Bits *bitAlloc(int bitCount); /* Allocate bits. */ Bits *bitRealloc(Bits *b, int bitCount, int newBitCount); /* Resize a bit array. If b is null, allocate a new array */ Bits *bitClone(Bits* orig, int bitCount); /* Clone bits. */ void bitFree(Bits **pB); /* Free bits. */ Bits *lmBitAlloc(struct lm *lm,int bitCount); -// Allocate bits. Optionally supply local memory. +// Allocate bits. Must supply local memory. Bits *lmBitRealloc(struct lm *lm, Bits *b, int bitCount, int newBitCount); -// Resize a bit array. If b is null, allocate a new array. Optionally use local memory. +// Resize a bit array. If b is null, allocate a new array. Must supply local memory. Bits *lmBitClone(struct lm *lm, Bits* orig, int bitCount); -// Clone bits. Optionally use local memory. - -void lmBitFree(struct lm *lm, Bits **pB); -// Free bits. If allocated from local memory, this does nothing. +// Clone bits. Must supply local memory. void bitSetOne(Bits *b, int bitIx); /* Set a single bit. */ void bitClearOne(Bits *b, int bitIx); /* Clear a single bit. */ void bitSetRange(Bits *b, int startIx, int bitCount); /* Set a range of bits. */ boolean bitReadOne(Bits *b, int bitIx); /* Read a single bit. */ int bitCountRange(Bits *b, int startIx, int bitCount); /* Count number of bits set in range. */