| 1 | #ifndef _ASHCONF_H |
| 2 | #define _ASHCONF_H |
| 3 | |
| 4 | #include <req.h> |
| 5 | |
| 6 | struct cfstate { |
| 7 | struct muth *pf; |
| 8 | int expstart; |
| 9 | char **res, **argv; |
| 10 | int argc; |
| 11 | int lno; |
| 12 | char *file; |
| 13 | }; |
| 14 | |
| 15 | struct child { |
| 16 | struct child *next; |
| 17 | char *name; |
| 18 | int type; |
| 19 | char **argv; |
| 20 | int fd; |
| 21 | }; |
| 22 | |
| 23 | void skipcfblock(struct cfstate *s); |
| 24 | struct cfstate *mkcfparser(FILE *in, char *name); |
| 25 | void freecfparser(struct cfstate *s); |
| 26 | char **getcfline(struct cfstate *s); |
| 27 | char *findstdconf(char *name); |
| 28 | |
| 29 | void freechild(struct child *ch); |
| 30 | struct child *parsechild(struct cfstate *s); |
| 31 | int childhandle(struct child *ch, struct hthead *req, int fd, void (*chinit)(void *), void *idata); |
| 32 | |
| 33 | #endif |