Lines Matching refs:root
183 struct node *root; member
209 for (nodep = s->root; nodep && nodep->left; nodep = nodep->left) in node_first()
278 struct node *root; in node_copy_subtree() local
281 root = calloc(1, sizeof(*root)); in node_copy_subtree()
282 if (!root) { in node_copy_subtree()
287 root->idx = subtree->idx; in node_copy_subtree()
288 root->mask = subtree->mask; in node_copy_subtree()
289 root->num_after = subtree->num_after; in node_copy_subtree()
293 root->left = node_copy_subtree(subtree->left); in node_copy_subtree()
294 root->left->parent = root; in node_copy_subtree()
298 root->right = node_copy_subtree(subtree->right); in node_copy_subtree()
299 root->right->parent = root; in node_copy_subtree()
302 return root; in node_copy_subtree()
315 for (nodep = s->root; nodep; in node_find()
347 if (!s->root) { in node_add()
348 s->root = nodep; in node_add()
356 parentp = s->root; in node_add()
403 return s->root && s->num_set == 0; in sparsebit_all_set()
434 s->root = nodep->left; in node_rm()
456 s->root = nodep->right; in node_rm()
476 s->root = NULL; in node_rm()
784 for (nodep = s->root; nodep; in sparsebit_is_set()
929 fprintf(stream, "%*sroot: %p\n", indent, "", s->root); in sparsebit_dump_internal()
932 if (s->root) in sparsebit_dump_internal()
933 dump_nodes(stream, s->root, indent); in sparsebit_dump_internal()
978 if (s->root) { in sparsebit_copy()
979 d->root = node_copy_subtree(s->root); in sparsebit_copy()
1057 if (!s->root) in sparsebit_any_set()
1065 assert(s->root->mask != 0); in sparsebit_any_set()
1067 (s->root->num_after == ((sparsebit_num_t) 0) - MASK_BITS && in sparsebit_any_set()
1068 s->root->mask == ~(mask_t) 0)); in sparsebit_any_set()
1180 for (nodep = s->root; nodep;) { in sparsebit_next_set()
1794 if (s->root != nodep) { in sparsebit_validate_internal()
1797 s->root, nodep); in sparsebit_validate_internal()