| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
#define PTR_ASSOC_TABLESIZE 251 |
| 6 |
|
| 7 |
typedef struct _ptr_assoc { |
| 8 |
struct _ptr_assoc **array; |
| 9 |
struct _ptr_assoc *previous; |
| 10 |
struct _ptr_assoc *next; |
| 11 |
void *key; |
| 12 |
void *value; |
| 13 |
} ptr_assoc; |
| 14 |
|
| 15 |
typedef ptr_assoc *ptr_assoc_table[PTR_ASSOC_TABLESIZE]; |
| 16 |
|
| 17 |
extern void init_ptr_assoc_table(ptr_assoc **hash_table); |
| 18 |
extern void add_ptr_assoc(ptr_assoc **hash_table, void *key, void *value); |
| 19 |
extern void *find_assoc_value(ptr_assoc **hash_table, void *key); |
| 20 |
extern void free_ptr_assoc(ptr_assoc **hash_table, void *key); |