mirror of
https://git.zx2c4.com/cgit
synced 2025-07-04 15:24:33 +02:00
new_filter: determine extra_args from filter type
Currently the number of extra arguments is linked hard to the type of the filter. This is also logical since it would be confusing to have a different number of arguments for the same type of filter depending on the context under which the filter is run (unless ofcourse one the parameters would make the context clear, which is currently not the case). Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
This commit is contained in:
parent
cc59ee5026
commit
9240a828d1
2 changed files with 24 additions and 7 deletions
4
cgit.h
4
cgit.h
|
@ -51,6 +51,10 @@ 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);
|
||||
|
||||
typedef enum {
|
||||
ABOUT, COMMIT, SOURCE
|
||||
} filter_type;
|
||||
|
||||
struct cgit_filter {
|
||||
char *cmd;
|
||||
char **argv;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue