Import fastforward 0.51
[fastforward] / strset.h
CommitLineData
8d5530c4
MW
1#ifndef STRSET_H
2#define STRSET_H
3
4#include "uint32.h"
5
6typedef struct strset_list
7 {
8 uint32 h;
9 int next;
10 }
11strset_list;
12
13typedef struct
14 {
15 int mask; /* mask + 1 is power of 2, size of hash table */
16 int n; /* number of entries used in list and x */
17 int a; /* number of entries allocated in list and x */
18 int *first; /* first[h] is front of hash list h */
19 strset_list *p; /* p[i].next is next; p[i].h is hash of x[i] */
20 char **x; /* x[i] is entry i */
21 }
22strset;
23
24extern uint32 strset_hash();
25extern int strset_init();
26extern char *strset_in();
27extern int strset_add();
28
29#endif