1 #ifndef RH_CONFIG_H
 2 #define RH_CONFIG_H
 3 
 4 #include "rh_buffer.h"
 5 #include "queue.h"
 6 
 7 TAILQ_HEAD(rh_config_list, rh_config);
 8 TAILQ_HEAD(rh_config_value_list, rh_config_value);
 9 
10 struct rh_config_hash {
11         struct rh_config_list           **buckets;
12         size_t                          nbuckets;
13 };
14 
15 struct rh_config_value {
16         rh_buffer_t                     buffer;
17         TAILQ_ENTRY(rh_config_value)    list;
18 };
19 
20 /*
21  * name "value" {
22  *      name    "value" "value"
23  *      name    "value"
24  * }
25  *
26  * <container>
27  *      name    "value" "value"
28  * </container>
29  * 
30  * <container "value">
31  *      
32  *      name    "value" "value"
33  *      
34  *      <container "value">
35  *              name    "value" "value"
36  *      </container>
37  *      
38  * </container>
39  *
40  */
41 
42 struct rh_config {
43 
44         struct rh_config                *parent;
45         
46         /* VirtualHost, ..      */
47         rh_buffer_t                     name;
48         
49         struct rh_config_value_list     value;
50         
51         int                             is_container;   /* { .. } */
52         int                             is_value;
53         int                             is_value_mergable;
54 
55         struct rh_config_hash           childs;
56 };
57 
58 
59 #endif /* RH_CONFIG_H */


syntax highlighted by Code2HTML, v. 0.9.1