diff options
author | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2000-03-07 15:30:54 +0000 |
---|---|---|
committer | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2000-03-07 15:30:54 +0000 |
commit | 39c6ae3d125ff98c97029b6b1b00b108fc80d674 (patch) | |
tree | f3cebff785e0259364c1737e5f474ba02e762d7e | |
parent | 8589b120bec42ae92b37683dfca4379ae426c826 (diff) |
Untabified. A few format changes to get closer to standard.
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@1433 17b73243-c579-4c4c-a9d2-2d5706c11dac
-rw-r--r-- | src/util/BinaryTree.c | 30 | ||||
-rw-r--r-- | src/util/Hash.c | 13 | ||||
-rw-r--r-- | src/util/Misc.c | 4 |
3 files changed, 32 insertions, 15 deletions
diff --git a/src/util/BinaryTree.c b/src/util/BinaryTree.c index 1c194e77..05965974 100644 --- a/src/util/BinaryTree.c +++ b/src/util/BinaryTree.c @@ -5,6 +5,7 @@ @desc Routines to deal with binary trees @enddesc + @version $Header$ @@*/ #include <stdio.h> @@ -15,6 +16,10 @@ static char *rcsid = "$Header$"; +/******************************************************************** + ******************** External Routines ************************ + ********************************************************************/ + /*@@ @routine Util_BinTreeStoreData @@ -30,7 +35,10 @@ static char *rcsid = "$Header$"; @endhistory @@*/ -uBinTree *Util_BinTreeStoreData(uBinTree *root, uBinTree *subtree, void *data, int (*compare)(const void *, const void *)) +uBinTree *Util_BinTreeStoreData(uBinTree *root, + uBinTree *subtree, + void *data, + int (*compare)(const void *, const void *)) { int order; @@ -98,7 +106,9 @@ uBinTree *Util_BinTreeStoreData(uBinTree *root, uBinTree *subtree, void *data, i @endhistory @@*/ -int Util_BinTreeTraverseInorder(uBinTree *root, int (*process)(void *, void *), void *info) +int Util_BinTreeTraverseInorder(uBinTree *root, + int (*process)(void *, void *), + void *info) { int terminate; @@ -128,7 +138,9 @@ int Util_BinTreeTraverseInorder(uBinTree *root, int (*process)(void *, void *), @endhistory @@*/ -int Util_BinTreeTraversePreorder(uBinTree *root, int (*process)(void *, void *), void *info) +int Util_BinTreeTraversePreorder(uBinTree *root, + int (*process)(void *, void *), + void *info) { int terminate; @@ -158,7 +170,9 @@ int Util_BinTreeTraversePreorder(uBinTree *root, int (*process)(void *, void *), @endhistory @@*/ -int Util_BinTreeTraversePostorder(uBinTree *root, int (*process)(void *, void *), void *info) +int Util_BinTreeTraversePostorder(uBinTree *root, + int (*process)(void *, void *), + void *info) { int terminate; @@ -189,8 +203,8 @@ int Util_BinTreeTraversePostorder(uBinTree *root, int (*process)(void *, void *) @@*/ int Util_BinTreePrintNodes(uBinTree *root, - int depth, - void (*print_node)(void *, int)) + int depth, + void (*print_node)(void *, int)) { if(root) { @@ -216,7 +230,9 @@ int Util_BinTreePrintNodes(uBinTree *root, @endhistory @@*/ -uBinTree *TreeFindNode(uBinTree *root, void *data, int (*compare)(const void *, const void *)) +uBinTree *Util_BinTreeFindNode(uBinTree *root, + void *data, + int (*compare)(const void *, const void *)) { int order; diff --git a/src/util/Hash.c b/src/util/Hash.c index d3101f9c..74f53540 100644 --- a/src/util/Hash.c +++ b/src/util/Hash.c @@ -5,6 +5,7 @@ @desc Generic hash stuff. @enddesc + @version $Header$ @@*/ #include <stdio.h> @@ -18,9 +19,9 @@ static char *rcsid = "$Header$"; /* Local routine prototypes */ static iHashEntry *HashFind(uHash *hash, - unsigned int klen, - char *key, - unsigned int hashval); + unsigned int klen, + char *key, + unsigned int hashval); static int HashRehash(uHash *hash); /******************************************************************** @@ -444,9 +445,9 @@ unsigned int Util_HashHash(unsigned int klen, @@*/ static iHashEntry *HashFind(uHash *hash, - unsigned int klen, - char *key, - unsigned int hashval) + unsigned int klen, + char *key, + unsigned int hashval) { iHashEntry *entry; unsigned int location; diff --git a/src/util/Misc.c b/src/util/Misc.c index 948ffae8..cf5c3807 100644 --- a/src/util/Misc.c +++ b/src/util/Misc.c @@ -63,8 +63,8 @@ int Util_SplitString(char **before, char **after, const char *string, const char if(position) { /*Allocate memory for return strings. */ - *before = (char *)malloc((position-string+1)*sizeof(char)); - *after = (char *)malloc((strlen(string)-(position-string)-strlen(sep)+1)*sizeof(char)); + *before = (char *)malloc((size_t)((position-string+1)*sizeof(char))); + *after = (char *)malloc((size_t)((strlen(string)-(position-string)-strlen(sep)+1)*sizeof(char))); /* Check that the allocation succeeded. */ if(!*before || !*after) |