Lines Matching refs:left
51 #define left dict_left macro
69 #define dict_root(D) ((D)->nilnode.left)
88 upper->right = lowleft = lower->left; in rotate_left()
96 if (upper == upparent->left) { in rotate_left()
97 upparent->left = lower; in rotate_left()
103 lower->left = upper; in rotate_left()
116 lower = upper->left; in rotate_right()
117 upper->left = lowright = lower->right; in rotate_right()
125 assert (upper == upparent->left); in rotate_right()
126 upparent->left = lower; in rotate_right()
142 free_nodes(dict, node->left, nil); in free_nodes()
196 height_left = verify_redblack(nil, root->left); in verify_redblack()
203 if (root->left->color != dnode_black) in verify_redblack()
227 return 1 + verify_node_count(nil, root->left) in verify_node_count()
243 || verify_dict_has_node(nil, root->left, node) in verify_dict_has_node()
266 new->nilnode.left = &new->nilnode; in dict_create()
314 dict->nilnode.left = &dict->nilnode; in dict_free_nodes()
343 dict->nilnode.left = &dict->nilnode; in dict_init()
364 dict->nilnode.left = &dict->nilnode; in dict_init_like()
380 dict->nilnode.left = &dict->nilnode; in dict_clear()
407 if (nil->left->parent != nil) in dict_verify()
426 int dict_similar(const dict_t *left, const dict_t *right) in dict_similar() argument
428 if (left->compare != right->compare) in dict_similar()
431 if (left->allocnode != right->allocnode) in dict_similar()
434 if (left->freenode != right->freenode) in dict_similar()
437 if (left->context != right->context) in dict_similar()
440 if (left->dupes != right->dupes) in dict_similar()
466 root = root->left; in dict_lookup()
475 root = root->left; in dict_lookup()
506 root = root->left; in dict_lower_bound()
512 root = root->left; in dict_lower_bound()
535 root = root->left; in dict_upper_bound()
581 where = where->left; in dict_insert()
589 parent->left = node; in dict_insert()
594 node->left = nil; in dict_insert()
605 if (parent == grandpa->left) { in dict_insert()
626 uncle = grandpa->left; in dict_insert()
634 if (node == parent->left) { in dict_insert()
680 if (delete->left != nil && delete->right != nil) { in dict_delete()
687 assert (next->left == nil); in dict_delete()
697 if (nextparent->left == next) { in dict_delete()
698 nextparent->left = child; in dict_delete()
710 next->left = delete->left; in dict_delete()
712 next->left->parent = next; in dict_delete()
717 if (delparent->left == delete) { in dict_delete()
718 delparent->left = next; in dict_delete()
726 assert (delete->left == nil || delete->right == nil); in dict_delete()
728 child = (delete->left != nil) ? delete->left : delete->right; in dict_delete()
732 if (delete == delparent->left) { in dict_delete()
733 delparent->left = child; in dict_delete()
742 delete->left = NULL; in dict_delete()
757 if (child == parent->left) { in dict_delete()
767 if (sister->left->color == dnode_black in dict_delete()
773 assert (sister->left->color == dnode_red); in dict_delete()
774 sister->left->color = dnode_black; in dict_delete()
788 sister = parent->left; in dict_delete()
794 sister = parent->left; in dict_delete()
798 && sister->left->color == dnode_black) { in dict_delete()
802 if (sister->left->color == dnode_black) { in dict_delete()
807 sister = parent->left; in dict_delete()
811 sister->left->color = dnode_black; in dict_delete()
861 dnode_t *nil = dict_nil(dict), *root = dict_root(dict), *left; in dict_first() local
864 while ((left = root->left) != nil) in dict_first()
865 root = left; in dict_first()
895 dnode_t *nil = dict_nil(dict), *parent, *left; in dict_next() local
899 while ((left = curr->left) != nil) in dict_next()
900 curr = left; in dict_next()
923 if (curr->left != nil) { in dict_prev()
924 curr = curr->left; in dict_prev()
932 while (parent != nil && curr == parent->left) { in dict_prev()
988 new->left = NULL; in dnode_create()
998 dnode->left = NULL; in dnode_init()
1027 return (dnode->parent && dnode->left && dnode->right); in dnode_is_in_a_dict()
1047 load->nilnode.left = &load->nilnode; in load_begin_internal()
1068 assert (dict->compare(nil->left->key, key) <= 0); in dict_load_next()
1070 assert (dict->compare(nil->left->key, key) < 0); in dict_load_next()
1075 nil->right->left = newnode; in dict_load_next()
1077 newnode->left = nil; in dict_load_next()
1098 for (curr = loadnil->left; curr != loadnil; curr = next) { in dict_load_end()
1099 next = curr->left; in dict_load_end()
1120 curr->left = dictnil; in dict_load_end()
1133 curr->left = complete; in dict_load_end()
1194 leftnode->left = NULL; /* suppress assertion in dict_load_next */ in dict_merge()
1205 rightnode->left = NULL; in dict_merge()