// (c) 1995-2014 by Artsoft Entertainment
// Holger Schemel
// info@artsoft.org
-// http://www.artsoft.org/
+// https://www.artsoft.org/
// ----------------------------------------------------------------------------
// hash.h
// ============================================================================
struct hashtable *
create_hashtable(unsigned int minsize, float maxloadfactor,
unsigned int (*hashfunction) (void*),
- int (*key_eq_fn) (void*,void*));
+ int (*key_eq_fn) (void*, void*));
/*****************************************************************************
* hashtable_insert
#define DEFINE_HASHTABLE_INSERT(fnname, keytype, valuetype) \
static int fnname (struct hashtable *h, keytype *k, valuetype *v) \
{ \
- return hashtable_insert(h,k,v); \
+ return hashtable_insert(h, k, v); \
}
/*****************************************************************************
#define DEFINE_HASHTABLE_CHANGE(fnname, keytype, valuetype) \
static int fnname (struct hashtable *h, keytype *k, valuetype *v) \
{ \
- return hashtable_change(h,k,v); \
+ return hashtable_change(h, k, v); \
}
/*****************************************************************************
#define DEFINE_HASHTABLE_SEARCH(fnname, keytype, valuetype) \
static valuetype * fnname (struct hashtable *h, keytype *k) \
{ \
- return (valuetype *) (hashtable_search(h,k)); \
+ return (valuetype *) (hashtable_search(h, k)); \
}
/*****************************************************************************
#define DEFINE_HASHTABLE_REMOVE(fnname, keytype, valuetype) \
static valuetype * fnname (struct hashtable *h, keytype *k) \
{ \
- return (valuetype *) (hashtable_remove(h,k)); \
+ return (valuetype *) (hashtable_remove(h, k)); \
}
hashtable_iterator(struct hashtable *h);
/*****************************************************************************/
-/* key - return the key of the (key,value) pair at the current position */
+/* key - return the key of the (key, value) pair at the current position */
void *
hashtable_iterator_key(struct hashtable_itr *i);
/*****************************************************************************/
-/* 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 */
void *
hashtable_iterator_value(struct hashtable_itr *i);