Use strbuf for struct xdiff_emit_state's remainder
[git/git.git] / xdiff-interface.h
CommitLineData
d9ea73e0
JH
1#ifndef XDIFF_INTERFACE_H
2#define XDIFF_INTERFACE_H
3
4#include "xdiff/xdiff.h"
b4637760 5#include "strbuf.h"
d9ea73e0
JH
6
7struct xdiff_emit_state;
8
9typedef void (*xdiff_emit_consume_fn)(void *, char *, unsigned long);
10
11struct xdiff_emit_state {
12 xdiff_emit_consume_fn consume;
b4637760 13 struct strbuf remainder;
d9ea73e0
JH
14};
15
c279d7e9 16int xdi_diff(mmfile_t *mf1, mmfile_t *mf2, xpparam_t const *xpp, xdemitconf_t const *xecfg, xdemitcb_t *ecb);
c99db9d2
BD
17int xdi_diff_outf(mmfile_t *mf1, mmfile_t *mf2,
18 struct xdiff_emit_state *state, xpparam_t const *xpp,
19 xdemitconf_t const *xecfg, xdemitcb_t *xecb);
c1e335a4 20int parse_hunk_header(char *line, int len,
a0fd3146
JH
21 int *ob, int *on,
22 int *nb, int *nn);
7cab5883 23int read_mmfile(mmfile_t *ptr, const char *filename);
6bfce93e 24int buffer_is_binary(const char *ptr, unsigned long size);
d9ea73e0 25
f258475a
JH
26extern void xdiff_set_find_func(xdemitconf_t *xecfg, const char *line);
27
d9ea73e0 28#endif