Commit | Line | Data |
---|---|---|
600a1ce7 FT |
1 | #ifndef _ASH_DIRPLEX_H |
2 | #define _ASH_DIRPLEX_H | |
3 | ||
4 | #define PAT_BASENAME 0 | |
5 | #define PAT_PATHNAME 1 | |
6 | #define PAT_ALL 2 | |
7 | #define PAT_DEFAULT 3 | |
7711283c | 8 | #define PAT_LOCAL 4 |
600a1ce7 FT |
9 | |
10 | #define PT_FILE 0 | |
11 | #define PT_DIR 1 | |
a0b6c27c | 12 | #define PT_NOTFOUND 2 |
600a1ce7 FT |
13 | |
14 | struct config { | |
15 | struct config *next, *prev; | |
16 | char *path; | |
17 | time_t mtime, lastck; | |
18 | struct child *children; | |
19 | struct pattern *patterns; | |
20 | char **index; | |
300d73d9 | 21 | char *capture; |
54490135 | 22 | int caproot; |
600a1ce7 FT |
23 | }; |
24 | ||
25 | struct rule { | |
26 | int type; | |
27 | char **patterns; | |
28 | }; | |
29 | ||
acc2d159 FT |
30 | struct headmod { |
31 | struct headmod *next; | |
32 | char *name, *value; | |
33 | }; | |
34 | ||
600a1ce7 FT |
35 | struct pattern { |
36 | struct pattern *next; | |
37 | int type; | |
acc2d159 | 38 | struct headmod *headers; |
600a1ce7 FT |
39 | char *childnm; |
40 | char **fchild; | |
41 | struct rule **rules; | |
42 | }; | |
43 | ||
44 | struct child *getchild(struct config *cf, char *name); | |
45 | struct config *readconfig(char *file); | |
46 | struct config *getconfig(char *path); | |
47 | struct config **getconfigs(char *file); | |
da75c835 | 48 | struct child *findchild(char *file, char *name, struct config **cf); |
a0b6c27c | 49 | struct pattern *findmatch(char *file, int trydefault, int type); |
acc2d159 | 50 | void modheaders(struct hthead *req, struct pattern *pat); |
600a1ce7 FT |
51 | |
52 | extern time_t now; | |
b70b2d4f | 53 | extern struct child *notfound; |
600a1ce7 FT |
54 | extern struct config *gconfig, *lconfig; |
55 | ||
56 | #endif |