Mercurial > hg > Applications > Grep
view c/regexParser/bitVectorNode.cc @ 112:ec485345daf9 pairPro
some function use static
author | Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 23 Nov 2015 15:54:19 +0900 |
parents | a3adc5c24e19 |
children | ca30f8334741 |
line wrap: on
line source
#include <stdio.h> #include <stdlib.h> #include <ctype.h> #include "bitVector.h" #include "regexParser.h" BitVectorListPtr allocateBitVectorList() { BitVectorListPtr bvl = (BitVectorListPtr)malloc(sizeof(BitVectorList)); if (bvl == NULL) { fprintf(stderr, "Failed to allocate memory.\n"); exit(-1); } bvl->self = bvl; bvl->bi = (BitVectorPtr)malloc(sizeof(BitVector)); if (bvl->bi == NULL) { fprintf(stderr, "Failed to allocate memory.\n"); exit(-1); } return bvl; } BitVectorListPtr initBitVector() { BitVectorListPtr bvl = allocateBitVectorList(); bvl->initBvl = initBvl = bvl; bvl->bi = bitSet(0); for (int i = 0; i < 256; i++) { bvl->next[i] = NULL; } return bvl; }