Jeff King | be58e70 | 2008-10-05 17:43:21 -0400 | [diff] [blame] | 1 | #ifndef USERDIFF_H |
| 2 | #define USERDIFF_H |
| 3 | |
Jeff King | d9bae1a | 2010-04-01 20:12:15 -0400 | [diff] [blame] | 4 | #include "notes-cache.h" |
| 5 | |
Jeff King | be58e70 | 2008-10-05 17:43:21 -0400 | [diff] [blame] | 6 | struct userdiff_funcname { |
| 7 | const char *pattern; |
| 8 | int cflags; |
| 9 | }; |
| 10 | |
| 11 | struct userdiff_driver { |
| 12 | const char *name; |
| 13 | const char *external; |
Jeff King | 122aa6f | 2008-10-05 17:43:36 -0400 | [diff] [blame] | 14 | int binary; |
Jeff King | be58e70 | 2008-10-05 17:43:21 -0400 | [diff] [blame] | 15 | struct userdiff_funcname funcname; |
Thomas Rast | 80c49c3 | 2009-01-17 17:29:48 +0100 | [diff] [blame] | 16 | const char *word_regex; |
Jeff King | 9cb92c3 | 2008-10-05 17:43:45 -0400 | [diff] [blame] | 17 | const char *textconv; |
Jeff King | d9bae1a | 2010-04-01 20:12:15 -0400 | [diff] [blame] | 18 | struct notes_cache *textconv_cache; |
| 19 | int textconv_want_cache; |
Jeff King | be58e70 | 2008-10-05 17:43:21 -0400 | [diff] [blame] | 20 | }; |
| 21 | |
Jeff King | c7534ef | 2008-10-26 00:45:55 -0400 | [diff] [blame] | 22 | int userdiff_config(const char *k, const char *v); |
Jeff King | be58e70 | 2008-10-05 17:43:21 -0400 | [diff] [blame] | 23 | struct userdiff_driver *userdiff_find_by_name(const char *name); |
| 24 | struct userdiff_driver *userdiff_find_by_path(const char *path); |
| 25 | |
Jeff King | a64e6a4 | 2016-02-22 13:28:54 -0500 | [diff] [blame] | 26 | /* |
| 27 | * Initialize any textconv-related fields in the driver and return it, or NULL |
| 28 | * if it does not have textconv enabled at all. |
| 29 | */ |
Jeff King | 3813e69 | 2011-05-23 16:30:14 -0400 | [diff] [blame] | 30 | struct userdiff_driver *userdiff_get_textconv(struct userdiff_driver *driver); |
| 31 | |
Jeff King | be58e70 | 2008-10-05 17:43:21 -0400 | [diff] [blame] | 32 | #endif /* USERDIFF */ |