Lines Matching refs:needle_len
123 critical_factorization (const unsigned char *needle, size_t needle_len, in critical_factorization() argument
146 while (j + k < needle_len) in critical_factorization()
181 while (j + k < needle_len) in critical_factorization()
231 const unsigned char *needle, size_t needle_len) in two_way_short_needle() argument
241 suffix = critical_factorization (needle, needle_len, &period); in two_way_short_needle()
252 while (AVAILABLE (haystack, haystack_len, j, needle_len)) in two_way_short_needle()
256 while (i < needle_len && (CANON_ELEMENT (needle[i]) in two_way_short_needle()
259 if (needle_len <= i) in two_way_short_needle()
271 memory = needle_len - period; in two_way_short_needle()
284 period = MAX (suffix, needle_len - suffix) + 1; in two_way_short_needle()
286 while (AVAILABLE (haystack, haystack_len, j, needle_len)) in two_way_short_needle()
290 while (i < needle_len && (CANON_ELEMENT (needle[i]) in two_way_short_needle()
293 if (needle_len <= i) in two_way_short_needle()
325 const unsigned char *needle, size_t needle_len) in two_way_long_needle() argument
336 suffix = critical_factorization (needle, needle_len, &period); in two_way_long_needle()
343 shift_table[i] = needle_len; in two_way_long_needle()
344 for (i = 0; i < needle_len; i++) in two_way_long_needle()
345 shift_table[CANON_ELEMENT (needle[i])] = needle_len - i - 1; in two_way_long_needle()
357 while (AVAILABLE (haystack, haystack_len, j, needle_len)) in two_way_long_needle()
361 shift = shift_table[CANON_ELEMENT (haystack[j + needle_len - 1])]; in two_way_long_needle()
369 shift = needle_len - period; in two_way_long_needle()
378 while (i < needle_len - 1 && (CANON_ELEMENT (needle[i]) in two_way_long_needle()
381 if (needle_len - 1 <= i) in two_way_long_needle()
393 memory = needle_len - period; in two_way_long_needle()
407 period = MAX (suffix, needle_len - suffix) + 1; in two_way_long_needle()
409 while (AVAILABLE (haystack, haystack_len, j, needle_len)) in two_way_long_needle()
413 shift = shift_table[CANON_ELEMENT (haystack[j + needle_len - 1])]; in two_way_long_needle()
422 while (i < needle_len - 1 && (CANON_ELEMENT (needle[i]) in two_way_long_needle()
425 if (needle_len - 1 <= i) in two_way_long_needle()