void *foreach_user_context)
{
SilcHashTableEntry e, tmp;
- bool auto_rehash, found = FALSE;
+ SilcBool auto_rehash, found = FALSE;
SilcUInt32 i = SILC_HASH_TABLE_HASH(hash, hash_user_context);
SILC_HT_DEBUG(("index %d key %p", i, key));
/* Internal routine to add new key to the hash table */
-static inline bool
+static inline SilcBool
silc_hash_table_add_internal(SilcHashTable ht, void *key, void *context,
SilcHashFunction hash,
void *hash_user_context)
/* Internal routine to replace old key with new one (if it exists) */
-static inline bool
+static inline SilcBool
silc_hash_table_replace_internal(SilcHashTable ht, void *key, void *context,
SilcHashFunction hash,
void *hash_user_context)
void *compare_user_context,
SilcHashDestructor destructor,
void *destructor_user_context,
- bool auto_rehash)
+ SilcBool auto_rehash)
{
SilcHashTable ht;
SilcUInt32 size_index = SILC_HASH_TABLE_SIZE;
call the destructor funtion for the found entry. Return TRUE if the
entry was removed successfully and FALSE otherwise. */
-bool silc_hash_table_del(SilcHashTable ht, void *key)
+SilcBool silc_hash_table_del(SilcHashTable ht, void *key)
{
SilcHashTableEntry *entry, prev, e;
/* Same as above but with specific hash and compare functions. */
-bool silc_hash_table_del_ext(SilcHashTable ht, void *key,
+SilcBool silc_hash_table_del_ext(SilcHashTable ht, void *key,
SilcHashFunction hash,
void *hash_user_context,
SilcHashCompare compare,
have duplicate keys. In that case the `context' may be used to check
whether the correct entry is being deleted. */
-bool silc_hash_table_del_by_context(SilcHashTable ht, void *key,
+SilcBool silc_hash_table_del_by_context(SilcHashTable ht, void *key,
void *context)
{
SilcHashTableEntry *entry, prev, e;
/* Same as above but with specific hash and compare functions. */
-bool silc_hash_table_del_by_context_ext(SilcHashTable ht, void *key,
+SilcBool silc_hash_table_del_by_context_ext(SilcHashTable ht, void *key,
void *context,
SilcHashFunction hash,
void *hash_user_context,
respectively. If the `ret_key and `ret_context' are NULL then this
maybe used only to check whether given key exists in the table. */
-bool silc_hash_table_find(SilcHashTable ht, void *key,
+SilcBool silc_hash_table_find(SilcHashTable ht, void *key,
void **ret_key, void **ret_context)
{
return silc_hash_table_find_ext(ht, key, ret_key, ret_context,
/* Same as above but with specified hash and comparison functions. */
-bool silc_hash_table_find_ext(SilcHashTable ht, void *key,
+SilcBool silc_hash_table_find_ext(SilcHashTable ht, void *key,
void **ret_key, void **ret_context,
SilcHashFunction hash,
void *hash_user_context,
/* Same as silc_hash_table_find but finds with specific context. */
-bool silc_hash_table_find_by_context(SilcHashTable ht, void *key,
+SilcBool silc_hash_table_find_by_context(SilcHashTable ht, void *key,
void *context, void **ret_key)
{
return silc_hash_table_find_by_context_ext(ht, key, context, ret_key,
/* Same as above but with specified hash and comparison functions. */
-bool silc_hash_table_find_by_context_ext(SilcHashTable ht, void *key,
+SilcBool silc_hash_table_find_by_context_ext(SilcHashTable ht, void *key,
void *context, void **ret_key,
SilcHashFunction hash,
void *hash_user_context,
{
SilcHashTableEntry e, tmp;
int i;
- bool auto_rehash;
+ SilcBool auto_rehash;
if (!foreach)
return;
int i;
SilcHashTableEntry *table, e, tmp;
SilcUInt32 table_size, size_index;
- bool auto_rehash;
+ SilcBool auto_rehash;
SILC_HT_DEBUG(("Start"));
int i;
SilcHashTableEntry *table, e, tmp;
SilcUInt32 table_size, size_index;
- bool auto_rehash;
+ SilcBool auto_rehash;
SILC_HT_DEBUG(("Start"));
`context' and TRUE. If this returns FALSE then there are no anymore
any entrys. Usage: while (silc_hash_table_get(&htl, &key, &context)) */
-bool silc_hash_table_get(SilcHashTableList *htl, void **key, void **context)
+SilcBool silc_hash_table_get(SilcHashTableList *htl, void **key, void **context)
{
SilcHashTableEntry entry = (SilcHashTableEntry)htl->entry;