summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-10-25 13:53:05 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-10-25 13:53:05 +0000
commit5bbb0b5ac8fdf0a5cc17b4f7b9199f9e3d7db4b6 (patch)
tree0f8dd6b0afb48396747581babd0d2b6f0c053180
parent578ab924f3e518fcfbd81dbd57562c05a119f630 (diff)
downloadperl-5bbb0b5ac8fdf0a5cc17b4f7b9199f9e3d7db4b6.tar.gz
Rename UTF8LEN() to be UNISKIP(), too confusing to have
UTF8LEN() and UTF8SKIP(). p4raw-id: //depot/perl@7437
-rw-r--r--pp.c2
-rw-r--r--utf8.c6
-rw-r--r--utf8.h4
3 files changed, 6 insertions, 6 deletions
diff --git a/pp.c b/pp.c
index 03f35eb43c..73b6a121f9 100644
--- a/pp.c
+++ b/pp.c
@@ -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. */
diff --git a/utf8.c b/utf8.c
index 2e4833983a..74158211a2 100644
--- a/utf8.c
+++ b/utf8.c
@@ -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;
}
diff --git a/utf8.h b/utf8.h
index bb494ab1ef..548d8212f5 100644
--- a/utf8.h
+++ b/utf8.h
@@ -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 : \