Re: DOS/Windows-specific code: source.c

Eli Zaretskii
2001-05-09T03:05:00Z

On Tue, 8 May 2001, Christopher Faylor wrote:

> >> Actually, why not always just use O_BINARY in this file without the
> >> conditional and remove the use of O_BINARY everywhere else?
> >
> >Because it's wrong to read source files in binary mode.
>
> Not necessarily. If you are storing CTRL-Zs in the source file, it might
> make sense on MS-DOS and Windows.

You can't in practice store ^Z in a text file on DOS/Windows, because
95% of text editors on those systems will stop reading the file when
they see the first ^Z. Unless you can force everybody to use either
Emacs or Cygwin-compiled editors, you can safely assume any ^Z
character in a text file marks the end of the file, and should not be
displayed.