From: K.Kosako Date: Sat, 22 Sep 2018 13:59:20 +0000 (+0900) Subject: refactoring X-Git-Tag: v6.9.1~18^2~57 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=be00751c6b8da9d4fc5eb41e145e8453a3b51fba;p=onig refactoring --- diff --git a/src/regcomp.c b/src/regcomp.c index f16e975..7fb83be 100644 --- a/src/regcomp.c +++ b/src/regcomp.c @@ -4553,8 +4553,10 @@ setup_tree(Node* node, regex_t* reg, int state, ScanEnv* env) } #ifdef USE_SUNDAY_QUICK_SEARCH_ALGORITHM +/* set skip map for Sunday quick search */ static int -set_bmh_skip(UChar* s, UChar* end, OnigEncoding enc ARG_UNUSED, UChar skip[]) +set_search_skip_table(UChar* s, UChar* end, + OnigEncoding enc ARG_UNUSED, UChar skip[]) { int i, len; @@ -4572,7 +4574,8 @@ set_bmh_skip(UChar* s, UChar* end, OnigEncoding enc ARG_UNUSED, UChar skip[]) #else /* set skip map for Boyer-Moore-Horspool search */ static int -set_bmh_skip(UChar* s, UChar* end, OnigEncoding enc ARG_UNUSED, UChar skip[]) +set_search_skip_table(UChar* s, UChar* end, + OnigEncoding enc ARG_UNUSED, UChar skip[]) { int i, len; @@ -5579,7 +5582,8 @@ set_optimize_exact(regex_t* reg, OptExact* e) ONIGENC_IS_ALLOWED_REVERSE_MATCH(reg->enc, reg->exact, reg->exact_end); if (e->len >= 3 || (e->len >= 2 && allow_reverse)) { - r = set_bmh_skip(reg->exact, reg->exact_end, reg->enc, reg->map); + r = set_search_skip_table(reg->exact, reg->exact_end, + reg->enc, reg->map); if (r != 0) return r; reg->optimize = (allow_reverse != 0