summaryrefslogtreecommitdiff
path: root/xdiff/xdiffi.c
diff options
context:
space:
mode:
Diffstat (limited to 'xdiff/xdiffi.c')
-rw-r--r--xdiff/xdiffi.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/xdiff/xdiffi.c b/xdiff/xdiffi.c
index a4542c05b6..69689fab24 100644
--- a/xdiff/xdiffi.c
+++ b/xdiff/xdiffi.c
@@ -390,12 +390,9 @@ static xdchange_t *xdl_add_change(xdchange_t *xscr, long i1, long i2, long chg1,
}
-static int recs_match(xrecord_t *rec1, xrecord_t *rec2, long flags)
+static int recs_match(xrecord_t *rec1, xrecord_t *rec2)
{
- return (rec1->ha == rec2->ha &&
- xdl_recmatch(rec1->ptr, rec1->size,
- rec2->ptr, rec2->size,
- flags));
+ return (rec1->ha == rec2->ha);
}
/*
@@ -759,10 +756,10 @@ static inline int group_previous(xdfile_t *xdf, struct xdlgroup *g)
* following group, expand this group to include it. Return 0 on success or -1
* if g cannot be slid down.
*/
-static int group_slide_down(xdfile_t *xdf, struct xdlgroup *g, long flags)
+static int group_slide_down(xdfile_t *xdf, struct xdlgroup *g)
{
if (g->end < xdf->nrec &&
- recs_match(xdf->recs[g->start], xdf->recs[g->end], flags)) {
+ recs_match(xdf->recs[g->start], xdf->recs[g->end])) {
xdf->rchg[g->start++] = 0;
xdf->rchg[g->end++] = 1;
@@ -780,10 +777,10 @@ static int group_slide_down(xdfile_t *xdf, struct xdlgroup *g, long flags)
* into a previous group, expand this group to include it. Return 0 on success
* or -1 if g cannot be slid up.
*/
-static int group_slide_up(xdfile_t *xdf, struct xdlgroup *g, long flags)
+static int group_slide_up(xdfile_t *xdf, struct xdlgroup *g)
{
if (g->start > 0 &&
- recs_match(xdf->recs[g->start - 1], xdf->recs[g->end - 1], flags)) {
+ recs_match(xdf->recs[g->start - 1], xdf->recs[g->end - 1])) {
xdf->rchg[--g->start] = 1;
xdf->rchg[--g->end] = 0;
@@ -833,7 +830,7 @@ int xdl_change_compact(xdfile_t *xdf, xdfile_t *xdfo, long flags) {
end_matching_other = -1;
/* Shift the group backward as much as possible: */
- while (!group_slide_up(xdf, &g, flags))
+ while (!group_slide_up(xdf, &g))
if (group_previous(xdfo, &go))
BUG("group sync broken sliding up");
@@ -848,7 +845,7 @@ int xdl_change_compact(xdfile_t *xdf, xdfile_t *xdfo, long flags) {
/* Now shift the group forward as far as possible: */
while (1) {
- if (group_slide_down(xdf, &g, flags))
+ if (group_slide_down(xdf, &g))
break;
if (group_next(xdfo, &go))
BUG("group sync broken sliding down");
@@ -875,7 +872,7 @@ int xdl_change_compact(xdfile_t *xdf, xdfile_t *xdfo, long flags) {
* other file that it can align with.
*/
while (go.end == go.start) {
- if (group_slide_up(xdf, &g, flags))
+ if (group_slide_up(xdf, &g))
BUG("match disappeared");
if (group_previous(xdfo, &go))
BUG("group sync broken sliding to match");
@@ -918,7 +915,7 @@ int xdl_change_compact(xdfile_t *xdf, xdfile_t *xdfo, long flags) {
}
while (g.end > best_shift) {
- if (group_slide_up(xdf, &g, flags))
+ if (group_slide_up(xdf, &g))
BUG("best shift unreached");
if (group_previous(xdfo, &go))
BUG("group sync broken sliding to blank line");