-struct hashtable {
- unsigned int tablelength;
- struct entry **table;
- unsigned int entrycount;
- unsigned int loadlimit;
- unsigned int (*hashfn) (void *k);
- int (*eqfn) (void *k1, void *k2);
+struct hashtable
+{
+ unsigned int tablelength;
+ struct entry **table;
+ unsigned int entrycount;
+ unsigned int loadlimit;
+ unsigned int (*hashfn) (void *k);
+ int (*eqfn) (void *k1, void *k2);
#define DEFINE_HASHTABLE_INSERT(fnname, keytype, valuetype) \
int fnname (struct hashtable *h, keytype *k, valuetype *v) \
{ \
#define DEFINE_HASHTABLE_INSERT(fnname, keytype, valuetype) \
int fnname (struct hashtable *h, keytype *k, valuetype *v) \
{ \
#define DEFINE_HASHTABLE_CHANGE(fnname, keytype, valuetype) \
int fnname (struct hashtable *h, keytype *k, valuetype *v) \
{ \
#define DEFINE_HASHTABLE_CHANGE(fnname, keytype, valuetype) \
int fnname (struct hashtable *h, keytype *k, valuetype *v) \
{ \
#define DEFINE_HASHTABLE_SEARCH(fnname, keytype, valuetype) \
valuetype * fnname (struct hashtable *h, keytype *k) \
{ \
#define DEFINE_HASHTABLE_SEARCH(fnname, keytype, valuetype) \
valuetype * fnname (struct hashtable *h, keytype *k) \
{ \
#define DEFINE_HASHTABLE_REMOVE(fnname, keytype, valuetype) \
valuetype * fnname (struct hashtable *h, keytype *k) \
{ \
#define DEFINE_HASHTABLE_REMOVE(fnname, keytype, valuetype) \
valuetype * fnname (struct hashtable *h, keytype *k) \
{ \
hashtable_iterator(struct hashtable *h);
/*****************************************************************************/
hashtable_iterator(struct hashtable *h);
/*****************************************************************************/
/*****************************************************************************/
/* value - return the value of the (key,value) pair at the current position */
/*****************************************************************************/
/* value - return the value of the (key,value) pair at the current position */
/*****************************************************************************/
/* advance - advance the iterator to the next element
/*****************************************************************************/
/* advance - advance the iterator to the next element