summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/tree.c25
1 files changed, 18 insertions, 7 deletions
diff --git a/src/tree.c b/src/tree.c
index 1363098..c940fae 100644
--- a/src/tree.c
+++ b/src/tree.c
@@ -44,14 +44,25 @@ debug_print_tree_recurse(MqTree *node, gsize indent)
for (i = 0; i < indent; ++i) {
g_print("\t");
}
- g_print("\t0x%0*" PRIxPTR " (size %d, position %d, "
- "parent 0x%0*" PRIxPTR ", "
- "siblings 0x%0*" PRIxPTR " and 0x%0*" PRIxPTR ", "
- "children 0x%0*" PRIxPTR " to 0x%0*" PRIxPTR ")\n",
- PRIWxPTR, (uintptr_t) node, node->size, node->position,
- PRIWxPTR, (uintptr_t) node->parent,
+ g_print("\t0x%0*" PRIxPTR " (size %d, position %d)\n",
+ PRIWxPTR, (uintptr_t) node, node->size, node->position);
+ for (i = 0; i < indent; ++i) {
+ g_print("\t");
+ }
+ g_print("\t\t\t(parent 0x%0*" PRIxPTR ")\n",
+ PRIWxPTR, (uintptr_t) node->parent);
+ for (i = 0; i < indent; ++i) {
+ g_print("\t");
+ }
+ g_print("\t\t\t(siblings 0x%0*" PRIxPTR " and "
+ "0x%0*" PRIxPTR ")\n",
PRIWxPTR, (uintptr_t) node->prev,
- PRIWxPTR, (uintptr_t) node->next,
+ PRIWxPTR, (uintptr_t) node->next);
+ for (i = 0; i < indent; ++i) {
+ g_print("\t");
+ }
+ g_print("\t\t\t(children 0x%0*" PRIxPTR " to "
+ "0x%0*" PRIxPTR ")\n",
PRIWxPTR, (uintptr_t) node->first_child,
PRIWxPTR, (uintptr_t) node->last_child);