Rev 2745 | Rev 3165 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2745 | Rev 3069 | ||
---|---|---|---|
Line 59... | Line 59... | ||
59 | return NULL; |
59 | return NULL; |
60 | 60 | ||
61 | if (node->lft) { |
61 | if (node->lft) { |
62 | tmp = test_tree_parents(node->lft); |
62 | tmp = test_tree_parents(node->lft); |
63 | if (tmp != node) { |
63 | if (tmp != node) { |
64 | printf("Bad parent pointer key: %d, address: %p\n", |
64 | printf("Bad parent pointer key: %" PRIu64 ", address: %p\n", |
65 | tmp->key, node->lft); |
65 | tmp->key, node->lft); |
66 | } |
66 | } |
67 | } |
67 | } |
68 | if (node->rgt) { |
68 | if (node->rgt) { |
69 | tmp = test_tree_parents(node->rgt); |
69 | tmp = test_tree_parents(node->rgt); |
70 | if (tmp != node) { |
70 | if (tmp != node) { |
71 | printf("Bad parent pointer key: %d, address: %p\n", |
71 | printf("Bad parent pointer key: %" PRIu64 ", address: %p\n", |
72 | tmp->key,node->rgt); |
72 | tmp->key,node->rgt); |
73 | } |
73 | } |
74 | } |
74 | } |
75 | return node->par; |
75 | return node->par; |
76 | } |
76 | } |
Line 107... | Line 107... | ||
107 | } |
107 | } |
108 | 108 | ||
109 | if (node == NULL) |
109 | if (node == NULL) |
110 | return; |
110 | return; |
111 | 111 | ||
112 | printf("%d[%d]", node->key, node->balance); |
112 | printf("%" PRIu64 "[%" PRIu8 "]", node->key, node->balance); |
113 | if (node->lft != NULL || node->rgt != NULL) { |
113 | if (node->lft != NULL || node->rgt != NULL) { |
114 | printf("("); |
114 | printf("("); |
115 | 115 | ||
116 | print_tree_structure_flat(node->lft, level + 1); |
116 | print_tree_structure_flat(node->lft, level + 1); |
117 | if (node->rgt != NULL) { |
117 | if (node->rgt != NULL) { |
Line 189... | Line 189... | ||
189 | avltree_node_t *newnode; |
189 | avltree_node_t *newnode; |
190 | 190 | ||
191 | avltree_create(tree); |
191 | avltree_create(tree); |
192 | 192 | ||
193 | if (!quiet) |
193 | if (!quiet) |
194 | printf("Inserting %d nodes...", node_count); |
194 | printf("Inserting %" PRIc " nodes...", node_count); |
195 | 195 | ||
196 | for (i = 0; i < node_count; i++) { |
196 | for (i = 0; i < node_count; i++) { |
197 | newnode = alloc_avltree_node(); |
197 | newnode = alloc_avltree_node(); |
198 | 198 | ||
199 | avltree_insert(tree, newnode); |
199 | avltree_insert(tree, newnode); |