diff options
author | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2000-03-09 11:21:33 +0000 |
---|---|---|
committer | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2000-03-09 11:21:33 +0000 |
commit | a0a54f40b639a31068ba8add1ff22d44b6d0fa38 (patch) | |
tree | a132a01615ed4a648484aa561e46bb9dd0f9ca1f /src/util/Hash.c | |
parent | f350e8aeae3c80eb6ef554f2c7ce7f0b49af18cf (diff) |
Made string arguments const. Some cosmetic changes.
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@1452 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/util/Hash.c')
-rw-r--r-- | src/util/Hash.c | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/src/util/Hash.c b/src/util/Hash.c index 74f53540..4f68f031 100644 --- a/src/util/Hash.c +++ b/src/util/Hash.c @@ -20,8 +20,9 @@ static char *rcsid = "$Header$"; /* Local routine prototypes */ static iHashEntry *HashFind(uHash *hash, unsigned int klen, - char *key, + const char *key, unsigned int hashval); + static int HashRehash(uHash *hash); /******************************************************************** @@ -43,7 +44,7 @@ static int HashRehash(uHash *hash); @endhistory @@*/ -uHash *HashCreate(unsigned int initial_size) +uHash *Util_HashCreate(unsigned int initial_size) { uHash *retval; @@ -128,10 +129,10 @@ int Util_HashDestroy(uHash *hash) @@*/ int Util_HashStore(uHash *hash, - unsigned int klen, - char *key, - unsigned int hashval, - void *data) + unsigned int klen, + const char *key, + unsigned int hashval, + void *data) { int retval; iHashEntry *entry; @@ -166,10 +167,10 @@ int Util_HashStore(uHash *hash, @@*/ int Util_HashAdd(uHash *hash, - unsigned int klen, - char *key, - unsigned int hashval, - void *data) + unsigned int klen, + const char *key, + unsigned int hashval, + void *data) { int retval; iHashEntry *entry; @@ -285,9 +286,9 @@ int Util_HashAdd(uHash *hash, @@*/ int Util_HashDelete(uHash *hash, - unsigned int klen, - char *key, - unsigned int hashval) + unsigned int klen, + const char *key, + unsigned int hashval) { iHashEntry *entry; unsigned int location; @@ -361,9 +362,9 @@ int Util_HashDelete(uHash *hash, @@*/ void *Util_HashData(uHash *hash, - unsigned int klen, - char *key, - unsigned int hashval) + unsigned int klen, + const char *key, + unsigned int hashval) { void *retval; iHashEntry *entry; @@ -402,11 +403,11 @@ void *Util_HashData(uHash *hash, @@*/ unsigned int Util_HashHash(unsigned int klen, - char *key) + const char *key) { unsigned int hash; int i; - char *pos; + const char *pos; i = klen; pos = key; @@ -446,7 +447,7 @@ unsigned int Util_HashHash(unsigned int klen, @@*/ static iHashEntry *HashFind(uHash *hash, unsigned int klen, - char *key, + const char *key, unsigned int hashval) { iHashEntry *entry; |