hash.h
ackfuss-4.3.9/src/hash.h · 1.2 KB
From the archive ackfuss-4.3.9.tgz
Download the archive « Back to the archive contents
/***************************************************************************
* _/_/_/_/ _/ _/ _/_/_/_/ _/_/_/_/ AckFUSS is modified ACK!MUD 4.3.1 *
* _/ _/ _/ _/ _/ copyright Matt Goff (Kline) 2008 *
* _/_/ _/ _/ _/_/_/_/ _/_/_/_/ *
* _/ _/ _/ _/ _/ Support for this code is provided *
* _/ _/_/_/_/ _/_/_/_/ _/_/_/_/ at www.ackmud.net -- check it out!*
***************************************************************************/
#ifndef DEC_TYPEDEFS_H
#include "typedefs.h"
#endif
#ifndef DEC_LISTS_H
#include "lists.h"
#endif
struct hash_entry_tp
{
bool is_free; /* Ramias:for run-time checks of LINK/UNLINK */
HASH_ENTRY *next;
void *reference;
int key;
};
typedef struct hash_table_tp hash_table;
struct hash_table_tp
{
int max_hash;
HASH_ENTRY **table;
};
hash_table *create_hash_table( int max_hash );
void del_hash_entry( hash_table * hash_head, int key );
void add_hash_entry( hash_table * hash_head, int key, void *entry );
void *get_hash_entry( hash_table * hash_head, int key );
void clear_hash_table( hash_table * hash_head );
void delete_hash_table( hash_table * hash_head );