Lines Matching refs:parent
366 struct node *parent; member
480 node = node->parent; in tree_walk()
492 static struct node *alloc_node(struct node *parent) in alloc_node() argument
499 node->parent = parent; in alloc_node()
509 if (node->parent) { in alloc_node()
510 bitnum = parent->bitnum; in alloc_node()
536 struct node *parent; in insert() local
579 parent = node->parent; in insert()
580 if (!parent) { in insert()
584 } else if (parent->left == node) { in insert()
585 parent->left = leaf; in insert()
586 parent->leftnode = LEAF; in insert()
587 if (parent->right) { in insert()
588 parent->keymask = 0; in insert()
589 parent->keybits = 0; in insert()
591 parent->keymask |= (1 << node->bitnum); in insert()
593 } else if (parent->right == node) { in insert()
594 parent->right = leaf; in insert()
595 parent->rightnode = LEAF; in insert()
596 if (parent->left) { in insert()
597 parent->keymask = 0; in insert()
598 parent->keybits = 0; in insert()
600 parent->keymask |= (1 << node->bitnum); in insert()
601 parent->keybits |= (1 << node->bitnum); in insert()
608 node = parent; in insert()
613 parent = node->parent; in insert()
614 if (!parent) in insert()
618 parent->keymask = 0; in insert()
619 parent->keybits = 0; in insert()
620 } else if (parent->left && parent->right) { in insert()
621 parent->keymask = 0; in insert()
622 parent->keybits = 0; in insert()
624 assert((parent->keymask & node->keymask) == 0); in insert()
625 parent->keymask |= node->keymask; in insert()
626 parent->keymask |= (1 << parent->bitnum); in insert()
627 parent->keybits |= node->keybits; in insert()
628 if (parent->right) in insert()
629 parent->keybits |= (1 << parent->bitnum); in insert()
631 node = parent; in insert()
659 struct node *parent; in prune() local
733 parent = node->parent; in prune()
736 if (parent->left == node) in prune()
737 parent->left = left; in prune()
738 else if (parent->right == node) in prune()
739 parent->right = left; in prune()
742 left->parent = parent; in prune()
764 node = parent; in prune()
783 node = node->parent; in prune()
804 node = node->parent; in prune()
844 n = n->parent; in mark_nodes()
862 n = n->parent; in mark_nodes()
873 node = node->parent; in mark_nodes()
892 n = n->parent; in mark_nodes()
898 if (!node->mark && node->parent->mark) { in mark_nodes()
914 n = n->parent; in mark_nodes()
920 if (!node->mark && node->parent->mark && in mark_nodes()
921 !node->parent->left) { in mark_nodes()
930 node = node->parent; in mark_nodes()
1009 node = node->parent; in index_nodes()
1032 node->index = node->parent->index; in mark_subtree()
1172 node = node->parent; in size_nodes()
1307 node = node->parent; in emit()