diff options
author | Max Kellermann <max@duempel.org> | 2008-10-02 19:01:04 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-10-02 19:01:04 +0200 |
commit | de5c385e46039d2f7410b5ba4a61f92725d7ca9a (patch) | |
tree | d30469f1a3d93f546cb08c5cbeaa04cd52cdd4a7 /src/charset.c | |
parent | ee9951222c4f0e3970466f6aba2e42dea21a6cdc (diff) | |
download | mpd-de5c385e46039d2f7410b5ba4a61f92725d7ca9a.tar.gz mpd-de5c385e46039d2f7410b5ba4a61f92725d7ca9a.tar.xz mpd-de5c385e46039d2f7410b5ba4a61f92725d7ca9a.zip |
charset: charset_init() returns character set
Don't pass "noconvert" to charset_init(). Let charset_init()
determine that with g_get_charset() and return its name.
Diffstat (limited to '')
-rw-r--r-- | src/charset.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/charset.c b/src/charset.c index aaec39c72..701fd2105 100644 --- a/src/charset.c +++ b/src/charset.c @@ -27,11 +27,13 @@ extern void screen_status_printf(const char *format, ...); static bool noconvert = true; +static const char *charset; -void -charset_init(bool disable) +const char * +charset_init(void) { - noconvert = disable; + noconvert = g_get_charset(&charset); + return charset; } unsigned @@ -75,9 +77,6 @@ utf8_to_locale(const char *utf8str) &wb, &rb, &error); if (error) { - const char *charset; - - g_get_charset(&charset); screen_status_printf(_("Error: Unable to convert characters to %s"), charset); g_error_free(error); |