diff options
Diffstat (limited to 'wsutil/unicode-utils.c')
-rw-r--r-- | wsutil/unicode-utils.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/wsutil/unicode-utils.c b/wsutil/unicode-utils.c index f011d46292..80541a5784 100644 --- a/wsutil/unicode-utils.c +++ b/wsutil/unicode-utils.c @@ -47,7 +47,9 @@ */ /* Convert from UTF-8 to UTF-16. */ -wchar_t * utf_8to16(const char *utf8str) { +wchar_t * +utf_8to16(const char *utf8str) +{ static wchar_t *utf16buf[3]; static int utf16buf_len[3]; static int idx; @@ -84,7 +86,9 @@ wchar_t * utf_8to16(const char *utf8str) { return utf16buf[idx]; } -void utf_8to16_snprintf(TCHAR *utf16buf, gint utf16buf_len, const gchar* fmt, ...) { +void +utf_8to16_snprintf(TCHAR *utf16buf, gint utf16buf_len, const gchar* fmt, ...) +{ va_list ap; gchar* dst; @@ -98,7 +102,9 @@ void utf_8to16_snprintf(TCHAR *utf16buf, gint utf16buf_len, const gchar* fmt, .. } /* Convert from UTF-16 to UTF-8. */ -gchar * utf_16to8(const wchar_t *utf16str) { +gchar * +utf_16to8(const wchar_t *utf16str) +{ static gchar *utf8buf[3]; static int utf8buf_len[3]; static int idx; |