Mercurial > hg > Applications > Grep
comparison regexParser/grepWalk.cc @ 317:fa590a7272ae
fix
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 08 May 2016 11:40:38 +0900 |
parents | c4d33b7c3ccd |
children | 7b8234c090f7 |
comparison
equal
deleted
inserted
replaced
316:c4d33b7c3ccd | 317:fa590a7272ae |
---|---|
51 // range matched. | 51 // range matched. |
52 if (cc->cond.w.word) { | 52 if (cc->cond.w.word) { |
53 WordPtr w; | 53 WordPtr w; |
54 for (w = &cc->cond.w;w;w = w->next) { | 54 for (w = &cc->cond.w;w;w = w->next) { |
55 // match the word. | 55 // match the word. |
56 // if (not match) continue; | 56 if (strncmp((const char *)w->word,(const char *)tsv.buff.buffptr-1,w->length)==0) break; |
57 if (strncmp((const char *)w->word,(const char *)tsv.buff.buffptr-1,w->length)) break; | |
58 } | 57 } |
59 if (!w) continue; | 58 if (!w) continue; // if (not match) continue; |
60 tsv.buff.buffptr += w->length - 1; | 59 tsv.buff.buffptr += w->length - 1; |
61 } | 60 } |
62 state = nextState(cc->nextState,tg); | 61 state = nextState(cc->nextState,tg); |
63 goto next; | 62 goto next; |
64 } | 63 } |