bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sdiff Enhancement


From: Paul Eggert
Subject: Re: sdiff Enhancement
Date: Thu, 06 Dec 2007 15:12:39 -0800
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

Thanks for that patch.  Here are some comments on it:

* I don't see why we'd need a new option.  The modified behavior looks
  nicer, and we should just use it unconditionally, at least on
  small-enough regions.  Would there be a downside to that?

* Please use the recommended GNU indenting style in the code that you add.
  The current code uses that style, so you can just mimic it.  If there
  are any questions you can consult
  <http://www.gnu.org/prep/standards/html_node/Formatting.html>
  for the details.

* If possible, please prepare your patch against the latest version of
  diffutils in CVS.  You'll need CVS and GIT installed.  Here's how to
  get and build it:

     cvs -z3 -d:pserver:address@hidden:/sources/diffutils co diffutils
     cd diffutils
     ./bootstrap
     ./configure
     make

  After you make your changes, you can use "cvs diff" to send the changes.

* Can you elaborate a bit more on the algorithm you use to find the
  best alignment?  If you have access to it, you might want to take a
  look at Gonzalo Navarro's paper "A guided tour to approximate string
  matching" in ACM Computing Surveys 33, 1 (March 2001), 31-88
  <http://doi.acm.org/10.1145/375360.375365>.

* I tried using the proposed change and had some problems.  My first
  test case was to compare the source code to diffutils 2.7 and
  diffutils 2.8.1 using the new method.  This caused 'diff' to go into
  what appears to be an infinite loop.  Here's how to reproduce the
  problem:

     wget ftp://ftp.gnu.org/gnu/diffutils/diffutils-2.7.tar.gz
     wget ftp://ftp.gnu.org/gnu/diffutils/diffutils-2.8.1.tar.gz
     tar xf diffutils-2.7.tar.gz
     tar xf diffutils-2.8.1.tar.gz
     diff -Yr diffutils-2.7 diffutils-2.8.1 >/tmp/0

  My second test case was to run "diff -Y" on the two attached files
  ABOUT-NLS-0 and ABOUT-NLS-1.  This caused "diff" to fail with a message
  "*** glibc detected *** double free or corruption (out): 0xb7ef14f8 ***".

Could you please look into these problems?  Thanks.  I also attach the
diff that I used, compared to the CVS copy of diffutils (note that I
got rid of the option so I just used "diff -y").

Attachment: ABOUT-NLS-0
Description: Text document

Attachment: ABOUT-NLS-1
Description: Text document

Attachment: diffutils.diff
Description: patch against CVS diffutils


reply via email to

[Prev in Thread] Current Thread [Next in Thread]