Mercurial > hg > Applications > Grep
diff c/regexParser/bitVector.cc @ 138:ea2810db8d87 pairPro
remove warning and error
author | Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 06 Dec 2015 15:54:05 +0900 |
parents | c292c67b3100 |
children | 84a2a5209d3a |
line wrap: on
line diff
--- a/c/regexParser/bitVector.cc Fri Dec 04 20:32:09 2015 +0900 +++ b/c/regexParser/bitVector.cc Sun Dec 06 15:54:05 2015 +0900 @@ -3,10 +3,11 @@ #include <string.h> #include "bitVector.h" const BitVectorPtr allocateBitVector(); +void bitSet(BitVectorPtr bi, int bitSetPosition); -BitVectorListPtr createBitVector(NodePtr n) { - BitVectorListPtr nextBvl = allocateBitVectorList(); - nextBvl->bi = bitSet(nextBvl,n->nodeNumber); +BitVectorPtr createBitVector(NodePtr n) { + BitVectorPtr nextBvl = allocateBitVector(); + bitSet(nextBvl,n->nodeNumber); return nextBvl; } @@ -25,7 +26,7 @@ void bitPrint(BitVectorPtr bi) { unsigned long vec = bi->bitContainer; for (int j = 0; j < BITBLOCK; j++) { - putchar((vec & 1)?'1:'0'); + putchar((vec & 1) ? '1':'0'); vec >>= 1; } printf("\n");