diff options
| author | 2007-05-13 21:21:19 (JST) | |
|---|---|---|
| committer | 2007-05-13 21:21:19 (JST) | |
| commit | c4ef667961ef4668c9449124f97d55b9ac46c059 (patch) | |
| tree | 3e1d3ed9dbf2bac55d0ffbcd2909c5d935fae48b /cgit.h | |
| parent | 48dc00342effe3ba530ff6cbb79e5d0d5fc740fd (diff) | |
| download | cgit-c4ef667961ef4668c9449124f97d55b9ac46c059.zip cgit-c4ef667961ef4668c9449124f97d55b9ac46c059.tar.gz | |
Add standard interface for file diff functions
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'cgit.h')
| -rw-r--r-- | cgit.h | 7 |
1 files changed, 7 insertions, 0 deletions
| @@ -20,6 +20,7 @@ | |||
| 20 | 20 | ||
| 21 | typedef void (*configfn)(const char *name, const char *value); | 21 | typedef void (*configfn)(const char *name, const char *value); |
| 22 | typedef void (*filepair_fn)(struct diff_filepair *pair); | 22 | typedef void (*filepair_fn)(struct diff_filepair *pair); |
| 23 | typedef void (*linediff_fn)(char *line, int len); | ||
| 23 | 24 | ||
| 24 | struct cacheitem { | 25 | struct cacheitem { |
| 25 | char *name; | 26 | char *name; |
| @@ -117,9 +118,15 @@ extern int chk_positive(int result, char *msg); | |||
| 117 | extern int hextoint(char c); | 118 | extern int hextoint(char c); |
| 118 | 119 | ||
| 119 | extern void *cgit_free_commitinfo(struct commitinfo *info); | 120 | extern void *cgit_free_commitinfo(struct commitinfo *info); |
| 121 | |||
| 122 | extern int cgit_diff_files(const unsigned char *old_sha1, | ||
| 123 | const unsigned char *new_sha1, | ||
| 124 | linediff_fn fn); | ||
| 125 | |||
| 120 | extern void cgit_diff_tree(const unsigned char *old_sha1, | 126 | extern void cgit_diff_tree(const unsigned char *old_sha1, |
| 121 | const unsigned char *new_sha1, | 127 | const unsigned char *new_sha1, |
| 122 | filepair_fn fn); | 128 | filepair_fn fn); |
| 129 | |||
| 123 | extern void cgit_diff_commit(struct commit *commit, filepair_fn fn); | 130 | extern void cgit_diff_commit(struct commit *commit, filepair_fn fn); |
| 124 | 131 | ||
| 125 | extern char *fmt(const char *format,...); | 132 | extern char *fmt(const char *format,...); |
