From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eli Zaretskii To: Christopher Faylor Cc: gdb@sources.redhat.com Subject: Re: DOS/Windows-specific code: source.c Date: Wed, 09 May 2001 03:05:00 -0000 Message-id: References: <20010508153123.B26261@redhat.com> X-SW-Source: 2001-05/msg00176.html 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.