summaryrefslogtreecommitdiff
path: root/glib/gtree.c
diff options
context:
space:
mode:
authorTim Janik <timj@gtk.org>1998-08-18 03:50:35 +0000
committerTim Janik <timj@src.gnome.org>1998-08-18 03:50:35 +0000
commite1f0fb0c1e096407b41c98c7817fc4fc2aba5217 (patch)
tree85c341f53d4a4fb840a323fc0bf307456b35d48b /glib/gtree.c
parentd7f23839498d1f6115ad86a2df4a173206651c82 (diff)
downloadglib-e1f0fb0c1e096407b41c98c7817fc4fc2aba5217.tar.gz
new function g_log_set_always_fatal() to set an additional fatal_mask for
Tue Aug 18 04:40:17 1998 Tim Janik <timj@gtk.org> * glib.h: * gmessages.c: new function g_log_set_always_fatal() to set an additional fatal_mask for log levels that are considered to be fatal globally (required by gtk). since this mask is not domain-associated, it is restricted to the log levels, introduced by glib itself. * gmem.c: * grel.c: * gtree.c (g_tree_node_check): don't use g_print() calls for informational/debugging output, but log all this stuff through g_log() with G_LOG_LEVEL_INFO. libraries shouldn't use printf(), g_print() or g_printerr() at all.
Diffstat (limited to 'glib/gtree.c')
-rw-r--r--glib/gtree.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/glib/gtree.c b/glib/gtree.c
index 2a3dd8fa4..00bfb14c0 100644
--- a/glib/gtree.c
+++ b/glib/gtree.c
@@ -699,22 +699,23 @@ g_tree_node_check (GTreeNode *node)
gint left_height;
gint right_height;
gint balance;
-
+
if (node)
{
left_height = 0;
right_height = 0;
-
+
if (node->left)
left_height = g_tree_node_height (node->left);
if (node->right)
right_height = g_tree_node_height (node->right);
-
+
balance = right_height - left_height;
if (balance != node->balance)
- g_print ("g_tree_node_check: failed: %d ( %d )\n",
- balance, node->balance);
-
+ g_log (g_log_domain_glib, G_LOG_LEVEL_INFO,
+ "g_tree_node_check: failed: %d ( %d )\n",
+ balance, node->balance);
+
if (node->left)
g_tree_node_check (node->left);
if (node->right)