From e9d9631a82c8da31df6b22175521581fcacf1462 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Wed, 25 Oct 2017 12:47:29 -0400 Subject: MqTree: Split long node lines of tree debugging output --- (limited to 'src') 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); -- cgit v0.9.1