From 19cdd145d345c4560ccc9d841025415e9696b64e Mon Sep 17 00:00:00 2001 From: Kaz Kylheku <kaz@kylheku.com> Date: Sat, 14 Nov 2009 18:34:57 -0800 Subject: Provide both char * and unsigned char * interfaces in UTF-8 module. Fix unsigned and plan char * mixing. --- utf8.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'utf8.h') diff --git a/utf8.h b/utf8.h index 542a84fa..159a7e8a 100644 --- a/utf8.h +++ b/utf8.h @@ -24,10 +24,14 @@ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -size_t utf8_from(wchar_t *, const unsigned char *); -size_t utf8_to(unsigned char *, const wchar_t *); -wchar_t *utf8_dup_from(const unsigned char *); -unsigned char *utf8_dup_to(const wchar_t *); +size_t utf8_from_uc(wchar_t *, const unsigned char *); +size_t utf8_from(wchar_t *, const char *); +size_t utf8_to_uc(unsigned char *, const wchar_t *); +size_t utf8_to(char *, const wchar_t *); +wchar_t *utf8_dup_from_uc(const unsigned char *); +wchar_t *utf8_dup_from(const char *); +char *utf8_dup_to(const wchar_t *); +unsigned char *utf8_dup_to_uc(const wchar_t *); enum utf8_state { utf8_init, utf8_more1, utf8_more2, utf8_more3 }; -- cgit v1.2.3