Mail Archives: djgpp-workers/2002/05/08/21:08:43
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 <zack AT codesourcery DOT com>
> > >
> > > > 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.
<http://cbfalconer.home.att.net> USE worldnet address!
- Raw text -