Mail Archives: djgpp/2012/05/12/11:49:35
> From: Juan Manuel Guerrero <juan DOT guerrero AT gmx DOT de>
> 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.
- Raw text -