Lines Matching defs:left

170 	struct node *left;
209 for (nodep = s->root; nodep && nodep->left; nodep = nodep->left)
224 * If current node has a right child, next node is the left-most
228 for (nodep = nodep->right; nodep->left; nodep = nodep->left)
234 * No right child. Go up until node is left child of a parent.
252 * If current node has a left child, next node is the right-most
253 * of the left child.
255 if (nodep->left) {
256 for (nodep = nodep->left; nodep->right; nodep = nodep->right)
262 * No left child. Go up until node is right child of a parent.
265 while (nodep->parent && nodep == nodep->parent->left)
291 /* As needed, recursively duplicate the left and right subtrees */
292 if (subtree->left) {
293 root->left = node_copy_subtree(subtree->left);
294 root->left->parent = root;
316 nodep = nodep->idx > idx ? nodep->left : nodep->right) {
359 if (!parentp->left) {
360 parentp->left = nodep;
364 parentp = parentp->left;
418 /* Have both left and right child */
419 if (nodep->left && nodep->right) {
421 * Move left children to the leftmost leaf node
424 for (tmp = nodep->right; tmp->left; tmp = tmp->left)
426 tmp->left = nodep->left;
427 nodep->left = NULL;
428 tmp->left->parent = tmp;
432 if (nodep->left) {
434 s->root = nodep->left;
435 nodep->left->parent = NULL;
437 nodep->left->parent = nodep->parent;
438 if (nodep == nodep->parent->left)
439 nodep->parent->left = nodep->left;
442 nodep->parent->right = nodep->left;
446 nodep->parent = nodep->left = nodep->right = NULL;
460 if (nodep == nodep->parent->left)
461 nodep->parent->left = nodep->right;
468 nodep->parent = nodep->left = nodep->right = NULL;
478 if (nodep->parent->left == nodep)
479 nodep->parent->left = NULL;
486 nodep->parent = nodep->left = nodep->right = NULL;
785 nodep = nodep->idx > idx ? nodep->left : nodep->right)
880 else if (nodep == nodep->parent->left)
881 node_type = "left";
887 fprintf(stream, "%*s parent: %p left: %p right: %p\n", indent, "",
888 nodep->parent, nodep->left, nodep->right);
892 /* If present, dump contents of left child nodes */
893 if (nodep->left)
894 dump_nodes(stream, nodep->left, indent + 2);
1188 nodep = nodep->left;
1767 if (nodep->left) {
1768 if (nodep->left->parent != nodep) {
1771 " nodep: %p nodep->left: %p "
1772 "nodep->left->parent: %p",
1773 nodep, nodep->left,
1774 nodep->left->parent);