Rename utf8_ord() to utf8_decode()
Purely for readability and in preparation for the counterpart utf8_encode(). Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
This commit is contained in:
committed by
Lukas Fleischer
parent
30f411257a
commit
431e4a00e7
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user