# HG changeset patch # User Shinji KONO # Date 1462676209 -32400 # Node ID c9458ffecb875614cabc6ddc73b27847c822e13a # Parent fa590a7272aebd461444892e75917c1e7a0da9aa word mode in tSearch diff -r fa590a7272ae -r c9458ffecb87 regexParser/threadedSearch.cc --- a/regexParser/threadedSearch.cc Sun May 08 11:40:38 2016 +0900 +++ b/regexParser/threadedSearch.cc Sun May 08 11:56:49 2016 +0900 @@ -1,5 +1,6 @@ #include #include +#include #include "regexParser.h" #include "CharClass.h" @@ -106,8 +107,13 @@ } else if (c<=ccv->end) { // range matched. if (ccv->w.word) { - // match the word. - // if (not match) continue; + WordPtr w; + for (w = &ccv->w;w;w = w->next) { + // match the word. + if (strncmp((const char *)w->word,(const char *)tsv.buff.buffptr-1,w->length)==0) break; + } + if (!w) continue; // if (not match) continue; + tsv.buff.buffptr += w->length - 1; } if (ccv->tState) { tsv.current = ccv->tState;