summaryrefslogtreecommitdiff
path: root/wsutil/unicode-utils.c
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss@ulticom.com>2010-12-07 20:24:57 +0000
committerJeff Morriss <jeff.morriss@ulticom.com>2010-12-07 20:24:57 +0000
commitad47f04c947fc6c7f0445f14c14fb147d4d973fa (patch)
tree7bcd79657b58a844ffc2adb4e024def56e2ae36d /wsutil/unicode-utils.c
parentd6eff0493cc7989bcf75663e45a4c1835306d25a (diff)
downloadwireshark-ad47f04c947fc6c7f0445f14c14fb147d4d973fa.tar.gz
Move getenv_utf8() to wsutil.
svn path=/trunk/; revision=35148
Diffstat (limited to 'wsutil/unicode-utils.c')
-rw-r--r--wsutil/unicode-utils.c12
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;