summaryrefslogtreecommitdiff
path: root/doop.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-01-05 06:44:27 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-01-05 06:44:27 +0000
commitfd400ab9029cac48f6054d57b59a99ec1c5d5e1e (patch)
tree48c21ddf1f8c4aa55b33343393a2bf6d75524a0c /doop.c
parentf5cf745e299cac34ef186d2d2d056e876998ccb2 (diff)
downloadperl-fd400ab9029cac48f6054d57b59a99ec1c5d5e1e.tar.gz
UTF-8 cleanup.
p4raw-id: //depot/perl@8328
Diffstat (limited to 'doop.c')
-rw-r--r--doop.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/doop.c b/doop.c
index f6dbe67a6b..212d496ac9 100644
--- a/doop.c
+++ b/doop.c
@@ -66,7 +66,7 @@ S_do_trans_simple(pTHX_ SV *sv)
c = utf8_to_uv(s, send - s, &ulen, 0);
if (c < 0x100 && (ch = tbl[(short)c]) >= 0) {
matches++;
- if (ch < 0x80)
+ if (UTF8_IS_ASCII(ch))
*d++ = ch;
else
d = uv_to_utf8(d,ch);
@@ -254,7 +254,7 @@ S_do_trans_simple_utf8(pTHX_ SV *sv)/* SPC - OK */
if (!isutf8) {
U8 *t = s, *e = s + len;
while (t < e)
- if ((hibit = *t++ & 0x80))
+ if ((hibit = UTF8_IS_CONTINUED(*t++)))
break;
if (hibit)
s = bytes_to_utf8(s, &len);
@@ -330,7 +330,7 @@ S_do_trans_count_utf8(pTHX_ SV *sv)/* SPC - OK */
if (!SvUTF8(sv)) {
U8 *t = s, *e = s + len;
while (t < e)
- if ((hibit = *t++ & 0x80))
+ if ((hibit = !UTF8_IS_ASCII(*t++)))
break;
if (hibit)
start = s = bytes_to_utf8(s, &len);
@@ -374,7 +374,7 @@ S_do_trans_complex_utf8(pTHX_ SV *sv) /* SPC - NOT OK */
if (!isutf8) {
U8 *t = s, *e = s + len;
while (t < e)
- if ((hibit = *t++ & 0x80))
+ if ((hibit = !UTF8_IS_ASCII(*t++)))
break;
if (hibit)
s = bytes_to_utf8(s, &len);