X-Git-Url: http://git.dolda2000.com/gitweb/?a=blobdiff_plain;f=lib%2Fcf.h;fp=lib%2Fcf.h;h=09dad29932ce2f74aa06366a3d81a15294c3e01e;hb=06c1a7183754349e29a6f4656d88d3f89e4f448a;hp=0000000000000000000000000000000000000000;hpb=da6187f505ee82e8e65d6b82230b2e018b22768e;p=ashd.git diff --git a/lib/cf.h b/lib/cf.h new file mode 100644 index 0000000..09dad29 --- /dev/null +++ b/lib/cf.h @@ -0,0 +1,32 @@ +#ifndef _ASHCONF_H +#define _ASHCONF_H + +#include + +struct cfstate { + struct muth *pf; + int expstart; + char **res, **argv; + int argc; + int lno; + char *file; +}; + +struct child { + struct child *next; + char *name; + int type; + char **argv; + int fd; +}; + +void skipcfblock(struct cfstate *s); +struct cfstate *mkcfparser(FILE *in, char *name); +void freecfparser(struct cfstate *s); +char **getcfline(struct cfstate *s); + +void freechild(struct child *ch); +struct child *parsechild(struct cfstate *s); +int childhandle(struct child *ch, struct hthead *req, int fd); + +#endif