summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>2001-03-18 15:23:51 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>2001-03-18 15:23:51 +0000
commit63cd067459124b5dc1d2ae98453df4ffdff11607 (patch)
tree5cebda9f50b0c1939cc0f777bcd439d5f165eb5e /pp_ctl.c
parent1b026014ba0f5424fabe070eda050db5e7df518a (diff)
downloadperl-63cd067459124b5dc1d2ae98453df4ffdff11607.tar.gz
Prefer !UTF8_IS_INVARIANT() over UTF8_IS_CONTINUED() when that
is the sense of the test being done. Avoid some magical 127 and 128 values by using macros. p4raw-id: //depot/perlio@9199
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index 93b89b14a7..f08f8bf988 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -551,7 +551,13 @@ PP(pp_formline)
if (item_is_utf) {
while (arg--) {
if (UTF8_IS_CONTINUED(*s)) {
- switch (UTF8SKIP(s)) {
+ STRLEN skip = UTF8SKIP(s);
+ switch (skip) {
+ default:
+ Move(s,t,skip,char);
+ s += skip;
+ t += skip;
+ break;
case 7: *t++ = *s++;
case 6: *t++ = *s++;
case 5: *t++ = *s++;