5ba0549a475bafee7d17a3fa9fc3a42d08cb1c11 tdreszer Fri May 3 17:06:11 2013 -0700 Clarified some comments based upon Angie's feedback. Thanks. diff --git src/inc/bits.h src/inc/bits.h index e44d9a8..fea9323 100644 --- src/inc/bits.h +++ src/inc/bits.h @@ -78,30 +78,31 @@ int bitXorCount(Bits *a, Bits *b, int bitCount); // Without altering 2 bitmaps, count the XOR'd bits. void bitNot(Bits *a, int bitCount); /* Flip all bits in a. */ void bitReverseRange(Bits *bits, int startIx, int bitCount); // Reverses bits in range (e.g. 110010 becomes 010011) void bitPrint(Bits *a, int startIx, int bitCount, FILE* out); /* Print part or all of bit map as a string of 0s and 1s. Mostly useful for * debugging */ void bitsOut(FILE* out, Bits *bits, int startIx, int bitCount, boolean onlyOnes); -// Print part or all of bit map as a string of 0s and 1s. Optionally only print 1s and [bracket]. -; +// Print part or all of bit map as a string of 0s and 1s. +// If onlyOnes, enclose result in [] and use ' ' instead of '0'. + Bits *bitsIn(struct lm *lm,char *bitString, int len); // Returns a bitmap from a string of 1s and 0s. Any non-zero, non-blank char sets a bit. // Returned bitmap is the size of len even if that is longer than the string. -// Optionally supply local memory. +// Optionally supply local memory. Note does NOT handle enclosing []s printed with bitsOut(). extern int bitsInByte[256]; /* Lookup table for how many bits are set in a byte. */ void bitsInByteInit(); /* Initialize bitsInByte array. */ #endif /* BITS_H */