summaryrefslogtreecommitdiff
path: root/regexec.c
diff options
context:
space:
mode:
authorMalcolm Beattie <mbeattie@sable.ox.ac.uk>1997-09-30 15:11:07 +0000
committerMalcolm Beattie <mbeattie@sable.ox.ac.uk>1997-09-30 15:11:07 +0000
commit8206a063cdc1c193b12df1a45cb3a0ee430b5077 (patch)
tree45fb29ee11703ddeadeb8fa6d9673bc12d51394b /regexec.c
parent2ddcc7aa6c936ba8e7a9703319dfd8959bb54574 (diff)
parent3e3baf6d63945cb64e829d6e5c70a7d00f3d3d03 (diff)
downloadperl-8206a063cdc1c193b12df1a45cb3a0ee430b5077.tar.gz
Merge maint-5.004 branch (5.004_01) with mainline.
p4raw-id: //depot/perl@84
Diffstat (limited to 'regexec.c')
-rw-r--r--regexec.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/regexec.c b/regexec.c
index e851808ad6..5493e28923 100644
--- a/regexec.c
+++ b/regexec.c
@@ -827,7 +827,11 @@ char *prog;
sayNO;
nextchar = UCHARAT(++locinput);
break;
+ case REFFL:
+ regtainted = TRUE;
+ /* FALL THROUGH */
case REF:
+ case REFF:
n = ARG1(scan); /* which paren pair */
s = regstartp[n];
if (!s)
@@ -837,12 +841,19 @@ char *prog;
if (s == regendp[n])
break;
/* Inline the first character, for speed. */
- if (UCHARAT(s) != nextchar)
+ if (UCHARAT(s) != nextchar &&
+ (OP(scan) == REF ||
+ (UCHARAT(s) != ((OP(scan) == REFF
+ ? fold : fold_locale)[nextchar]))))
sayNO;
ln = regendp[n] - s;
if (locinput + ln > regeol)
sayNO;
- if (ln > 1 && memNE(s, locinput, ln))
+ if (ln > 1 && (OP(scan) == REF
+ ? memNE(s, locinput, ln)
+ : (OP(scan) == REFF
+ ? ibcmp(s, locinput, ln)
+ : ibcmp_locale(s, locinput, ln))))
sayNO;
locinput += ln;
nextchar = UCHARAT(locinput);