342 void uu_avl_pool_destroy(uu_avl_pool_t *);
343
344 /*
345 * usage:
346 *
347 * foo_t *a;
348 * a = malloc(sizeof(*a));
349 * uu_avl_node_init(a, &a->foo_avl, pool);
350 * ...
351 * uu_avl_node_fini(a, &a->foo_avl, pool);
352 * free(a);
353 */
354 void uu_avl_node_init(void *, uu_avl_node_t *, uu_avl_pool_t *);
355 void uu_avl_node_fini(void *, uu_avl_node_t *, uu_avl_pool_t *);
356
357 uu_avl_t *uu_avl_create(uu_avl_pool_t *, void *_parent, uint32_t);
358 #define UU_AVL_DEBUG 0x00000001
359
360 void uu_avl_destroy(uu_avl_t *); /* list must be empty */
361
362 size_t uu_avl_numnodes(uu_avl_t *);
363
364 void *uu_avl_first(uu_avl_t *);
365 void *uu_avl_last(uu_avl_t *);
366
367 void *uu_avl_next(uu_avl_t *, void *);
368 void *uu_avl_prev(uu_avl_t *, void *);
369
370 int uu_avl_walk(uu_avl_t *, uu_walk_fn_t *, void *, uint32_t);
371
372 uu_avl_walk_t *uu_avl_walk_start(uu_avl_t *, uint32_t);
373 void *uu_avl_walk_next(uu_avl_walk_t *);
374 void uu_avl_walk_end(uu_avl_walk_t *);
375
376 void *uu_avl_find(uu_avl_t *, void *, void *, uu_avl_index_t *);
377 void uu_avl_insert(uu_avl_t *, void *, uu_avl_index_t);
378
379 void *uu_avl_nearest_next(uu_avl_t *, uu_avl_index_t);
380 void *uu_avl_nearest_prev(uu_avl_t *, uu_avl_index_t);
381
|
342 void uu_avl_pool_destroy(uu_avl_pool_t *);
343
344 /*
345 * usage:
346 *
347 * foo_t *a;
348 * a = malloc(sizeof(*a));
349 * uu_avl_node_init(a, &a->foo_avl, pool);
350 * ...
351 * uu_avl_node_fini(a, &a->foo_avl, pool);
352 * free(a);
353 */
354 void uu_avl_node_init(void *, uu_avl_node_t *, uu_avl_pool_t *);
355 void uu_avl_node_fini(void *, uu_avl_node_t *, uu_avl_pool_t *);
356
357 uu_avl_t *uu_avl_create(uu_avl_pool_t *, void *_parent, uint32_t);
358 #define UU_AVL_DEBUG 0x00000001
359
360 void uu_avl_destroy(uu_avl_t *); /* list must be empty */
361
362 void uu_avl_recreate(uu_avl_t *);
363
364 size_t uu_avl_numnodes(uu_avl_t *);
365
366 void *uu_avl_first(uu_avl_t *);
367 void *uu_avl_last(uu_avl_t *);
368
369 void *uu_avl_next(uu_avl_t *, void *);
370 void *uu_avl_prev(uu_avl_t *, void *);
371
372 int uu_avl_walk(uu_avl_t *, uu_walk_fn_t *, void *, uint32_t);
373
374 uu_avl_walk_t *uu_avl_walk_start(uu_avl_t *, uint32_t);
375 void *uu_avl_walk_next(uu_avl_walk_t *);
376 void uu_avl_walk_end(uu_avl_walk_t *);
377
378 void *uu_avl_find(uu_avl_t *, void *, void *, uu_avl_index_t *);
379 void uu_avl_insert(uu_avl_t *, void *, uu_avl_index_t);
380
381 void *uu_avl_nearest_next(uu_avl_t *, uu_avl_index_t);
382 void *uu_avl_nearest_prev(uu_avl_t *, uu_avl_index_t);
383
|