dirplex: Start children in the directory in which they were declared.
[ashd.git] / src / dirplex / dirplex.h
CommitLineData
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
8
9#define PT_FILE 0
10#define PT_DIR 1
11
12struct config {
13 struct config *next, *prev;
14 char *path;
15 time_t mtime, lastck;
16 struct child *children;
17 struct pattern *patterns;
18 char **index;
19};
20
21struct rule {
22 int type;
23 char **patterns;
24};
25
26struct pattern {
27 struct pattern *next;
28 int type;
29 char *childnm;
30 char **fchild;
31 struct rule **rules;
32};
33
34struct child *getchild(struct config *cf, char *name);
35struct config *readconfig(char *file);
36struct config *getconfig(char *path);
37struct config **getconfigs(char *file);
da75c835 38struct child *findchild(char *file, char *name, struct config **cf);
600a1ce7
FT
39struct pattern *findmatch(char *file, int trydefault, int dir);
40
41extern time_t now;
42extern struct config *gconfig, *lconfig;
43
44#endif