*/
typedef struct tree234_Tag tree234;
-typedef int (*cmpfn234)(void *, void *);
+typedef int (*cmpfn234) (void *, void *);
/*
* Create a 2-3-4 tree. If `cmp' is NULL, the tree is unsorted, and
/*
* Free a 2-3-4 tree (not including freeing the elements).
*/
-void freetree234(tree234 *t);
+void freetree234(tree234 * t);
/*
* Add an element e to a sorted 2-3-4 tree t. Returns e on success,
* or if an existing element compares equal, returns that.
*/
-void *add234(tree234 *t, void *e);
+void *add234(tree234 * t, void *e);
/*
* Add an element e to an unsorted 2-3-4 tree t. Returns e on
* Index range can be from 0 to the tree's current element count,
* inclusive.
*/
-void *addpos234(tree234 *t, void *e, int index);
+void *addpos234(tree234 * t, void *e, int index);
/*
* Look up the element at a given numeric index in a 2-3-4 tree.
* consume(p);
* }
*/
-void *index234(tree234 *t, int index);
+void *index234(tree234 * t, int index);
/*
* Find an element e in a sorted 2-3-4 tree t. Returns NULL if not
enum {
REL234_EQ, REL234_LT, REL234_LE, REL234_GT, REL234_GE
};
-void *find234(tree234 *t, void *e, cmpfn234 cmp);
-void *findrel234(tree234 *t, void *e, cmpfn234 cmp, int relation);
-void *findpos234(tree234 *t, void *e, cmpfn234 cmp, int *index);
-void *findrelpos234(tree234 *t, void *e, cmpfn234 cmp, int relation,
+void *find234(tree234 * t, void *e, cmpfn234 cmp);
+void *findrel234(tree234 * t, void *e, cmpfn234 cmp, int relation);
+void *findpos234(tree234 * t, void *e, cmpfn234 cmp, int *index);
+void *findrelpos234(tree234 * t, void *e, cmpfn234 cmp, int relation,
int *index);
/*
* is out of range (delpos234) or the element is already not in the
* tree (del234) then they return NULL.
*/
-void *del234(tree234 *t, void *e);
-void *delpos234(tree234 *t, int index);
+void *del234(tree234 * t, void *e);
+void *delpos234(tree234 * t, int index);
/*
* Return the total element count of a tree234.
*/
-int count234(tree234 *t);
+int count234(tree234 * t);
-#endif /* TREE234_H */
+#endif /* TREE234_H */