diff options
author | René Scharfe <rene.scharfe@lsrfire.ath.cx> | 2012-05-09 22:24:34 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-05-09 14:08:42 -0700 |
commit | 3319e606336c13ba6475d83e700ca53537cedfd9 (patch) | |
tree | e7efe531ff5cbed7dc39c80f81cabc258f0ab823 /xdiff-interface.c | |
parent | 4b4132fd89b248896d527dffd1ddfb7bbf375a45 (diff) | |
download | git-3319e606336c13ba6475d83e700ca53537cedfd9.tar.gz |
xdiff: remove emit_func() and xdi_diff_hunks()
The functions are unused now, remove them.
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'xdiff-interface.c')
-rw-r--r-- | xdiff-interface.c | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/xdiff-interface.c b/xdiff-interface.c index 0e2c169227..ecfa05f616 100644 --- a/xdiff-interface.c +++ b/xdiff-interface.c @@ -156,50 +156,6 @@ int xdi_diff_outf(mmfile_t *mf1, mmfile_t *mf2, return ret; } -struct xdiff_emit_hunk_state { - xdiff_emit_hunk_consume_fn consume; - void *consume_callback_data; -}; - -static int process_diff(xdfenv_t *xe, xdchange_t *xscr, xdemitcb_t *ecb, - xdemitconf_t const *xecfg) -{ - long s1, s2, same, p_next, t_next; - xdchange_t *xch, *xche; - struct xdiff_emit_hunk_state *state = ecb->priv; - xdiff_emit_hunk_consume_fn fn = state->consume; - void *consume_callback_data = state->consume_callback_data; - - for (xch = xscr; xch; xch = xche->next) { - xche = xdl_get_hunk(xch, xecfg); - - s1 = XDL_MAX(xch->i1 - xecfg->ctxlen, 0); - s2 = XDL_MAX(xch->i2 - xecfg->ctxlen, 0); - same = s2 + XDL_MAX(xch->i1 - s1, 0); - p_next = xche->i1 + xche->chg1; - t_next = xche->i2 + xche->chg2; - - fn(consume_callback_data, same, p_next, t_next); - } - return 0; -} - -int xdi_diff_hunks(mmfile_t *mf1, mmfile_t *mf2, - xdiff_emit_hunk_consume_fn fn, void *consume_callback_data, - xpparam_t const *xpp, xdemitconf_t *xecfg) -{ - struct xdiff_emit_hunk_state state; - xdemitcb_t ecb; - - memset(&state, 0, sizeof(state)); - memset(&ecb, 0, sizeof(ecb)); - state.consume = fn; - state.consume_callback_data = consume_callback_data; - xecfg->emit_func = (void (*)())process_diff; - ecb.priv = &state; - return xdi_diff(mf1, mf2, xpp, xecfg, &ecb); -} - int read_mmfile(mmfile_t *ptr, const char *filename) { struct stat st; |