ILIAS
release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
|
"Unified" diff renderer.
A class to render Diffs in different formats.
Class used internally by Diff to actually compute the diffs.
General API for generating and formatting diffs - the differences between two sequences of strings.
The PHP diff code used in this package was originally written by Geoffrey T. Dairiki and is used with his permission.
$Horde: framework/Text_Diff/Diff.php,v 1.14 2005/07/03 05:10:11 selsky Exp $
$Horde: framework/Text_Diff/Diff.php,v 1.14 2005/07/03 05:10:11 selsky Exp $
This class uses the xdiff PECL package (http://pecl.php.net/package/xdiff) to compute the differences between the two input arrays.
@access private
This class is implemented using native PHP code.
The algorithm used here is mostly lifted from the perl module Algorithm::Diff (version 1.06) by Ned Konz, which is available at: http://www.perl.com/CPAN/authors/id/N/NE/NEDKONZ/Algorithm-Diff-1.06.zip
More ideas are taken from: http://www.ics.uci.edu/~eppstein/161/960229.html
Some ideas (and a bit of code) are taken from analyze.c, of GNU diffutils-2.7, which can be found at: ftp://gnudist.gnu.org/pub/gnu/diffutils/diffutils-2.7.tar.gz
Some ideas (subdivision by NCHUNKS > 2, and some optimizations) are from Geoffrey T. Dairiki dairi.nosp@m.ki@d.nosp@m.airik.nosp@m.i.or.nosp@m.g. The original PHP version of this code was written by him, and is used/adapted with his permission.
@access private
@access private
This class renders the diff in classic diff format. It is intended that this class be customized via inheritance, to obtain fancier outputs.
$Horde: framework/Text_Diff/Diff/Renderer.php,v 1.10 2005/06/12 18:07:53 chuck Exp $
This class renders the diff in classic "unified diff" format.
$Horde: framework/Text_Diff/Diff/Renderer/unified.php,v 1.4 2005/03/07 14:58:30 jan Exp $