diff options
Diffstat (limited to 'cgit.h')
-rw-r--r-- | cgit.h | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -49,6 +49,15 @@ typedef void (*configfn)(const char *name, const char *value); | |||
49 | typedef void (*filepair_fn)(struct diff_filepair *pair); | 49 | typedef void (*filepair_fn)(struct diff_filepair *pair); |
50 | typedef void (*linediff_fn)(char *line, int len); | 50 | typedef void (*linediff_fn)(char *line, int len); |
51 | 51 | ||
52 | struct cgit_filter { | ||
53 | char *cmd; | ||
54 | char **argv; | ||
55 | int old_stdout; | ||
56 | int pipe_fh[2]; | ||
57 | int pid; | ||
58 | int exitstatus; | ||
59 | }; | ||
60 | |||
52 | struct cgit_repo { | 61 | struct cgit_repo { |
53 | char *url; | 62 | char *url; |
54 | char *name; | 63 | char *name; |
@@ -65,6 +74,8 @@ struct cgit_repo { | |||
65 | int enable_log_linecount; | 74 | int enable_log_linecount; |
66 | int max_stats; | 75 | int max_stats; |
67 | time_t mtime; | 76 | time_t mtime; |
77 | struct cgit_filter *commit_filter; | ||
78 | struct cgit_filter *source_filter; | ||
68 | }; | 79 | }; |
69 | 80 | ||
70 | struct cgit_repolist { | 81 | struct cgit_repolist { |
@@ -177,6 +188,8 @@ struct cgit_config { | |||
177 | int summary_log; | 188 | int summary_log; |
178 | int summary_tags; | 189 | int summary_tags; |
179 | struct string_list mimetypes; | 190 | struct string_list mimetypes; |
191 | struct cgit_filter *commit_filter; | ||
192 | struct cgit_filter *source_filter; | ||
180 | }; | 193 | }; |
181 | 194 | ||
182 | struct cgit_page { | 195 | struct cgit_page { |
@@ -251,5 +264,8 @@ extern const char *cgit_repobasename(const char *reponame); | |||
251 | 264 | ||
252 | extern int cgit_parse_snapshots_mask(const char *str); | 265 | extern int cgit_parse_snapshots_mask(const char *str); |
253 | 266 | ||
267 | extern int cgit_open_filter(struct cgit_filter *filter); | ||
268 | extern int cgit_close_filter(struct cgit_filter *filter); | ||
269 | |||
254 | 270 | ||
255 | #endif /* CGIT_H */ | 271 | #endif /* CGIT_H */ |