44 if (allocator ==
NULL)
115 da[k++] = dir = cmp > 0;
247 return p ==
NULL || *p == item ?
NULL : *p;
258 if (p ==
NULL || *p == item)
413 q = find_parent(tree, y);
747 new->tavl_link[dir] = dst->
tavl_link[dir];
749 new->tavl_link[!dir] =
dst;
759 if (new->tavl_data ==
NULL)
808 if (new->tavl_count == 0)
821 if (!copy_node(
new, q, 0, p->
tavl_link[0], copy)) {
822 copy_error_recovery(rq.
tavl_link[0],
new, destroy);
846 if (!copy_node(
new, q, 1, p->
tavl_link[1], copy)) {
847 copy_error_recovery(rq.
tavl_link[0],
new, destroy);
struct tavl_node * tavl_node
void * tavl_replace(struct tavl_table *table, void *item)
void tavl_item_func(void *tavl_item, void *tavl_param)
void * tavl_t_next(struct tavl_traverser *trav)
void *(* libavl_malloc)(struct libavl_allocator *, size_t libavl_size)
void * tavl_t_prev(struct tavl_traverser *trav)
void * tavl_t_last(struct tavl_traverser *trav, struct tavl_table *tree)
void * tavl_t_copy(struct tavl_traverser *trav, const struct tavl_traverser *src)
void * tavl_copy_func(void *tavl_item, void *tavl_param)
void ** tavl_probe(struct tavl_table *tree, void *item)
struct tavl_table * tavl_copy(const struct tavl_table *org, tavl_copy_func *copy, tavl_item_func *destroy, struct libavl_allocator *allocator)
void(* libavl_free)(struct libavl_allocator *, void *libavl_block)
void * tavl_delete(struct tavl_table *tree, const void *item)
void * tavl_t_cur(struct tavl_traverser *trav)
void * tavl_malloc(struct libavl_allocator *allocator, size_t size)
struct tavl_table * tavl_create(tavl_comparison_func *compare, void *param, struct libavl_allocator *allocator)
struct tavl_node * tavl_link[2]
void * tavl_t_first(struct tavl_traverser *trav, struct tavl_table *tree)
void tavl_t_init(struct tavl_traverser *trav, struct tavl_table *tree)
void * tavl_insert(struct tavl_table *table, void *item)
int tavl_comparison_func(const void *tavl_a, const void *tavl_b, void *tavl_param)
#define assert(condition)
void tavl_free(struct libavl_allocator *allocator, void *block)
void * tavl_find(const struct tavl_table *tree, const void *item)
struct tavl_node * tavl_root
void * tavl_t_find(struct tavl_traverser *trav, struct tavl_table *tree, void *item)
struct libavl_allocator tavl_allocator_default
void * tavl_t_replace(struct tavl_traverser *trav, void *new)
void * tavl_t_insert(struct tavl_traverser *trav, struct tavl_table *tree, void *item)
tavl_comparison_func * tavl_compare
void() tavl_assert_insert(struct tavl_table *table, void *item)
void *() tavl_assert_delete(struct tavl_table *table, void *item)
struct tavl_table * tavl_table
int compare(const void *a, const void *b)
void tavl_destroy(struct tavl_table *tree, tavl_item_func *destroy)
struct libavl_allocator * tavl_alloc
unsigned char tavl_tag[2]