mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-01 11:32:48 -05:00
Formatting: remove spurious spaces in 'type * var'.
I think a lot of these were inserted by a prior run through GNU indent many years ago. I noticed in a more recent experiment that that tool doesn't always correctly distinguish which instances of 'id * id' are pointer variable declarations and which are multiplications, so it spaces some of the former as if they were the latter.
This commit is contained in:
@ -73,7 +73,7 @@ tree234 *newtree234(cmpfn234 cmp)
|
||||
/*
|
||||
* Free a 2-3-4 tree (not including freeing the elements).
|
||||
*/
|
||||
static void freenode234(node234 * n)
|
||||
static void freenode234(node234 *n)
|
||||
{
|
||||
if (!n)
|
||||
return;
|
||||
@ -84,7 +84,7 @@ static void freenode234(node234 * n)
|
||||
sfree(n);
|
||||
}
|
||||
|
||||
void freetree234(tree234 * t)
|
||||
void freetree234(tree234 *t)
|
||||
{
|
||||
freenode234(t->root);
|
||||
sfree(t);
|
||||
@ -93,7 +93,7 @@ void freetree234(tree234 * t)
|
||||
/*
|
||||
* Internal function to count a node.
|
||||
*/
|
||||
static int countnode234(node234 * n)
|
||||
static int countnode234(node234 *n)
|
||||
{
|
||||
int count = 0;
|
||||
int i;
|
||||
@ -122,7 +122,7 @@ static int elements234(node234 *n)
|
||||
/*
|
||||
* Count the elements in a tree.
|
||||
*/
|
||||
int count234(tree234 * t)
|
||||
int count234(tree234 *t)
|
||||
{
|
||||
if (t->root)
|
||||
return countnode234(t->root);
|
||||
@ -134,7 +134,7 @@ int count234(tree234 * t)
|
||||
* Add an element e to a 2-3-4 tree t. Returns e on success, or if
|
||||
* an existing element compares equal, returns that.
|
||||
*/
|
||||
static void *add234_internal(tree234 * t, void *e, int index)
|
||||
static void *add234_internal(tree234 *t, void *e, int index)
|
||||
{
|
||||
node234 *n, **np, *left, *right;
|
||||
void *orig_e = e;
|
||||
@ -463,14 +463,14 @@ static void *add234_internal(tree234 * t, void *e, int index)
|
||||
return orig_e;
|
||||
}
|
||||
|
||||
void *add234(tree234 * t, void *e)
|
||||
void *add234(tree234 *t, void *e)
|
||||
{
|
||||
if (!t->cmp) /* tree is unsorted */
|
||||
return NULL;
|
||||
|
||||
return add234_internal(t, e, -1);
|
||||
}
|
||||
void *addpos234(tree234 * t, void *e, int index)
|
||||
void *addpos234(tree234 *t, void *e, int index)
|
||||
{
|
||||
if (index < 0 || /* index out of range */
|
||||
t->cmp) /* tree is sorted */
|
||||
@ -483,7 +483,7 @@ void *addpos234(tree234 * t, void *e, int index)
|
||||
* Look up the element at a given numeric index in a 2-3-4 tree.
|
||||
* Returns NULL if the index is out of range.
|
||||
*/
|
||||
void *index234(tree234 * t, int index)
|
||||
void *index234(tree234 *t, int index)
|
||||
{
|
||||
node234 *n;
|
||||
|
||||
@ -523,7 +523,7 @@ void *index234(tree234 * t, int index)
|
||||
* as NULL, in which case the compare function from the tree proper
|
||||
* will be used.
|
||||
*/
|
||||
void *findrelpos234(tree234 * t, void *e, cmpfn234 cmp,
|
||||
void *findrelpos234(tree234 *t, void *e, cmpfn234 cmp,
|
||||
int relation, int *index)
|
||||
{
|
||||
search234_state ss;
|
||||
@ -598,15 +598,15 @@ void *findrelpos234(tree234 * t, void *e, cmpfn234 cmp,
|
||||
*index = ss.index;
|
||||
return toret;
|
||||
}
|
||||
void *find234(tree234 * t, void *e, cmpfn234 cmp)
|
||||
void *find234(tree234 *t, void *e, cmpfn234 cmp)
|
||||
{
|
||||
return findrelpos234(t, e, cmp, REL234_EQ, NULL);
|
||||
}
|
||||
void *findrel234(tree234 * t, void *e, cmpfn234 cmp, int relation)
|
||||
void *findrel234(tree234 *t, void *e, cmpfn234 cmp, int relation)
|
||||
{
|
||||
return findrelpos234(t, e, cmp, relation, NULL);
|
||||
}
|
||||
void *findpos234(tree234 * t, void *e, cmpfn234 cmp, int *index)
|
||||
void *findpos234(tree234 *t, void *e, cmpfn234 cmp, int *index)
|
||||
{
|
||||
return findrelpos234(t, e, cmp, REL234_EQ, index);
|
||||
}
|
||||
@ -686,7 +686,7 @@ void search234_step(search234_state *state, int direction)
|
||||
* Delete an element e in a 2-3-4 tree. Does not free the element,
|
||||
* merely removes all links to it from the tree nodes.
|
||||
*/
|
||||
static void *delpos234_internal(tree234 * t, int index)
|
||||
static void *delpos234_internal(tree234 *t, int index)
|
||||
{
|
||||
node234 *n;
|
||||
void *retval;
|
||||
@ -1024,13 +1024,13 @@ static void *delpos234_internal(tree234 * t, int index)
|
||||
}
|
||||
}
|
||||
}
|
||||
void *delpos234(tree234 * t, int index)
|
||||
void *delpos234(tree234 *t, int index)
|
||||
{
|
||||
if (index < 0 || index >= countnode234(t->root))
|
||||
return NULL;
|
||||
return delpos234_internal(t, index);
|
||||
}
|
||||
void *del234(tree234 * t, void *e)
|
||||
void *del234(tree234 *t, void *e)
|
||||
{
|
||||
int index;
|
||||
if (!findrelpos234(t, e, NULL, REL234_EQ, &index))
|
||||
@ -1095,7 +1095,7 @@ typedef struct {
|
||||
int elemcount;
|
||||
} chkctx;
|
||||
|
||||
int chknode(chkctx * ctx, int level, node234 * node,
|
||||
int chknode(chkctx *ctx, int level, node234 *node,
|
||||
void *lowbound, void *highbound)
|
||||
{
|
||||
int nkids, nelems;
|
||||
|
Reference in New Issue
Block a user