X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/blobdiff_plain/d2371c812a1c62b6a258c0717f1fff263cca8ca1..3d5040f8f85f049cbb072a827a6184b4b4314b08:/tree234.h diff --git a/tree234.h b/tree234.h index 02a973e2..ba743087 100644 --- a/tree234.h +++ b/tree234.h @@ -33,7 +33,7 @@ */ 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 @@ -45,13 +45,13 @@ tree234 *newtree234(cmpfn234 cmp); /* * 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 @@ -61,7 +61,7 @@ void *add234(tree234 *t, void *e); * 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. @@ -81,7 +81,7 @@ void *addpos234(tree234 *t, void *e, int index); * 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 @@ -126,10 +126,10 @@ void *index234(tree234 *t, int index); 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); /* @@ -149,12 +149,12 @@ void *findrelpos234(tree234 *t, void *e, cmpfn234 cmp, int relation, * 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 */