Mercurial > hg > Applications > Grep
changeset 316:c4d33b7c3ccd
no compile error
author | mir3636 |
---|---|
date | Sat, 07 May 2016 19:41:48 +0900 |
parents | 66012db6a717 |
children | fa590a7272ae |
files | regexParser/Makefile regexParser/grepWalk.cc |
diffstat | 2 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/regexParser/Makefile Sat May 07 19:18:43 2016 +0900 +++ b/regexParser/Makefile Sat May 07 19:41:48 2016 +0900 @@ -66,7 +66,7 @@ ./cerium/ceriumGrep $(SUBSET) -regex $(REGEX) -file $(TESTFILE) $(WC) test2: regexParser $(TESTFILE) - ./regexParser $(SUBSET) -regex $(REGEX)-file $(TESTFILE) $(WC) + ./regexParser $(SUBSET) -regex $(REGEX) -file $(TESTFILE) $(WC) grepWalk: regexParser $(TESTFILE) ./regexParser $(SUBSET) -regex $(REGEX) -file $(TESTFILE) $(WC)
--- 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;