Lines Matching defs:right
171 struct node *right;
224 * If current node has a right child, next node is the left-most
225 * of the right child.
227 if (nodep->right) {
228 for (nodep = nodep->right; nodep->left; nodep = nodep->left)
234 * No right child. Go up until node is left child of a parent.
237 while (nodep->parent && nodep == nodep->parent->right)
252 * If current node has a left child, next node is the right-most
256 for (nodep = nodep->left; nodep->right; nodep = nodep->right)
262 * No left child. Go up until node is right child of a parent.
291 /* As needed, recursively duplicate the left and right subtrees */
297 if (subtree->right) {
298 root->right = node_copy_subtree(subtree->right);
299 root->right->parent = root;
316 nodep = nodep->idx > idx ? nodep->left : nodep->right) {
367 if (!parentp->right) {
368 parentp->right = nodep;
372 parentp = parentp->right;
418 /* Have both left and right child */
419 if (nodep->left && nodep->right) {
422 * of the right child.
424 for (tmp = nodep->right; tmp->left; tmp = tmp->left)
441 assert(nodep == nodep->parent->right);
442 nodep->parent->right = nodep->left;
446 nodep->parent = nodep->left = nodep->right = NULL;
454 if (nodep->right) {
456 s->root = nodep->right;
457 nodep->right->parent = NULL;
459 nodep->right->parent = nodep->parent;
461 nodep->parent->left = nodep->right;
463 assert(nodep == nodep->parent->right);
464 nodep->parent->right = nodep->right;
468 nodep->parent = nodep->left = nodep->right = NULL;
481 assert(nodep == nodep->parent->right);
482 nodep->parent->right = NULL;
486 nodep->parent = nodep->left = nodep->right = NULL;
784 nodep = nodep->idx > idx ? nodep->left : nodep->right)
882 assert(nodep == nodep->parent->right);
883 node_type = "right";
886 fprintf(stream, "%*s parent: %p left: %p right: %p\n", indent, "",
887 nodep->parent, nodep->left, nodep->right);
895 /* If present, dump contents of right child nodes */
896 if (nodep->right)
897 dump_nodes(stream, nodep->right, indent + 2);
1166 * Find the leftmost 'candidate' overlapping or to the right
1189 nodep = nodep->right;
1779 if (nodep->right) {
1780 if (nodep->right->parent != nodep) {
1783 " nodep: %p nodep->right: %p "
1784 "nodep->right->parent: %p",
1785 nodep, nodep->right,
1786 nodep->right->parent);