diff options
Diffstat (limited to 'sbin/rcorder/hash.c')
-rw-r--r-- | sbin/rcorder/hash.c | 40 |
1 files changed, 18 insertions, 22 deletions
diff --git a/sbin/rcorder/hash.c b/sbin/rcorder/hash.c index bc882b9..34b95ce 100644 --- a/sbin/rcorder/hash.c +++ b/sbin/rcorder/hash.c @@ -103,9 +103,9 @@ static void RebuildTable(Hash_Table *); */ void -Hash_InitTable(t, numBuckets) - register Hash_Table *t; /* Structure to use to hold table. */ - int numBuckets; /* How many buckets to create for starters. +Hash_InitTable( + register Hash_Table *t, /* Structure to use to hold table. */ + int numBuckets) /* How many buckets to create for starters. * This number is rounded up to a power of * two. If <= 0, a reasonable default is * chosen. The table will grow in size later @@ -150,8 +150,7 @@ Hash_InitTable(t, numBuckets) */ void -Hash_DeleteTable(t) - Hash_Table *t; +Hash_DeleteTable(Hash_Table *t) { register struct Hash_Entry **hp, *h, *nexth = NULL; register int i; @@ -190,9 +189,9 @@ Hash_DeleteTable(t) */ Hash_Entry * -Hash_FindEntry(t, key) - Hash_Table *t; /* Hash table to search. */ - char *key; /* A hash key. */ +Hash_FindEntry( + Hash_Table *t, /* Hash table to search. */ + char *key) /* A hash key. */ { register Hash_Entry *e; register unsigned h; @@ -227,10 +226,10 @@ Hash_FindEntry(t, key) */ Hash_Entry * -Hash_CreateEntry(t, key, newPtr) - register Hash_Table *t; /* Hash table to search. */ - char *key; /* A hash key. */ - Boolean *newPtr; /* Filled in with TRUE if new entry created, +Hash_CreateEntry( + register Hash_Table *t, /* Hash table to search. */ + char *key, /* A hash key. */ + Boolean *newPtr) /* Filled in with TRUE if new entry created, * FALSE otherwise. */ { register Hash_Entry *e; @@ -294,9 +293,7 @@ Hash_CreateEntry(t, key, newPtr) */ void -Hash_DeleteEntry(t, e) - Hash_Table *t; - Hash_Entry *e; +Hash_DeleteEntry(Hash_Table *t, Hash_Entry *e) { register Hash_Entry **hp, *p; @@ -335,9 +332,9 @@ Hash_DeleteEntry(t, e) */ Hash_Entry * -Hash_EnumFirst(t, searchPtr) - Hash_Table *t; /* Table to be searched. */ - register Hash_Search *searchPtr;/* Area in which to keep state +Hash_EnumFirst( + Hash_Table *t, /* Table to be searched. */ + register Hash_Search *searchPtr)/* Area in which to keep state * about search.*/ { searchPtr->tablePtr = t; @@ -365,8 +362,8 @@ Hash_EnumFirst(t, searchPtr) */ Hash_Entry * -Hash_EnumNext(searchPtr) - register Hash_Search *searchPtr; /* Area used to keep state about +Hash_EnumNext( + register Hash_Search *searchPtr) /* Area used to keep state about search. */ { register Hash_Entry *e; @@ -411,8 +408,7 @@ Hash_EnumNext(searchPtr) */ static void -RebuildTable(t) - register Hash_Table *t; +RebuildTable(register Hash_Table *t) { register Hash_Entry *e, *next = NULL, **hp, **xp; register int i, mask; |