X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-workers-bounces using -f Message-ID: <3CD9AA83.F3E355D5@yahoo.com> Date: Wed, 08 May 2002 18:45:23 -0400 From: CBFalconer Organization: Ched Research X-Mailer: Mozilla 4.75 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: djgpp-workers AT delorie DOT com Subject: Re: RFA: Ignore DOS end-of-line characters (ctrl-Z) unless -W References: <20020508153338 DOT GE20829 AT codesourcery DOT com> <5832-Wed08May2002215938+0300-eliz AT is DOT elta DOT co DOT il> <20020508202317 DOT GI20829 AT codesourcery DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp-workers AT delorie DOT com Zack Weinberg wrote: > > On Wed, May 08, 2002 at 09:59:38PM +0300, Eli Zaretskii wrote: > > > Date: Wed, 8 May 2002 08:33:38 -0700 > > > From: Zack Weinberg > > > > > > > For other systems, I guess a warning under -W is okay. > > > > > > With or without truncating the input file? > > > > Without, I guess: on any other system, you cannot be sure that the > > file with a ^Z came from a DOSish platform. I expect Unix and > > GNU/Linux users outcry if/when they find out that a ^Z causes GCC to > > stop reading. > > As it is, ^Z in a file will produce a hard error, so I doubt anyone is > relying on the preprocessor not stopping. > > Perhaps we could make the warning on by default if (a) the system is > Unix-y, (b) there is other text after the ^Z (besides more ^Z-s). > That should prevent user confusion. > > > There's no relation between ^Z and newlines whatsoever. Old DOS > > editors could put a ^Z anywhere, including several ^Zs one after > > another. > > Do they ever insert a ^Z in the middle of a file in order to truncate > it, and not bother to update the filesystem's idea of the file size? > (This is the only way I can think of that there would be a ^Z with a > bunch of text after it, when the file is transferred to a system that > ignores ^Z.) Yes - that is done. I have designed software for DOS that does precisely that, but only on text files. -- Chuck F (cbfalconer AT yahoo DOT com) (cbfalconer AT worldnet DOT att DOT net) Available for consulting/temporary embedded and systems. USE worldnet address!