Lines Matching defs:root

65 	dns_rbtnode_t *         root;
182 dns_rbtnode_t *root;
189 for (root = node; ! IS_ROOT(root); root = PARENT(root))
192 return (PARENT(root));
254 rbt->root = NULL;
290 dns_rbt_deletetreeflat(rbt, quantum, &rbt->root);
291 if (rbt->root != NULL)
372 dns_rbtnode_t **root, *parent, *child, *current, *new_current;
395 if (rbt->root == NULL) {
400 rbt->root = new_current;
414 root = &rbt->root;
415 INSIST(IS_ROOT(*root));
418 child = *root;
478 root = &DOWN(current);
480 INSIST(*root == NULL ||
481 (IS_ROOT(*root) &&
482 PARENT(*root) == current));
561 if (*root == current)
562 *root = new_current;
568 * Set up the new root of the next level.
575 root = &DOWN(new_current);
633 dns_rbt_addonlevel(new_current, current, order, root);
709 if (rbt->root == NULL)
738 current = rbt->root;
739 current_root = rbt->root;
778 * current_root is the root of the current level, so
1315 dns_rbt_deletefromlevel(node, parent == NULL ? &rbt->root :
1665 dns_rbtnode_t *child, *root, *parent, *grandparent;
1674 root = *rootp;
1675 if (root == NULL) {
1686 child = root;
1708 while (node != root && IS_RED(PARENT(node))) {
1727 rotate_left(parent, &root);
1734 rotate_right(grandparent, &root);
1745 rotate_right(parent, &root);
1752 rotate_left(grandparent, &root);
1757 MAKE_BLACK(root);
1758 ENSURE(IS_ROOT(root));
1759 *rootp = root;
1904 * This is the root being deleted, and at this point
2003 * This should only be used on the root of a tree, because no color fixup
2006 * NOTE: No root pointer maintenance is done, because the function is only
2010 * In each case, the root pointer is no longer relevant, so there
2011 * is no need for a root parameter to this function.
2142 dns_rbt_printtree(dns_rbtnode_t *root, dns_rbtnode_t *parent, int depth) {
2145 if (root != NULL) {
2146 dns_rbt_printnodename(root);
2147 printf(" (%s", IS_RED(root) ? "RED" : "black");
2153 if ((! IS_ROOT(root) && PARENT(root) != parent) ||
2154 ( IS_ROOT(root) && depth > 0 &&
2155 DOWN(PARENT(root)) != root)) {
2158 if (PARENT(root) != NULL)
2159 dns_rbt_printnodename(PARENT(root));
2170 if (DOWN(root)) {
2173 dns_rbt_printnodename(root);
2175 dns_rbt_printtree(DOWN(root), NULL, depth);
2178 dns_rbt_printnodename(root);
2182 if (IS_RED(root) && IS_RED(LEFT(root)))
2184 dns_rbt_printtree(LEFT(root), root, depth);
2186 if (IS_RED(root) && IS_RED(RIGHT(root)))
2188 dns_rbt_printtree(RIGHT(root), root, depth);
2198 dns_rbt_printtree(rbt->root, NULL, 0);
2293 * No left links, so move toward the root. If at any point on
2345 * Got to the root of this level without having traversed
2422 * root level will never be more than one name, and everything
2528 * Head back toward the root of the tree, looking for any path
2530 * that left link. In the event the root of the level is
2549 * Reached the root without having traversed
2580 * root level will never be more than one name, and everything
2616 chain->end = rbt->root;
2638 result = move_chain_to_last(chain, rbt->root);