combine-diff: refactor built-in xdiff interface.
This refactors the line-by-line callback mechanism used in combine-diff so that other programs can reuse it more easily. Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
18
xdiff-interface.h
Normal file
18
xdiff-interface.h
Normal file
@ -0,0 +1,18 @@
|
||||
#ifndef XDIFF_INTERFACE_H
|
||||
#define XDIFF_INTERFACE_H
|
||||
|
||||
#include "xdiff/xdiff.h"
|
||||
|
||||
struct xdiff_emit_state;
|
||||
|
||||
typedef void (*xdiff_emit_consume_fn)(void *, char *, unsigned long);
|
||||
|
||||
struct xdiff_emit_state {
|
||||
xdiff_emit_consume_fn consume;
|
||||
char *remainder;
|
||||
unsigned long remainder_size;
|
||||
};
|
||||
|
||||
int xdiff_outf(void *priv_, mmbuffer_t *mb, int nbuf);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user