}
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;
}
#ifdef POINTERRIGOR
do {
- if (pos >= stop_pos) return Nullch;
+ if (pos >= stop_pos) break;
if (big[pos-previous] != first)
continue;
for (x=big+pos+1-previous,s=little; s < littleend; /**/ ) {
#else /* !POINTERRIGOR */
big -= previous;
do {
- if (pos >= stop_pos) return Nullch;
+ if (pos >= stop_pos) break;
if (big[pos] != first)
continue;
for (x=big+pos+1,s=little; s < littleend; /**/ ) {
msg = ERRSV;
}
- PUSHSTACK(SI_DIEHOOK);
+ PUSHSTACKi(PERLSI_DIEHOOK);
PUSHMARK(SP);
XPUSHs(msg);
PUTBACK;
perl_call_sv((SV*)cv, G_DISCARD);
- POPSTACK();
+ POPSTACK;
LEAVE;
}
}
SvREADONLY_on(msg);
SAVEFREESV(msg);
- PUSHSTACK(SI_DIEHOOK);
+ PUSHSTACKi(PERLSI_DIEHOOK);
PUSHMARK(SP);
XPUSHs(msg);
PUTBACK;
perl_call_sv((SV*)cv, G_DISCARD);
- POPSTACK();
+ POPSTACK;
LEAVE;
}
}
SvREADONLY_on(msg);
SAVEFREESV(msg);
- PUSHSTACK(SI_WARNHOOK);
+ PUSHSTACKi(PERLSI_WARNHOOK);
PUSHMARK(SP);
XPUSHs(msg);
PUTBACK;
perl_call_sv((SV*)cv, G_DISCARD);
- POPSTACK();
+ POPSTACK;
LEAVE;
return;
}
if (!xfound && !seen_dot && !xfailed && (PerlLIO_stat(scriptname,&statbuf) < 0))
#endif
seen_dot = 1; /* Disable message. */
- if (!xfound)
- scriptname = NULL;
-/* croak("Can't %s %s%s%s",
- (xfailed ? "execute" : "find"),
- (xfailed ? xfailed : scriptname),
- (xfailed ? "" : " on PATH"),
- (xfailed || seen_dot) ? "" : ", '.' not in PATH"); */
+ if (!xfound) {
+ if (flags & 1) { /* do or die? */
+ croak("Can't %s %s%s%s",
+ (xfailed ? "execute" : "find"),
+ (xfailed ? xfailed : scriptname),
+ (xfailed ? "" : " on PATH"),
+ (xfailed || seen_dot) ? "" : ", '.' not in PATH");
+ }
+ scriptname = Nullch;
+ }
if (xfailed)
Safefree(xfailed);
scriptname = xfound;
}
- return scriptname;
+ return (scriptname ? savepv(scriptname) : Nullch);
}