blob: 9947526379abe09e159c6cd27dc901a8e924d01a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
/* For copyright information, see olden_v1.0/COPYRIGHT */
#include "stdio.h"
typedef struct hash_entry {
unsigned int key;
void *entry;
struct hash_entry *next;
unsigned int padding;
} *HashEntry;
typedef struct hash {
HashEntry *array;
int (*mapfunc)(unsigned int);
int size;
unsigned int padding;
} *Hash;
Hash MakeHash(int size, int map(unsigned int));
void *HashLookup(unsigned int key, Hash hash);
void HashInsert(void *entry,unsigned int key, Hash hash);
void HashDelete(unsigned int key, Hash hash);
|