Mercurial > hg > Applications > Grep
diff regexParser/grepWalk.cc @ 316:c4d33b7c3ccd
no compile error
author | mir3636 |
---|---|
date | Sat, 07 May 2016 19:41:48 +0900 |
parents | 66012db6a717 |
children | fa590a7272ae |
line wrap: on
line diff
--- a/regexParser/grepWalk.cc Sat May 07 19:18:43 2016 +0900 +++ b/regexParser/grepWalk.cc Sat May 07 19:41:48 2016 +0900 @@ -1,5 +1,6 @@ #include <stdio.h> #include <stdlib.h> +#include <string.h> #include "grepWalk.h" #include "subsetConstruction.h" @@ -50,13 +51,13 @@ // range matched. if (cc->cond.w.word) { WordPtr w; - for (w = &cc->cond.w.word;w;w = w->next) { + for (w = &cc->cond.w;w;w = w->next) { // match the word. // if (not match) continue; - if (strncmp(w.word,tsv.buff.buffptr-1,w.length)) break; + if (strncmp((const char *)w->word,(const char *)tsv.buff.buffptr-1,w->length)) break; } if (!w) continue; - tsv.buff.buffptr += w.length - 1; + tsv.buff.buffptr += w->length - 1; } state = nextState(cc->nextState,tg); goto next;