X-Git-Url: http://git.dolda2000.com/gitweb/?a=blobdiff_plain;f=src%2Fdirplex%2Fdirplex.h;fp=src%2Fdirplex%2Fdirplex.h;h=14b704c4a1bf813bd85b5ed14e5e8e6000d608a1;hb=600a1ce79471493f8cad5fcf118dc9797331d5aa;hp=0000000000000000000000000000000000000000;hpb=7f5a46defa51aef52a9b2aca958d90c01b8804ed;p=ashd.git diff --git a/src/dirplex/dirplex.h b/src/dirplex/dirplex.h new file mode 100644 index 0000000..14b704c --- /dev/null +++ b/src/dirplex/dirplex.h @@ -0,0 +1,44 @@ +#ifndef _ASH_DIRPLEX_H +#define _ASH_DIRPLEX_H + +#define PAT_BASENAME 0 +#define PAT_PATHNAME 1 +#define PAT_ALL 2 +#define PAT_DEFAULT 3 + +#define PT_FILE 0 +#define PT_DIR 1 + +struct config { + struct config *next, *prev; + char *path; + time_t mtime, lastck; + struct child *children; + struct pattern *patterns; + char **index; +}; + +struct rule { + int type; + char **patterns; +}; + +struct pattern { + struct pattern *next; + int type; + char *childnm; + char **fchild; + struct rule **rules; +}; + +struct child *getchild(struct config *cf, char *name); +struct config *readconfig(char *file); +struct config *getconfig(char *path); +struct config **getconfigs(char *file); +struct child *findchild(char *file, char *name); +struct pattern *findmatch(char *file, int trydefault, int dir); + +extern time_t now; +extern struct config *gconfig, *lconfig; + +#endif