/* $Id: bitarray.h,v 1.8 1997/12/04 19:32:12 bsmith Exp bsmith $ */ /* BT - Bit array objects: used to compactly store logical arrays of variables. BTCreate(m,bt) - creates a bit array with enough room to hold m values BTDestroy(bt) - destroys the bit array BTMemzero(bt,bt) - zeros the entire bit array (sets all values to false) BTSet(bt,index) - sets a particular entry as true BTClear(bt,index) - sets a particular entry as false BTLookup(bt,index) - returns the value BTLookupSet(bt,index) - returns the value and then sets it true BTLength(m) - returns number of bytes in array BTView(m,bt) */ #if !defined(__BITARRAY_H) #define __BITARRAY_H #if !defined(BITSPERBYTE) #define BITSPERBYTE 8 #endif typedef char* BT; extern char _mask, _BT_c; extern int _BT_idx; #define BTView(m,bt) {\ int __i; \ for (__i=0; __i