/* set skip map for Boyer-Moore-Horspool search */
static int
-set_bm_skip(UChar* s, UChar* end, OnigEncoding enc ARG_UNUSED, UChar skip[])
+set_bmh_skip(UChar* s, UChar* end, OnigEncoding enc ARG_UNUSED, UChar skip[])
{
int i, len;
ONIGENC_IS_ALLOWED_REVERSE_MATCH(reg->enc, reg->exact, reg->exact_end);
if (e->len >= 3 || (e->len >= 2 && allow_reverse)) {
- r = set_bm_skip(reg->exact, reg->exact_end, reg->enc,
- reg->map);
+ r = set_bmh_skip(reg->exact, reg->exact_end, reg->enc, reg->map);
if (r != 0) return r;
reg->optimize = (allow_reverse != 0
}
static UChar*
-bm_search_forward(regex_t* reg, const UChar* target, const UChar* target_end,
- const UChar* text, const UChar* text_end,
- const UChar* text_range)
+bmh_search_forward(regex_t* reg, const UChar* target, const UChar* target_end,
+ const UChar* text, const UChar* text_end,
+ const UChar* text_range)
{
const UChar *s, *se, *t, *p, *end;
const UChar *tail;
int skip, tlen1;
#ifdef ONIG_DEBUG_SEARCH
- fprintf(stderr, "bm_search_forward: text: %p, text_end: %p, text_range: %p\n",
+ fprintf(stderr,
+ "bmh_search_forward: text: %p, text_end: %p, text_range: %p\n",
text, text_end, text_range);
#endif
}
static UChar*
-bm_search(regex_t* reg, const UChar* target, const UChar* target_end,
- const UChar* text, const UChar* text_end, const UChar* text_range)
+bmh_search(regex_t* reg, const UChar* target, const UChar* target_end,
+ const UChar* text, const UChar* text_end, const UChar* text_range)
{
const UChar *s, *t, *p, *end;
const UChar *tail;
break;
case OPTIMIZE_EXACT_BMH:
- p = bm_search(reg, reg->exact, reg->exact_end, p, end, range);
+ p = bmh_search(reg, reg->exact, reg->exact_end, p, end, range);
break;
case OPTIMIZE_EXACT_BMH_FORWARD:
- p = bm_search_forward(reg, reg->exact, reg->exact_end, p, end, range);
+ p = bmh_search_forward(reg, reg->exact, reg->exact_end, p, end, range);
break;
case OPTIMIZE_MAP: