summaryrefslogtreecommitdiff
path: root/utf8.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-10-13 18:05:23 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-10-13 18:05:23 +0000
commit97bc95472059d1dda25b407e80ce9946b88fc340 (patch)
treeabddc6c85c2d0c103fdabca9e87944290f75032e /utf8.c
parent8b49aa39b877842cc2bab897e1bc5d42b9716a04 (diff)
downloadperl-97bc95472059d1dda25b407e80ce9946b88fc340.tar.gz
Use UTF8SKIP(), from Simon Cozens.
p4raw-id: //depot/perl@7222
Diffstat (limited to 'utf8.c')
-rw-r--r--utf8.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/utf8.c b/utf8.c
index 3ab402c497..c077182795 100644
--- a/utf8.c
+++ b/utf8.c
@@ -116,13 +116,7 @@ Perl_is_utf8_char(pTHX_ U8 *s)
if (!(u & 0x40))
return 0;
- if (!(u & 0x20)) { len = 2; }
- else if (!(u & 0x10)) { len = 3; }
- else if (!(u & 0x08)) { len = 4; }
- else if (!(u & 0x04)) { len = 5; }
- else if (!(u & 0x02)) { len = 6; }
- else if (!(u & 0x01)) { len = 7; }
- else { len = 13; } /* whoa! */
+ len = UTF8SKIP(u);
slen = len - 1;
s++;