Date: Wed, 23 Feb 2005 08:08:55 -0500 (EST)
From: "Earnie Boyd" <address@hidden>
Cc: address@hidden, address@hidden, address@hidden
> That's better than nothing, but I think Diff should ignore CR
> characters _by_default_, without any extra switches. That way, you
> won't need to hack scripts that test files produced on Windows against
> expected results that come from Unix.
>
Unfortunately that isn't always correct. MSYS operates in ``binary
mode''
and not ``text mode'' so that files that end in \n remain that way.
You mean _all_ MSYS ports _always_ use binary mode? If so, I find
such a sweeping decision to be unwise at the very least. In my
experience, the decision which I/O mode to use is best left to each
individual ported program, since one needs an intimate knowledge of
the application in order to choose the best mode.
In the case of Diff, there's already code in the official sources to
use the text mode by default, and only switch to binary mode for
specific command-line options. That code is working well for the
DJGPP port of Diff, so why cannot MSYS use the same code?
I provided the treat \r as white space to deal with file a has \r\n
and file b has \n line endings. The two files are different and one
could make the case that they wanted the diff file to show that
difference.
If they want such files to compare different, they can use --binary.
In my experience, the occasions when it is desirable to see such
differences are by far less frequent than the opposite situations, and
usually happen in interactive usage, where --binary is a good
solution.
_______________________________________________
Make-w32 mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/make-w32