aboutsummaryrefslogtreecommitdiffstats
path: root/wlp/C/structs.h
blob: 92036a74a3dc52457338f0b55b9f004d5a6811c6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
 * structs.h - Copyright 2000, 2001 by Cosimo Alfarano <Alfarano@CS.UniBo.It>
 * You can use this software under the terms of the GPL. If we meet some day,
 * and you think this stuff is worth it, you can buy me a beer in return.
 *
 * Thanks to md for this useful formula. Beer is beer.
 */

#ifndef _structs_h_
#define _structs_h_

typedef struct wlp_node_t {
        char *left,*right;
	char *owner;
	char type;		/* unused */
        struct wlp_node_t *next, *prev;
} wlp_node_t;

typedef struct wlp_list_t {
        int count;
        struct wlp_node_t *head, *tail;
} wlp_list_t;


/* white list parser data structure manipulation */
struct wlp_list_t *wlpl_init(struct wlp_node_t *node);
struct wlp_node_t *wlpn_alloc(const char empty);
void wlpn_free(struct wlp_node_t *node);
struct wlp_node_t *wlpn_add(struct wlp_list_t *wlpl,struct wlp_node_t *wlpn);
struct wlp_node_t *wlpn_extract(struct wlp_list_t *wlpl,struct wlp_node_t *wlpn);
/*struct wlp_node_t *wlpn_search(struct wlp_list_t *wlpl,const char id);*/

#endif /* _structs_h_  */

/* EOF */