Lines Matching refs:node_t

3 typedef struct node_s node_t;  typedef
8 phn(node_t) link;
13 node_cmp(const node_t *a, const node_t *b) in node_cmp()
30 node_cmp_magic(const node_t *a, const node_t *b) { in node_cmp_magic()
38 typedef ph(node_t) heap_t;
39 ph_gen(static, heap_, heap_t, node_t, link, node_cmp_magic);
42 node_print(const node_t *node, unsigned depth) in node_print()
45 node_t *leftmost_child, *sibling; in node_print()
51 leftmost_child = phn_lchild_get(node_t, link, node); in node_print()
56 for (sibling = phn_next_get(node_t, link, leftmost_child); sibling != in node_print()
57 NULL; sibling = phn_next_get(node_t, link, sibling)) { in node_print()
65 node_t *auxelm; in heap_print()
73 for (auxelm = phn_next_get(node_t, link, heap->ph_root); auxelm != NULL; in heap_print()
74 auxelm = phn_next_get(node_t, link, auxelm)) { in heap_print()
75 assert_ptr_eq(phn_next_get(node_t, link, phn_prev_get(node_t, in heap_print()
86 node_validate(const node_t *node, const node_t *parent) in node_validate()
89 node_t *leftmost_child, *sibling; in node_validate()
96 leftmost_child = phn_lchild_get(node_t, link, node); in node_validate()
99 assert_ptr_eq((void *)phn_prev_get(node_t, link, leftmost_child), in node_validate()
103 for (sibling = phn_next_get(node_t, link, leftmost_child); sibling != in node_validate()
104 NULL; sibling = phn_next_get(node_t, link, sibling)) { in node_validate()
105 assert_ptr_eq(phn_next_get(node_t, link, phn_prev_get(node_t, in node_validate()
117 node_t *auxelm; in heap_validate()
124 for (auxelm = phn_next_get(node_t, link, heap->ph_root); auxelm != NULL; in heap_validate()
125 auxelm = phn_next_get(node_t, link, auxelm)) { in heap_validate()
126 assert_ptr_eq(phn_next_get(node_t, link, phn_prev_get(node_t, in heap_validate()
149 node_remove(heap_t *heap, node_t *node) in node_remove()
157 static node_t *
160 node_t *node = heap_remove_first(heap); in node_remove_first()
173 node_t nodes[NNODES]; in TEST_BEGIN()
238 node_t *prev = NULL; in TEST_BEGIN()
240 node_t *node = node_remove_first(&heap); in TEST_BEGIN()
252 node_t *prev = NULL; in TEST_BEGIN()
254 node_t *node = heap_first(&heap); in TEST_BEGIN()