# HG changeset patch # User Sean Halle # Date 1362750264 28800 # Node ID 1d42a512f482b218e559b679c8b556e4694b0040 # Parent 1244508aaae4497e1773d2202079cc79d7e8b535 Renamed VMS to PR, in new branch diff -r 1244508aaae4 -r 1d42a512f482 PrivateHash.c --- a/PrivateHash.c Mon Sep 03 15:09:05 2012 -0700 +++ b/PrivateHash.c Fri Mar 08 05:44:24 2013 -0800 @@ -1,5 +1,5 @@ /* - * Copyright 2009 OpenSourceStewardshipFoundation.org + * Copyright 2009 OpenSourceResearchInstitute.org * Licensed under GNU General Public License version 2 * * @@ -235,6 +235,9 @@ return FALSE; } +/*Frees hash table struct, all entry strucs, and even the contents of each + * entry. + */ void freeHashTable( HashTable *table ) { int i; diff -r 1244508aaae4 -r 1d42a512f482 PrivateHash.h --- a/PrivateHash.h Mon Sep 03 15:09:05 2012 -0700 +++ b/PrivateHash.h Fri Mar 08 05:44:24 2013 -0800 @@ -1,5 +1,5 @@ /* - * Copyright 2009 OpenSourceStewardshipFoundation.org + * Copyright 2009 OpenSourceResearchInstitute.org * Licensed under GNU General Public License version 2 * * Author: seanhalle@yahoo.com @@ -27,7 +27,7 @@ //===================== structs ===================== union hashkey_t{ char hashable[8]; - int parts[2]; + int32 parts[2]; }; typedef union hashkey_t hashkey_t; @@ -44,8 +44,8 @@ typedef void (*FreeEntryContentFnPtr) ( void * ); typedef struct - { int tableSz; - int numEntries; + { int32 tableSz; + int32 numEntries; HashEntry* *entries; int32 hashMask; int32 prevHash; @@ -58,8 +58,8 @@ // Public functions HashTable *makeHashTable( int numHashSlots, FreeEntryContentFnPtr freeFn ); -int putEntryIntoTable( HashEntry *entry, HashTable *table); -int addValueIntoTable( char* key, void *value, HashTable *table); +int32 putEntryIntoTable( HashEntry *entry, HashTable *table); +int32 addValueIntoTable( char* key, void *value, HashTable *table); HashEntry *getEntryFromTable( char *key, HashTable *table ); void *getValueFromTable( char *key, HashTable *table ); @@ -74,7 +74,7 @@ HashTable *makeHashTable32(int32 powerOf2OfSz, FreeEntryContentFnPtr freeFn); HashTable *makeDefaultSizeHashTable32( FreeEntryContentFnPtr freeFn ); -int putEntryIntoTable32( HashEntry *entry, HashTable *table); +int32 putEntryIntoTable32( HashEntry *entry, HashTable *table); HashEntry *addValueIntoTable32( uint32 key[], void *value, HashTable *table); HashEntry *getEntryFromTable32( uint32 key[], HashTable *table ); void *getValueFromTable32( uint32 key[], HashTable *table );