Fixed error messages of: g_(filename|locale)_(from|to)_utf8()
authorshort <>
Thu, 26 Aug 2004 10:24:51 +0000 (10:24 +0000)
committershort <>
Thu, 26 Aug 2004 10:24:51 +0000 (10:24 +0000)
src/client/cmdline/utf8.c
src/client/cmdline/utf8.h

index 40a5ce0..55acc35 100644 (file)
@@ -28,6 +28,7 @@
 
 gchar *cmd_utf8_macro_malloc_errorchecking(
                gchar *(*func)(const gchar *string,gssize len,gsize *bytes_read,gsize *bytes_written,GError **error),
+               const gchar *func_name,
                const gchar *string)
 {
 GError *error;
@@ -44,8 +45,8 @@ gchar *r;
                        NULL,   /* bytes_written */
                        &error);        /* error */
        if (error) {
-               g_log(G_LOG_DOMAIN,G_LOG_LEVEL_WARNING,"captivefs g_filename_from_utf8(): name=\"%s\": %s",
-                               string,error->message);
+               g_log(G_LOG_DOMAIN,G_LOG_LEVEL_WARNING,"captivefs %s(): name=\"%s\": %s",
+                               func_name,string,error->message);
                g_clear_error(&error);
                }
        return r;
index 4042653..f0b7acd 100644 (file)
@@ -28,7 +28,8 @@
 
 gchar *cmd_utf8_macro_malloc_errorchecking(
                gchar *(*func)(const gchar *string,gssize len,gsize *bytes_read,gsize *bytes_written,GError **error),
-               const gchar *name);
+               const gchar *func_name,
+               const gchar *string);
 
 
 #define CMD_UTF8_MACRO_ALLOCA(func,string) ({ \
@@ -38,6 +39,7 @@ gchar *cmd_utf8_macro_malloc_errorchecking(
                 \
                _cmd_utf8_macro_alloca_r_malloc=cmd_utf8_macro_malloc_errorchecking( \
                                func, \
+                               G_STRINGIFY(func), \
                                _cmd_utf8_macro_alloca_string); \
                if (!_cmd_utf8_macro_alloca_r_malloc) \
                        _cmd_utf8_macro_alloca_r=_cmd_utf8_macro_alloca_string; \