4 typedef struct _tree tree
;
6 typedef int (tree_cmp_func
) (const void *keya
, const void *keyb
, void *data
);
7 typedef int (tree_traverse_func
) (const void *key
, void *data
);
9 tree
*tree_new (tree_cmp_func
*cmp
, void *data
);
10 void tree_destroy (tree
*t
);
11 void *tree_find (tree
*t
, void *key
, tree_cmp_func
*cmp
, void *data
, int *pos
);
12 int tree_remove (tree
*t
, void *key
, int *pos
);
13 void tree_remove_at_pos (tree
*t
, int pos
);
14 void tree_foreach (tree
*t
, tree_traverse_func
*func
, void *data
);
15 int tree_insert (tree
*t
, void *key
);
16 void tree_append (tree
* t
, void *key
);
17 int tree_size (tree
*t
);