Home | History | Annotate | Download | only in e2fsck

Lines Matching refs:parent

43  * program which uses dict to define, for instance, a macro called ``parent''.
53 #define parent dict_parent
89 lowleft->parent = upper;
91 lower->parent = upparent = upper->parent;
93 /* don't need to check for root node here because root->parent is
94 the sentinel nil node, and root->parent->left points back to root */
104 upper->parent = lower;
118 lowright->parent = upper;
120 lower->parent = upparent = upper->parent;
130 upper->parent = lower;
268 new->nilnode.parent = &new->nilnode;
345 dict->nilnode.parent = &dict->nilnode;
366 dict->nilnode.parent = &dict->nilnode;
382 dict->nilnode.parent = &dict->nilnode;
406 /* nil->left is the root node; check that its parent pointer is nil */
407 if (nil->left->parent != nil)
564 dnode_t *parent = nil, *uncle, *grandpa;
576 parent = where;
589 parent->left = node;
591 parent->right = node;
593 node->parent = parent;
603 while (parent->color == dnode_red) {
604 grandpa = parent->parent;
605 if (parent == grandpa->left) {
607 if (uncle->color == dnode_red) { /* red parent, red uncle */
608 parent->color = dnode_black;
612 parent = grandpa->parent;
613 } else { /* red parent, black uncle */
614 if (node == parent->right) {
615 rotate_left(parent);
616 parent = node;
617 assert (grandpa == parent->parent);
618 /* rotation between parent and child preserves grandpa */
620 parent->color = dnode_black;
625 parent == parent->parent->right */
628 parent->color = dnode_black;
632 parent = grandpa->parent;
634 if (node == parent->left) {
635 rotate_right(parent);
636 parent = node;
637 assert (grandpa == parent->parent);
639 parent->color = dnode_black;
661 dnode_t *nil = dict_nil(dict), *child, *delparent = delete->parent;
682 dnode_t *nextparent = next->parent;
686 assert (next->parent != nil);
695 child->parent = nextparent;
709 next->parent = delparent;
712 next->left->parent = next;
713 next->right->parent = next;
730 child->parent = delparent = delete->parent;
740 delete->parent = NULL;
751 dnode_t *parent, *sister;
756 parent = child->parent;
757 if (child == parent->left) {
758 sister = parent->right;
762 parent->color = dnode_red;
763 rotate_left(parent);
764 sister = parent->right;
770 child = parent;
777 sister = parent->right;
780 sister->color = parent->color;
782 parent->color = dnode_black;
783 rotate_left(parent);
786 } else { /* symmetric case: child == child->parent->right */
787 assert (child == parent->right);
788 sister = parent->left;
792 parent->color = dnode_red;
793 rotate_right(parent);
794 sister = parent->left;
800 child = parent;
807 sister = parent->left;
810 sister->color = parent->color;
812 parent->color = dnode_black;
813 rotate_right(parent);
895 dnode_t *nil = dict_nil(dict), *parent, *left;
904 parent = curr->parent;
906 while (parent != nil && curr == parent->right) {
907 curr = parent;
908 parent = curr->parent;
911 return (parent == nil) ? NULL : parent;
921 dnode_t *nil = dict_nil(dict), *parent, *right;
930 parent = curr->parent;
932 while (parent != nil && curr == parent->left) {
933 curr = parent;
934 parent = curr->parent;
937 return (parent == nil) ? NULL : parent;
987 new->parent = NULL;
997 dnode->parent = NULL;
1027 return (dnode->parent && dnode->left && dnode->right);
1112 complete->parent = tree[level];
1128 complete->parent = tree[level];
1135 complete->parent = curr;
1148 complete->parent = tree[i];
1155 complete->parent = dictnil;