Mercurial > hg > Game > Cerium
changeset 1968:d1cffd6d88f6 draft
fix
author | masa |
---|---|
date | Thu, 20 Feb 2014 15:26:03 +0900 |
parents | e1b377a42c54 |
children | e211424ac950 |
files | example/regex_mas/ppe/Exec.cc |
diffstat | 1 files changed, 19 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/example/regex_mas/ppe/Exec.cc Tue Feb 18 17:12:15 2014 +0900 +++ b/example/regex_mas/ppe/Exec.cc Thu Feb 20 15:26:03 2014 +0900 @@ -12,6 +12,25 @@ static int BM_method(unsigned char *text,int text_len, unsigned char *pattern,int sw_len,int *skip) { + +// int text_pointer = 0; +// int pattern_pointer = 0; +// int match_counter = 0; +// +// while (text_pointer < text_len && pattern_pointer < sw_len) { +// if (text[text_pointer] == pattern[pattern_pointer]) { +// text_pointer++; pattern_pointer++; +// if (pattern_pointer == sw_len) { +// match_counter++; +// text_pointer = text_pointer - pattern_pointer + 1; +// pattern_pointer = 0; +// } +// } else { +// text_pointer = text_pointer - pattern_pointer + 1; +// pattern_pointer = 0; +// } +// } + int i = sw_len - 1; int match_counter = 0;