projects
/
platform
/
upstream
/
perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8b49aa3
)
Use UTF8SKIP(), from Simon Cozens.
author
Jarkko Hietaniemi
<jhi@iki.fi>
Fri, 13 Oct 2000 18:05:23 +0000
(18:05 +0000)
committer
Jarkko Hietaniemi
<jhi@iki.fi>
Fri, 13 Oct 2000 18:05:23 +0000
(18:05 +0000)
p4raw-id: //depot/perl@7222
utf8.c
patch
|
blob
|
history
diff --git
a/utf8.c
b/utf8.c
index
3ab402c
..
c077182
100644
(file)
--- 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++;