-rw-r--r-- | cgit.h | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -46,12 +46,21 @@ #define PAGE_ENCODING "UTF-8" typedef void (*configfn)(const char *name, const char *value); typedef void (*filepair_fn)(struct diff_filepair *pair); typedef void (*linediff_fn)(char *line, int len); +struct cgit_filter { + char *cmd; + char **argv; + int old_stdout; + int pipe_fh[2]; + int pid; + int exitstatus; +}; + struct cgit_repo { char *url; char *name; char *path; char *desc; char *owner; @@ -62,12 +71,14 @@ struct cgit_repo { char *clone_url; int snapshots; int enable_log_filecount; int enable_log_linecount; int max_stats; time_t mtime; + struct cgit_filter *commit_filter; + struct cgit_filter *source_filter; }; struct cgit_repolist { int length; int count; struct cgit_repo *repos; @@ -174,12 +185,14 @@ struct cgit_config { int renamelimit; int snapshots; int summary_branches; int summary_log; int summary_tags; struct string_list mimetypes; + struct cgit_filter *commit_filter; + struct cgit_filter *source_filter; }; struct cgit_page { time_t modified; time_t expires; size_t size; @@ -248,8 +261,11 @@ extern struct taginfo *cgit_parse_tag(struct tag *tag); extern void cgit_parse_url(const char *url); extern const char *cgit_repobasename(const char *reponame); extern int cgit_parse_snapshots_mask(const char *str); +extern int cgit_open_filter(struct cgit_filter *filter); +extern int cgit_close_filter(struct cgit_filter *filter); + #endif /* CGIT_H */ |