home *** CD-ROM | disk | FTP | other *** search
- /* Headers for hashtable handling
-
- ©1999 Joseph Walton
-
- This software is distributed under the terms of the GNU General Public
- License; either version 2 of the License, or (at your option) any
- later version.
- */
-
- #ifndef NFSD_HASHTABLE_H
- #define NFSD_HASHTABLE_H
-
- #include <exec/types.h>
-
- typedef ULONG (*HashFunc)(APTR);
- typedef BOOL (*EqualsFunc)(APTR, APTR);
- //typedef void (*DataFreeFunc)(APTR);
- //typedef BOOL (*DataCallback)(APTR);
-
- struct HashTable *htMakeNew(HashFunc hf, EqualsFunc ef);
- // void htFree(struct HashTable *ht, DataFreeFunc dff);
- BOOL htAdd(struct HashTable *ht, APTR key, APTR data);
- APTR htGet(struct HashTable *ht, APTR key);
- APTR htRemove(struct HashTable *ht, APTR key);
- // void forEach(struct HashTable *ht, DataCallback dc);
- LONG htGetSize(struct HashTable *ht);
- // double getStdDev(struct HashTable *ht);
-
- #endif
-
-