$delete[] =
$from_lines[$xi++
];
} $add = array
();
while ($yi <
$n_to &&
$this->ychanged
[$yi]) { $add[] =
$to_lines[$yi++
];
} if ($delete &&
$add) { $edits[] =
new Text_Diff_Op_change($delete,
$add);
} elseif ($delete) { $edits[] =
new Text_Diff_Op_delete($delete);
} elseif ($add) { $edits[] =
new Text_Diff_Op_add($add);
} } return $edits;
} /**
* Divides the Largest Common Subsequence (LCS) of the sequences (XOFF,
* XLIM) and (YOFF, YLIM) into NCHUNKS approximately equally sized
* segments.
*
* Returns (LCS, PTS). LCS is the length of the LCS. PTS is an array of
* NCHUNKS+1 (X, Y) indexes giving the diving points between sub
* sequences. The first sub-sequence is contained in (X0, X1), (Y0, Y1),
* the second in (X1, X2), (Y1, Y2) and so on. Note that (X0, Y0) ==
* (XOFF, YOFF) and (X[NCHUNKS], Y[NCHUNKS]) == (XLIM, YLIM).
*
* This function assumes that the first lines of the specified portions of
* the two files do not match, and likewise that the last lines do not
* match. The caller must trim matching lines from the beginning and end
* of the portions it is going to specify.
*/