From 00f8f97d30be7992c16bc466532cb591e00314bf Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sat, 16 Jan 2010 21:01:28 -0800 Subject: xdl_merge(): introduce xmparam_t for merge specific parameters So far we have only needed to be able to pass an option that is generic to xdiff family of functions to this function. Extend the interface so that we can give it merge specific parameters. Signed-off-by: Junio C Hamano --- xdiff/xdiff.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'xdiff/xdiff.h') diff --git a/xdiff/xdiff.h b/xdiff/xdiff.h index 4da052a3f..b265909c6 100644 --- a/xdiff/xdiff.h +++ b/xdiff/xdiff.h @@ -108,9 +108,13 @@ long xdl_mmfile_size(mmfile_t *mmf); int xdl_diff(mmfile_t *mf1, mmfile_t *mf2, xpparam_t const *xpp, xdemitconf_t const *xecfg, xdemitcb_t *ecb); +typedef struct s_xmparam { + xpparam_t xpp; +} xmparam_t; + int xdl_merge(mmfile_t *orig, mmfile_t *mf1, const char *name1, mmfile_t *mf2, const char *name2, - xpparam_t const *xpp, int level, mmbuffer_t *result); + xmparam_t const *xmp, int level, mmbuffer_t *result); #ifdef __cplusplus } -- cgit v1.2.1 From 9914cf468941067b4f3deb9c69c11af3f5b45ccc Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sat, 16 Jan 2010 21:30:18 -0800 Subject: xdl_merge(): allow passing down marker_size in xmparam_t This allows the callers of xdl_merge() to pass marker_size (defaults to 7) in xmparam_t argument, to use conflict markers of non-default length. Signed-off-by: Junio C Hamano --- xdiff/xdiff.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'xdiff/xdiff.h') diff --git a/xdiff/xdiff.h b/xdiff/xdiff.h index b265909c6..22f391342 100644 --- a/xdiff/xdiff.h +++ b/xdiff/xdiff.h @@ -110,8 +110,11 @@ int xdl_diff(mmfile_t *mf1, mmfile_t *mf2, xpparam_t const *xpp, typedef struct s_xmparam { xpparam_t xpp; + int marker_size; } xmparam_t; +#define DEFAULT_CONFLICT_MARKER_SIZE 7 + int xdl_merge(mmfile_t *orig, mmfile_t *mf1, const char *name1, mmfile_t *mf2, const char *name2, xmparam_t const *xmp, int level, mmbuffer_t *result); -- cgit v1.2.1