Now that to_utf8_fold() was fixed.
Jarkko Hietaniemi [Tue, 1 Jan 2002 18:27:50 +0000 (18:27 +0000)]
p4raw-id: //depot/perl@14004

regcomp.c
regexec.c

index 9dad631..a61d039 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -3132,9 +3132,7 @@ tryagain:
                    p = regwhite(p, RExC_end);
                if (UTF && FOLD) {
                    /* Prime the casefolded buffer. */
-                   toFOLD_uni(ender, tmpbuf, &foldlen);
-                   /* Need to peek at the first character. */
-                   ender = utf8_to_uvchr(tmpbuf, 0);
+                   ender = toFOLD_uni(ender, tmpbuf, &foldlen);
                }
                if (ISMULT2(p)) { /* Back off on ?+*. */
                    if (len)
index 4db4729..be1f2b2 100644 (file)
--- a/regexec.c
+++ b/regexec.c
@@ -1002,8 +1002,7 @@ S_find_byclass(pTHX_ regexp * prog, regnode *c, char *s, char *strend, char *sta
                            goto got_it;
                        else {
                             uvchr_to_utf8(tmpbuf, c);
-                            to_utf8_fold(tmpbuf, foldbuf, &foldlen);
-                            f = utf8_to_uvchr(foldbuf, 0);
+                            f = to_utf8_fold(tmpbuf, foldbuf, &foldlen);
                             if ( f != c
                                  && (f == c1 || f == c2)
                                  && (ln == foldlen ||
@@ -1041,8 +1040,7 @@ S_find_byclass(pTHX_ regexp * prog, regnode *c, char *s, char *strend, char *sta
                            goto got_it;
                        else {
                             uvchr_to_utf8(tmpbuf, c);
-                            to_utf8_fold(tmpbuf, foldbuf, &foldlen);
-                            f = utf8_to_uvchr(foldbuf, 0);
+                            f = to_utf8_fold(tmpbuf, foldbuf, &foldlen);
                             if ( f != c
                                  && (f == c1 || f == c2)
                                  && (ln == foldlen ||