mirror of
https://git.zx2c4.com/cgit
synced 2025-07-13 11:44:36 +02:00
Add generic filter/plugin infrastructure
The functions cgit_open_filter() and cgit_close_filter() can be used to execute filters on the output stream from cgit. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
This commit is contained in:
parent
286a905842
commit
d6f6072560
3 changed files with 62 additions and 0 deletions
12
cgit.h
12
cgit.h
|
@ -129,6 +129,15 @@ struct cgit_query {
|
|||
int showmsg;
|
||||
};
|
||||
|
||||
struct cgit_filter {
|
||||
char *cmd;
|
||||
char **argv;
|
||||
int old_stdout;
|
||||
int pipe_fh[2];
|
||||
int pid;
|
||||
int exitstatus;
|
||||
};
|
||||
|
||||
struct cgit_config {
|
||||
char *agefile;
|
||||
char *cache_root;
|
||||
|
@ -248,5 +257,8 @@ 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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue