diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2002-02-24 05:28:15 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-02-24 05:28:15 +0000 |
commit | 0ebc6274038e153e550e59b772cf72a406234aaa (patch) | |
tree | 0ae77a91505743ba82cbd659a6d3813f43538abc /regcomp.c | |
parent | 8f94de01b0ec23d3da0be11e7e9ccad913e01fae (diff) | |
download | perl-0ebc6274038e153e550e59b772cf72a406234aaa.tar.gz |
EBCDIC: this seems to calm the last of the
Malformed UTF-8 warnings.
p4raw-id: //depot/perl@14850
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 32 |
1 files changed, 20 insertions, 12 deletions
@@ -3182,6 +3182,8 @@ tryagain: if (len) p = oldp; else if (UTF) { + STRLEN unilen; + if (FOLD) { /* Emit all the Unicode characters. */ for (foldbuf = tmpbuf; @@ -3189,9 +3191,11 @@ tryagain: foldlen -= numlen) { ender = utf8_to_uvchr(foldbuf, &numlen); if (numlen > 0) { - reguni(pRExC_state, ender, s, &numlen); - s += numlen; - len += numlen; + reguni(pRExC_state, ender, s, &unilen); + s += unilen; + len += unilen; + /* In EBCDIC the numlen + * and unilen can differ. */ foldbuf += numlen; if (numlen >= foldlen) break; @@ -3201,10 +3205,10 @@ tryagain: } } else { - reguni(pRExC_state, ender, s, &numlen); + reguni(pRExC_state, ender, s, &unilen); if (numlen > 0) { - s += numlen; - len += numlen; + s += unilen; + len += unilen; } } } @@ -3215,6 +3219,8 @@ tryagain: break; } if (UTF) { + STRLEN unilen; + if (FOLD) { /* Emit all the Unicode characters. */ for (foldbuf = tmpbuf; @@ -3222,9 +3228,11 @@ tryagain: foldlen -= numlen) { ender = utf8_to_uvchr(foldbuf, &numlen); if (numlen > 0) { - reguni(pRExC_state, ender, s, &numlen); - len += numlen; - s += numlen; + reguni(pRExC_state, ender, s, &unilen); + len += unilen; + s += unilen; + /* In EBCDIC the numlen + * and unilen can differ. */ foldbuf += numlen; if (numlen >= foldlen) break; @@ -3234,10 +3242,10 @@ tryagain: } } else { - reguni(pRExC_state, ender, s, &numlen); + reguni(pRExC_state, ender, s, &unilen); if (numlen > 0) { - s += numlen; - len += numlen; + s += unilen; + len += unilen; } } len--; |