From 431e4a00e7792d3421c7122c32ca5df81505caf3 Mon Sep 17 00:00:00 2001 From: Lars Henriksen Date: Mon, 28 May 2018 21:07:49 +0200 Subject: Rename utf8_ord() to utf8_decode() Purely for readability and in preparation for the counterpart utf8_encode(). Signed-off-by: Lars Henriksen Signed-off-by: Lukas Fleischer --- src/utf8.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/utf8.c') diff --git a/src/utf8.c b/src/utf8.c index e7754ae..6b04331 100644 --- a/src/utf8.c +++ b/src/utf8.c @@ -270,7 +270,7 @@ static const struct utf8_range utf8_widthtab[] = { }; /* Decode a UTF-8 encoded character. Return the Unicode code point. */ -int utf8_ord(const char *s) +int utf8_decode(const char *s) { if (UTF8_ISCONT(*s)) return -1; @@ -298,7 +298,7 @@ int utf8_width(char *s) if (UTF8_ISCONT(*s)) return 0; - val = utf8_ord(s); + val = utf8_decode(s); low = 0; high = ARRAY_SIZE(utf8_widthtab); do { -- cgit v1.2.3-54-g00ecf