diff options
-rw-r--r-- | src/tree.c | 25 |
1 files changed, 18 insertions, 7 deletions
@@ -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); |