static void pr_rec (Rec_s r, int indent) { pr_indent(indent); pr_lump(r.key); printf(": "); pr_lump(r.val); printf("\n"); }
/*static*/ int pr_rec (Rec_s rec, BiNode_s *root, void *user) { u64 *recnum = user; printf("%4lld. ", ++*recnum); pr_lump(rec.key); printf(" = "); pr_lump(rec.val); printf("\n"); return 0; }
void bi_pr_path (BiTree_s *tree, Lump_s key) { BiNode_s *node = tree->root; while (node) { pr_lump(node->rec.key); int r = cmplump(key, node->rec.key); if (r == 0) { printf("\n"); return; } printf(" "); if (r < 0) { node = node->left; } else { node = node->right; } } }
void pr_rec(Hrec_s rec) { pr_key(rec.key); printf(" = "); pr_lump(rec.val); }