author | Lars Hjemli <hjemli@gmail.com> | 2009-08-09 11:46:01 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2009-08-09 11:46:01 (UTC) |
commit | db6303b58883c4417f5bcc0c1ee34fed6553dca3 (patch) (unidiff) | |
tree | ef7775ade9eef57c5a878f9588fe545a7da2c952 /cgit.h | |
parent | 17e3ff42646f182911fd0e5d872082977538db9e (diff) | |
parent | 97b3d252629a8a3b9d356c2532dec7611438e4b9 (diff) | |
download | cgit-db6303b58883c4417f5bcc0c1ee34fed6553dca3.zip cgit-db6303b58883c4417f5bcc0c1ee34fed6553dca3.tar.gz cgit-db6303b58883c4417f5bcc0c1ee34fed6553dca3.tar.bz2 |
Merge branch 'lh/plugins'
Conflicts:
cgit.c
cgit.h
-rw-r--r-- | cgit.h | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -46,12 +46,21 @@ | |||
46 | #define PAGE_ENCODING "UTF-8" | 46 | #define PAGE_ENCODING "UTF-8" |
47 | 47 | ||
48 | typedef void (*configfn)(const char *name, const char *value); | 48 | 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; |
55 | char *path; | 64 | char *path; |
56 | char *desc; | 65 | char *desc; |
57 | char *owner; | 66 | char *owner; |
@@ -62,12 +71,14 @@ struct cgit_repo { | |||
62 | char *clone_url; | 71 | char *clone_url; |
63 | int snapshots; | 72 | int snapshots; |
64 | int enable_log_filecount; | 73 | int enable_log_filecount; |
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 { |
71 | int length; | 82 | int length; |
72 | int count; | 83 | int count; |
73 | struct cgit_repo *repos; | 84 | struct cgit_repo *repos; |
@@ -174,12 +185,14 @@ struct cgit_config { | |||
174 | int renamelimit; | 185 | int renamelimit; |
175 | int snapshots; | 186 | int snapshots; |
176 | int summary_branches; | 187 | int summary_branches; |
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 { |
183 | time_t modified; | 196 | time_t modified; |
184 | time_t expires; | 197 | time_t expires; |
185 | size_t size; | 198 | size_t size; |
@@ -248,8 +261,11 @@ extern struct taginfo *cgit_parse_tag(struct tag *tag); | |||
248 | extern void cgit_parse_url(const char *url); | 261 | extern void cgit_parse_url(const char *url); |
249 | 262 | ||
250 | extern const char *cgit_repobasename(const char *reponame); | 263 | 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 */ |