[goffice] debug
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goffice] debug
- Date: Sat, 31 Dec 2011 01:18:37 +0000 (UTC)
commit ae56d46e62a7f1b1272d21165ca893588a3ddde8
Author: Morten Welinder <terra gnome org>
Date: Fri Dec 30 20:17:02 2011 -0500
debug
ChangeLog | 5 +++++
goffice/utils/go-glib-extras.c | 6 +++---
2 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index e6ded90..b73b54c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-12-30 Morten Welinder <terra gnome org>
+
+ * goffice/utils/go-glib-extras.c (go_guess_encoding): Hook up
+ existing debug code.
+
2011-12-29 Andreas J. Guelzow <aguelzow pyrshep ca>
* goffice/utils/go-format.c (ethiopic_additional_digits): new
diff --git a/goffice/utils/go-glib-extras.c b/goffice/utils/go-glib-extras.c
index 41aa989..8f8605e 100644
--- a/goffice/utils/go-glib-extras.c
+++ b/goffice/utils/go-glib-extras.c
@@ -665,7 +665,7 @@ go_guess_encoding (const char *raw, size_t len, const char *user_guess,
GString **utf8_str, guint *truncated)
{
int try;
- gboolean debug = FALSE;
+ gboolean debug = go_debug_flag ("encoding");
g_return_val_if_fail (raw != NULL, NULL);
@@ -709,7 +709,7 @@ go_guess_encoding (const char *raw, size_t len, const char *user_guess,
continue;
if (debug)
- g_print ("Trying %s as encoding.\n", guess);
+ g_printerr ("Trying %s as encoding.\n", guess);
utf8_data = g_convert (raw, len, "UTF-8", guess,
&bytes_read, &bytes_written, &error);
@@ -723,7 +723,7 @@ go_guess_encoding (const char *raw, size_t len, const char *user_guess,
continue;
}
if (debug)
- g_print ("Guessed %s as encoding.\n", guess);
+ g_printerr ("Guessed %s as encoding.\n", guess);
if (utf8_str)
*utf8_str = g_string_new_len
(utf8_data, bytes_written);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]