*
* PARAMETERS
* `compare' The function-pointer `compare' is used to compare two keys. It
- * has to return less than zero if it's first argument is smaller
+ * has to return less than zero if its first argument is smaller
* then the second argument, more than zero if the first argument
* is bigger than the second argument and zero if they are equal.
* If your keys are char-pointers, you can use the `strcmp'
* RETURN VALUE
* A c_avl_tree_t-pointer upon success or NULL upon failure.
*/
-c_avl_tree_t *c_avl_create (int (*compare) (const void *, const void *));
-
+c_avl_tree_t *c_avl_create(int (*compare)(const void *, const void *));
/*
* NAME
* Deallocates an AVL-tree. Stored value- and key-pointer are lost, but of
* course not freed.
*/
-void c_avl_destroy (c_avl_tree_t *t);
+void c_avl_destroy(c_avl_tree_t *t);
/*
* NAME
* Zero upon success, non-zero otherwise. It's less than zero if an error
* occurred or greater than zero if the key is already stored in the tree.
*/
-int c_avl_insert (c_avl_tree_t *t, void *key, void *value);
+int c_avl_insert(c_avl_tree_t *t, void *key, void *value);
/*
* NAME
* RETURN VALUE
* Zero upon success or non-zero if the key isn't found in the tree.
*/
-int c_avl_remove (c_avl_tree_t *t, const void *key, void **rkey, void **rvalue);
+int c_avl_remove(c_avl_tree_t *t, const void *key, void **rkey, void **rvalue);
/*
* NAME
* RETURN VALUE
* Zero upon success or non-zero if the key isn't found in the tree.
*/
-int c_avl_get (c_avl_tree_t *t, const void *key, void **value);
+int c_avl_get(c_avl_tree_t *t, const void *key, void **value);
/*
* NAME
* c_avl_pick
*
* DESCRIPTION
- * Remove a (pseudo-)random element from the tree and return it's `key' and
+ * Remove a (pseudo-)random element from the tree and return its `key' and
* `value'. Entries are not returned in any particular order. This function
* is intended for cache-flushes that don't care about the order but simply
* want to remove all elements, one at a time.
* Zero upon success or non-zero if the tree is empty or key or value is
* NULL.
*/
-int c_avl_pick (c_avl_tree_t *t, void **key, void **value);
+int c_avl_pick(c_avl_tree_t *t, void **key, void **value);
-c_avl_iterator_t *c_avl_get_iterator (c_avl_tree_t *t);
-int c_avl_iterator_next (c_avl_iterator_t *iter, void **key, void **value);
-int c_avl_iterator_prev (c_avl_iterator_t *iter, void **key, void **value);
-void c_avl_iterator_destroy (c_avl_iterator_t *iter);
+c_avl_iterator_t *c_avl_get_iterator(c_avl_tree_t *t);
+int c_avl_iterator_next(c_avl_iterator_t *iter, void **key, void **value);
+int c_avl_iterator_prev(c_avl_iterator_t *iter, void **key, void **value);
+void c_avl_iterator_destroy(c_avl_iterator_t *iter);
/*
* NAME
* RETURN VALUE
* Number of nodes in the tree, 0 if the tree is empty or NULL.
*/
-int c_avl_size (c_avl_tree_t *t);
+int c_avl_size(c_avl_tree_t *t);
#endif /* UTILS_AVLTREE_H */