diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2000-10-25 13:53:05 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-10-25 13:53:05 +0000 |
commit | 5bbb0b5ac8fdf0a5cc17b4f7b9199f9e3d7db4b6 (patch) | |
tree | 0f8dd6b0afb48396747581babd0d2b6f0c053180 | |
parent | 578ab924f3e518fcfbd81dbd57562c05a119f630 (diff) | |
download | perl-5bbb0b5ac8fdf0a5cc17b4f7b9199f9e3d7db4b6.tar.gz |
Rename UTF8LEN() to be UNISKIP(), too confusing to have
UTF8LEN() and UTF8SKIP().
p4raw-id: //depot/perl@7437
-rw-r--r-- | pp.c | 2 | ||||
-rw-r--r-- | utf8.c | 6 | ||||
-rw-r--r-- | utf8.h | 4 |
3 files changed, 6 insertions, 6 deletions
@@ -1486,7 +1486,7 @@ PP(pp_complement) while (tmps < send) { UV c = utf8_to_uv(tmps, &l); tmps += UTF8SKIP(tmps); - targlen += UTF8LEN(~c); + targlen += UNISKIP(~c); } /* Now rewind strings and write them. */ @@ -136,7 +136,7 @@ Perl_is_utf8_char(pTHX_ U8 *s) s++; } - if (UTF8LEN(uv) < len) + if (UNISKIP(uv) < len) return 0; return len; @@ -290,11 +290,11 @@ Perl_utf8_to_uv_chk(pTHX_ U8* s, STRLEN curlen, STRLEN* retlen, bool checking) "Malformed UTF-8 character (impossible character 0x%04"UVxf")", uv); goto malformed; - } else if (expectlen > UTF8LEN(uv)) { + } else if (expectlen > UNISKIP(uv)) { if (dowarn) Perl_warner(aTHX_ WARN_UTF8, "Malformed UTF-8 character (%d byte%s, need %d)", - expectlen, expectlen > 1 ? "s": "", UTF8LEN(uv)); + expectlen, expectlen > 1 ? "s": "", UNISKIP(uv)); goto malformed; } @@ -36,7 +36,7 @@ END_EXTERN_C #define UTF8SKIP(s) PL_utf8skip[*(U8*)s] #ifdef HAS_QUAD -#define UTF8LEN(uv) ( (uv) < 0x80 ? 1 : \ +#define UNISKIP(uv) ( (uv) < 0x80 ? 1 : \ (uv) < 0x800 ? 2 : \ (uv) < 0x10000 ? 3 : \ (uv) < 0x200000 ? 4 : \ @@ -45,7 +45,7 @@ END_EXTERN_C (uv) < 0x1000000000LL ? 7 : 13 ) #else /* No, I'm not even going to *TRY* putting #ifdef inside a #define */ -#define UTF8LEN(uv) ( (uv) < 0x80 ? 1 : \ +#define UNISKIP(uv) ( (uv) < 0x80 ? 1 : \ (uv) < 0x800 ? 2 : \ (uv) < 0x10000 ? 3 : \ (uv) < 0x200000 ? 4 : \ |