X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Recipient: djgpp AT delorie DOT com Date: Sat, 12 May 2012 18:50:39 +0300 From: Eli Zaretskii Subject: Re: ANNOUNCE: release 2 of the DJGPP port of GNU Diffutils 3.2 uploaded. In-reply-to: <201205091655.q49GtEVE018228@delorie.com> X-012-Sender: halo1 AT inter DOT net DOT il To: Juan Manuel Guerrero Cc: djgpp AT delorie DOT com Message-id: <83ehqpxusw.fsf@gnu.org> References: <201205091655 DOT q49GtEVE018228 AT delorie DOT com> Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > From: Juan Manuel Guerrero > Date: Wed, 9 May 2012 18:41:36 +0200 > > This is release 2 of the port of GNU Diffutils version 3.2 to MSDOS/DJGPP. > > Diffutils are a collection of programs for finding differences > between files: > > * diff -- displays differences between 2 files line by line; > > * diff3 -- displays differences between 3 files (usually, 2 files > and their common ancestor); > > * sdiff -- displays differences between 2 files side by side, and > allows to merge between them interactively; > > * cmp -- displays differences between 2 binary files byte by byte. > > The documentation of the package includes, in addition to the four > programs mentioned above, also the manual for the Patch utility. I think I found another problem in the ported Diff program. The upstream maintainer removed the portions of the code in io.c that switched file I/O from text to binary mode and back. See the 2 FIXME comments there. The result is that files are read in text mode (unless Diff is invoked with the --binary switch), which stops at the first ^Z character. So if the first null byte in the file is beyond ^Z, Diff will not know that the file is binary, and produce incorrect results (e.g. tell that the files are identical when they really aren't). I see nothing in djgpp/diffs that would countermand this problem. The easiest fix is to restore the code that was removed (modulo some trivial changes due to use of SET_BINARY instead of set_binary_mode). Thanks.