Analyses the string in order to make fast searches on it using fbm_instr() --
the Boyer-Moore algorithm.
- void fbm_compile(SV* sv)
+ void fbm_compile(SV* sv, U32 flags)
=item fbm_instr
C<sv> does not have to be fbm_compiled, but the search will not be as
fast then.
- char* fbm_instr(char *str, char *strend, SV *sv)
+ char* fbm_instr(char *str, char *strend, SV *sv, U32 flags)
=item FREETMPS
else if (offset > biglen)
offset = biglen;
if (!(tmps2 = fbm_instr((unsigned char*)tmps + offset,
- (unsigned char*)tmps + biglen, little)))
+ (unsigned char*)tmps + biglen, little, 0)))
retval = -1 + arybase;
else
retval = tmps2 - tmps + arybase;
#ifndef lint
while (s < strend && --limit &&
(m=fbm_instr((unsigned char*)s, (unsigned char*)strend,
- rx->check_substr)) )
+ rx->check_substr, 0)) )
#endif
{
dstr = NEWSV(31, m-s);
}
else if (!(s = fbm_instr((unsigned char*)s + rx->check_offset_min,
(unsigned char*)strend,
- rx->check_substr)))
+ rx->check_substr, 0)))
goto nope;
else if ((rx->reganch & ROPT_CHECK_ALL) && !sawampersand)
goto yup;
}
else if (!(s = fbm_instr((unsigned char*)s + rx->check_offset_min,
(unsigned char*)strend,
- rx->check_substr)))
+ rx->check_substr, 0)))
goto nope;
if (s && rx->check_offset_max < s - m) {
++BmUSEFUL(rx->check_substr);
VIRTUAL void dump_packsubs _((HV* stash));
VIRTUAL void dump_sub _((GV* gv));
VIRTUAL void fbm_compile _((SV* sv, U32 flags));
-VIRTUAL char* fbm_instr _((unsigned char* big, unsigned char* bigend, SV* littlesv));
+VIRTUAL char* fbm_instr _((unsigned char* big, unsigned char* bigend, SV* littlesv, U32 flags));
VIRTUAL char* find_script _((char *scriptname, bool dosearch, char **search_ext, I32 flags));
#ifdef USE_THREADS
VIRTUAL PADOFFSET find_threadsv _((char *name));
else
s = fbm_instr((unsigned char*)s + start_shift,
(unsigned char*)strend - end_shift,
- prog->check_substr);
+ prog->check_substr, 0);
if (!s) {
++BmUSEFUL(prog->check_substr); /* hooray */
goto phooey; /* not present */
? (s = screaminstr(screamer, must, s + back_min - strbeg,
end_shift, &scream_pos, 0))
: (s = fbm_instr((unsigned char*)s + back_min,
- (unsigned char*)strend, must))) ) {
+ (unsigned char*)strend, must, 0))) ) {
if (s - back_max > last1) {
last1 = s - back_min;
s = s - back_max;
}
char *
-fbm_instr(unsigned char *big, register unsigned char *bigend, SV *littlestr)
+fbm_instr(unsigned char *big, register unsigned char *bigend, SV *littlestr, U32 flags)
{
register unsigned char *s;
register I32 tmp;