bug in public domain diff?

Alan Fargusson @ peace with the world alanf%smile at Sun.COM
Sat Jan 21 04:56:07 AEST 1989


In article <8901191545.AA18697 at explorer.dgp.toronto.edu>, hugh at dgp.toronto.edu ("D. Hugh Redelmeier") writes:
> 
> Anyway, all the versions I have checked seem to produce suboptimal
> output when diffing the following two files.  UNIX diff does not
> have this problem.  Am I right, is this a bug?  Does anyone know a
> fix?  The code is currently beyond my comprehension.
> 
> Notice that pd-diff uselessly deletes and re-inserts 3.  This is not
> wrong, just suboptimal.  Perhaps there is a simple off-by-one error
> in the code.

It looks like the code that tries to find the longest match is doing something
wrong.  This should be nearly the last thing done by diff.  I don't have source
for this.

GNU diff gets this right, so you may want to get that.  I have a version of
diff that I wrote that also gets it right.  I may try and post it after all.
I had decided not to since there are so many versions floating around these
days.
- - - - - - - - - - - - - - - - - - - - -
Alan Fargusson		Sun Microsystems
alanf at sun.com		..!sun!alanf



More information about the Comp.sources.bugs mailing list