summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6dfaea0)
raw | patch | inline | side by side (parent: 6dfaea0)
author | Kalle Wallin <kaw@linux.se> | |
Wed, 14 Apr 2004 19:26:25 +0000 (19:26 +0000) | ||
committer | Kalle Wallin <kaw@linux.se> | |
Wed, 14 Apr 2004 19:26:25 +0000 (19:26 +0000) |
stderr if DEBUG is enabled.
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@758 09075e82-0dd4-0310-85a5-a0d7c8717e4f
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@758 09075e82-0dd4-0310-85a5-a0d7c8717e4f
support.c | patch | blob | history |
diff --git a/support.c b/support.c
index b55fc0ac79af3b2bf1a27e8e15196deeac584bf7..564fd9b83825d19246d8b53f8d07741062ab6f96 100644 (file)
--- a/support.c
+++ b/support.c
#include <locale.h>
#endif
+#ifdef DEBUG
+#define D(x) x
+#else
+#define D(x)
+#endif
+
#define BUFSIZE 1024
+extern void screen_status_printf(char *format, ...);
+
static const char *charset = NULL;
static const char *locale = NULL;
static gboolean noconvert = TRUE;
&error);
if( error )
{
- g_printerr("utf8_to_locale(): %s\n", error->message);
+ screen_status_printf("Error: Unable to convert characters to %s",
+ charset);
+ D(g_printerr("utf8_to_locale(): %s\n", error->message));
g_error_free(error);
return g_strdup(utf8str);
}
&error);
if( error )
{
- g_printerr("locale_to_utf8: %s\n", error->message);
+ screen_status_printf("Error: Unable to convert characters to UTF-8");
+ D(g_printerr("locale_to_utf8: %s\n", error->message));
g_error_free(error);
return g_strdup(localestr);
}