Lines Matching refs:rbtree
169 a_prefix##new(a_rbt_type *rbtree); \
171 a_prefix##empty(a_rbt_type *rbtree); \
173 a_prefix##first(a_rbt_type *rbtree); \
175 a_prefix##last(a_rbt_type *rbtree); \
177 a_prefix##next(a_rbt_type *rbtree, a_type *node); \
179 a_prefix##prev(a_rbt_type *rbtree, a_type *node); \
181 a_prefix##search(a_rbt_type *rbtree, const a_type *key); \
183 a_prefix##nsearch(a_rbt_type *rbtree, const a_type *key); \
185 a_prefix##psearch(a_rbt_type *rbtree, const a_type *key); \
187 a_prefix##insert(a_rbt_type *rbtree, a_type *node); \
189 a_prefix##remove(a_rbt_type *rbtree, a_type *node); \
191 a_prefix##iter(a_rbt_type *rbtree, a_type *start, a_type *(*cb)( \
194 a_prefix##reverse_iter(a_rbt_type *rbtree, a_type *start, \
197 a_prefix##destroy(a_rbt_type *rbtree, void (*cb)(a_type *, void *), \
344 a_prefix##new(a_rbt_type *rbtree) { \
345 rb_new(a_type, a_field, rbtree); \
348 a_prefix##empty(a_rbt_type *rbtree) { \
349 return (rbtree->rbt_root == NULL); \
352 a_prefix##first(a_rbt_type *rbtree) { \
354 rbtn_first(a_type, a_field, rbtree, rbtree->rbt_root, ret); \
358 a_prefix##last(a_rbt_type *rbtree) { \
360 rbtn_last(a_type, a_field, rbtree, rbtree->rbt_root, ret); \
364 a_prefix##next(a_rbt_type *rbtree, a_type *node) { \
367 rbtn_first(a_type, a_field, rbtree, rbtn_right_get(a_type, \
370 a_type *tnode = rbtree->rbt_root; \
389 a_prefix##prev(a_rbt_type *rbtree, a_type *node) { \
392 rbtn_last(a_type, a_field, rbtree, rbtn_left_get(a_type, \
395 a_type *tnode = rbtree->rbt_root; \
414 a_prefix##search(a_rbt_type *rbtree, const a_type *key) { \
417 ret = rbtree->rbt_root; \
429 a_prefix##nsearch(a_rbt_type *rbtree, const a_type *key) { \
431 a_type *tnode = rbtree->rbt_root; \
448 a_prefix##psearch(a_rbt_type *rbtree, const a_type *key) { \
450 a_type *tnode = rbtree->rbt_root; \
467 a_prefix##insert(a_rbt_type *rbtree, a_type *node) { \
472 rbt_node_new(a_type, a_field, rbtree, node); \
474 path->node = rbtree->rbt_root; \
533 rbtree->rbt_root = path->node; \
534 rbtn_black_set(a_type, a_field, rbtree->rbt_root); \
537 a_prefix##remove(a_rbt_type *rbtree, a_type *node) { \
544 path->node = rbtree->rbt_root; \
587 rbtree->rbt_root = nodep->node; \
606 rbtree->rbt_root = left; \
619 rbtree->rbt_root = NULL; \
706 rbtree->rbt_root = tnode; \
779 rbtree->rbt_root = tnode; \
848 rbtree->rbt_root = tnode; \
872 rbtree->rbt_root = path->node; \
873 assert(!rbtn_red_get(a_type, a_field, rbtree->rbt_root)); \
876 a_prefix##iter_recurse(a_rbt_type *rbtree, a_type *node, \
882 if ((ret = a_prefix##iter_recurse(rbtree, rbtn_left_get(a_type, \
883 a_field, node), cb, arg)) != NULL || (ret = cb(rbtree, node, \
887 return a_prefix##iter_recurse(rbtree, rbtn_right_get(a_type, \
892 a_prefix##iter_start(a_rbt_type *rbtree, a_type *start, a_type *node, \
897 if ((ret = a_prefix##iter_start(rbtree, start, \
899 (ret = cb(rbtree, node, arg)) != NULL) { \
902 return a_prefix##iter_recurse(rbtree, rbtn_right_get(a_type, \
905 return a_prefix##iter_start(rbtree, start, \
909 if ((ret = cb(rbtree, node, arg)) != NULL) { \
912 return a_prefix##iter_recurse(rbtree, rbtn_right_get(a_type, \
917 a_prefix##iter(a_rbt_type *rbtree, a_type *start, a_type *(*cb)( \
921 ret = a_prefix##iter_start(rbtree, start, rbtree->rbt_root, \
924 ret = a_prefix##iter_recurse(rbtree, rbtree->rbt_root, cb, arg);\
929 a_prefix##reverse_iter_recurse(a_rbt_type *rbtree, a_type *node, \
935 if ((ret = a_prefix##reverse_iter_recurse(rbtree, \
937 (ret = cb(rbtree, node, arg)) != NULL) { \
940 return a_prefix##reverse_iter_recurse(rbtree, \
945 a_prefix##reverse_iter_start(a_rbt_type *rbtree, a_type *start, \
951 if ((ret = a_prefix##reverse_iter_start(rbtree, start, \
953 (ret = cb(rbtree, node, arg)) != NULL) { \
956 return a_prefix##reverse_iter_recurse(rbtree, \
959 return a_prefix##reverse_iter_start(rbtree, start, \
963 if ((ret = cb(rbtree, node, arg)) != NULL) { \
966 return a_prefix##reverse_iter_recurse(rbtree, \
971 a_prefix##reverse_iter(a_rbt_type *rbtree, a_type *start, \
975 ret = a_prefix##reverse_iter_start(rbtree, start, \
976 rbtree->rbt_root, cb, arg); \
978 ret = a_prefix##reverse_iter_recurse(rbtree, rbtree->rbt_root, \
984 a_prefix##destroy_recurse(a_rbt_type *rbtree, a_type *node, void (*cb)( \
989 a_prefix##destroy_recurse(rbtree, rbtn_left_get(a_type, a_field, \
992 a_prefix##destroy_recurse(rbtree, rbtn_right_get(a_type, a_field, \
1000 a_prefix##destroy(a_rbt_type *rbtree, void (*cb)(a_type *, void *), \
1002 a_prefix##destroy_recurse(rbtree, rbtree->rbt_root, cb, arg); \
1003 rbtree->rbt_root = NULL; \