ftp.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/05/08/21:08:43

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 <cbfalconer AT yahoo DOT com>
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: <Pine DOT LNX DOT 4 DOT 21 DOT 0205081655590 DOT 26648-100000 AT gulbis DOT latnet DOT lv> <Pine DOT SUN DOT 3 DOT 91 DOT 1020508170644 DOT 25387K-100000 AT is> <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>
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 <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 -


  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019