]>
Commit | Line | Data |
---|---|---|
be58e70d JK |
1 | #ifndef USERDIFF_H |
2 | #define USERDIFF_H | |
3 | ||
d9bae1a1 JK |
4 | #include "notes-cache.h" |
5 | ||
acd00ea0 NTND |
6 | struct index_state; |
7 | ||
be58e70d JK |
8 | struct userdiff_funcname { |
9 | const char *pattern; | |
10 | int cflags; | |
11 | }; | |
12 | ||
13 | struct userdiff_driver { | |
14 | const char *name; | |
15 | const char *external; | |
122aa6f9 | 16 | int binary; |
be58e70d | 17 | struct userdiff_funcname funcname; |
80c49c3d | 18 | const char *word_regex; |
9cb92c39 | 19 | const char *textconv; |
d9bae1a1 JK |
20 | struct notes_cache *textconv_cache; |
21 | int textconv_want_cache; | |
be58e70d JK |
22 | }; |
23 | ||
c7534ef4 | 24 | int userdiff_config(const char *k, const char *v); |
be58e70d | 25 | struct userdiff_driver *userdiff_find_by_name(const char *name); |
acd00ea0 NTND |
26 | struct userdiff_driver *userdiff_find_by_path(struct index_state *istate, |
27 | const char *path); | |
be58e70d | 28 | |
a64e6a44 JK |
29 | /* |
30 | * Initialize any textconv-related fields in the driver and return it, or NULL | |
31 | * if it does not have textconv enabled at all. | |
32 | */ | |
3813e690 JK |
33 | struct userdiff_driver *userdiff_get_textconv(struct userdiff_driver *driver); |
34 | ||
be58e70d | 35 | #endif /* USERDIFF */ |