diff options
author | 2004-08-09 18:08:51 +0000 | |
---|---|---|
committer | 2004-08-09 18:08:51 +0000 | |
commit | 04bf48b9e2bc58227ac0da17f40089433d4f734e (patch) | |
tree | 6e41222006184ca3520a8e24bdf48dbc57cea896 /gnu/usr.bin/perl/regexec.c | |
parent | move to 3.6-beta (diff) | |
download | wireguard-openbsd-04bf48b9e2bc58227ac0da17f40089433d4f734e.tar.xz wireguard-openbsd-04bf48b9e2bc58227ac0da17f40089433d4f734e.zip |
merge 5.8.5 into HEAD
remove now-unused files
crank libperl shared library major number
update Makefile.bsd-wrapper
tweak openbsd hints file for arm and m68k
Diffstat (limited to 'gnu/usr.bin/perl/regexec.c')
-rw-r--r-- | gnu/usr.bin/perl/regexec.c | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/gnu/usr.bin/perl/regexec.c b/gnu/usr.bin/perl/regexec.c index 2ec017caba0..58a62ab7ad0 100644 --- a/gnu/usr.bin/perl/regexec.c +++ b/gnu/usr.bin/perl/regexec.c @@ -68,7 +68,7 @@ **** Alterations to Henry's code are... **** **** Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - **** 2000, 2001, 2002, 2003, by Larry Wall and others + **** 2000, 2001, 2002, 2003, 2004, by Larry Wall and others **** **** You may distribute under the terms of either the GNU General Public **** License or the Artistic License, as specified in the README file. @@ -3354,7 +3354,7 @@ S_regmatch(pTHX_ regnode *prog) CHECKPOINT lastcp; /* We suppose that the next guy does not need - backtracking: in particular, it is of constant length, + backtracking: in particular, it is of constant non-zero length, and has no parenths to influence future backrefs. */ ln = ARG1(scan); /* min to match */ n = ARG2(scan); /* max to match */ @@ -3373,15 +3373,6 @@ S_regmatch(pTHX_ regnode *prog) minmod = 0; if (ln && regrepeat_hard(scan, ln, &l) < ln) sayNO; - /* if we matched something zero-length we don't need to - backtrack - capturing parens are already defined, so - the caveat in the maximal case doesn't apply - - XXXX if ln == 0, we can redo this check first time - through the following loop - */ - if (ln && l == 0) - n = ln; /* don't backtrack */ locinput = PL_reginput; if (HAS_TEXT(next) || JUMPABLE(next)) { regnode *text_node = next; @@ -3407,8 +3398,7 @@ S_regmatch(pTHX_ regnode *prog) c1 = c2 = -1000; assume_ok_MM: REGCP_SET(lastcp); - /* This may be improved if l == 0. */ - while (n >= ln || (n == REG_INFTY && ln > 0 && l)) { /* ln overflow ? */ + while (n >= ln || (n == REG_INFTY && ln > 0)) { /* ln overflow ? */ /* If it could work, try it. */ if (c1 == -1000 || UCHARAT(PL_reginput) == c1 || @@ -3439,13 +3429,6 @@ S_regmatch(pTHX_ regnode *prog) } else { n = regrepeat_hard(scan, n, &l); - /* if we matched something zero-length we don't need to - backtrack, unless the minimum count is zero and we - are capturing the result - in that case the capture - being defined or not may affect later execution - */ - if (n != 0 && l == 0 && !(paren && ln == 0)) - ln = n; /* don't backtrack */ locinput = PL_reginput; DEBUG_r( PerlIO_printf(Perl_debug_log, @@ -4250,7 +4233,7 @@ S_regrepeat(pTHX_ regnode *p, I32 max) /* - regrepeat_hard - repeatedly match something, report total lenth and length * - * The repeater is supposed to have constant length. + * The repeater is supposed to have constant non-zero length. */ STATIC I32 |