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 | |
12 | ||
13 | struct config { | |
14 | struct config *next, *prev; | |
15 | char *path; | |
16 | time_t mtime, lastck; | |
17 | struct child *children; | |
18 | struct pattern *patterns; | |
19 | char **index; | |
300d73d9 | 20 | char *capture; |
600a1ce7 FT |
21 | }; |
22 | ||
23 | struct rule { | |
24 | int type; | |
25 | char **patterns; | |
26 | }; | |
27 | ||
acc2d159 FT |
28 | struct headmod { |
29 | struct headmod *next; | |
30 | char *name, *value; | |
31 | }; | |
32 | ||
600a1ce7 FT |
33 | struct pattern { |
34 | struct pattern *next; | |
35 | int type; | |
acc2d159 | 36 | struct headmod *headers; |
600a1ce7 FT |
37 | char *childnm; |
38 | char **fchild; | |
39 | struct rule **rules; | |
40 | }; | |
41 | ||
42 | struct child *getchild(struct config *cf, char *name); | |
43 | struct config *readconfig(char *file); | |
44 | struct config *getconfig(char *path); | |
45 | struct config **getconfigs(char *file); | |
da75c835 | 46 | struct child *findchild(char *file, char *name, struct config **cf); |
600a1ce7 | 47 | struct pattern *findmatch(char *file, int trydefault, int dir); |
acc2d159 | 48 | void modheaders(struct hthead *req, struct pattern *pat); |
600a1ce7 FT |
49 | |
50 | extern time_t now; | |
b70b2d4f | 51 | extern struct child *notfound; |
600a1ce7 FT |
52 | extern struct config *gconfig, *lconfig; |
53 | ||
54 | #endif |