root/tags/rel_1-0-1/ext/http11/tst.h

Revision 4, 0.7 kB (checked in by zedshaw, 3 years ago)

initial import into trunk

Line 
1
2
3 struct node
4 {
5    unsigned char value;
6    struct node *left;
7    struct node *middle;
8    struct node *right;
9 };
10
11 struct tst
12 {
13    int node_line_width;
14    struct node_lines *node_lines;
15    struct node *free_list;
16    struct node *head[127];
17 };
18
19 struct node_lines
20 {
21    struct node *node_line;
22    struct node_lines *next;
23 };
24
25 enum tst_constants
26 {
27    TST_OK, TST_ERROR, TST_NULL_KEY, TST_DUPLICATE_KEY, TST_REPLACE
28 };
29
30 struct tst *tst_init(int node_line_width);
31
32 int tst_insert(unsigned char *key, void *data, struct tst *tst, int option, void **exist_ptr);
33
34 void *tst_search(unsigned char *key, struct tst *tst, int *prefix_len);
35
36 void *tst_delete(unsigned char *key, struct tst *tst);
37
38 void tst_cleanup(struct tst *tst);
39
40
Note: See TracBrowser for help on using the browser.