From d9ea73e0564c7db8d791fe6b03c976ce57c9b079 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 5 Apr 2006 02:03:58 -0700 Subject: 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 --- xdiff-interface.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 xdiff-interface.h (limited to 'xdiff-interface.h') diff --git a/xdiff-interface.h b/xdiff-interface.h new file mode 100644 index 0000000000..e2f0d66123 --- /dev/null +++ b/xdiff-interface.h @@ -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 -- cgit v1.2.3