Path: utzoo!attcan!uunet!seismo!sundc!pitstop!sun!smile!alanf From: alanf%smile@Sun.COM (Alan Fargusson @ peace with the world) Newsgroups: comp.sources.bugs Subject: Re: bug in public domain diff? Message-ID: <86247@sun.uucp> Date: 20 Jan 89 18:56:07 GMT References: <8901191545.AA18697@explorer.dgp.toronto.edu> Sender: news@sun.uucp Lines: 22 In article <8901191545.AA18697@explorer.dgp.toronto.edu>, hugh@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@sun.com ..!sun!alanf