delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/05/09/00:29:22

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-workers-bounces using -f
From: sandmann AT clio DOT rice DOT edu (Charles Sandmann)
Message-Id: <10205090430.AA19706@clio.rice.edu>
Subject: Re: RFA: Ignore DOS end-of-line characters (ctrl-Z) unless -W
To: djgpp-workers AT delorie DOT com
Date: Wed, 8 May 2002 23:29:59 -0500 (CDT)
In-Reply-To: <3CD9AA83.F3E355D5@yahoo.com> from "CBFalconer" at May 08, 2002 06:45:23 PM
X-Mailer: ELM [version 2.5 PL2]
Mime-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

The ^Z sillyness is a holdover from CPM days.  My editor strips 
(ignores) ^Z's at the end of a text file not terminated by newline 
(^Z's filling out a 512 byte block, or  one to many ^Zs at the
end of a file).  I've never seen any file this didn't work on that 
someone purposly didn't do something funny with, in which case I was
happy to see any data content after the ^Z.

^Z's in the file at all are a sign of a broken file writer that ought
to be fixed.  I wouldn't spend a lot of time on it either way.  I
think this is in the category "don't do this" - like putting files
in the \dev directory (which makes much more sense to me than using
old tools dumping dead characters in a file).

I know for a fact that some other commercial compilers will barf
(fail compile) if they see ^Z characters in the file (they read in
binary mode also).  The official fix was to remove the unneeded
characters in the file.  Multiedit had a setting you could toggle
on/off to disable this (why they supported adding ^Zs I'll never know).

But that's just my opinion, since I avoid anthing that would put ^Zs
in a file, so I'll never trigger the code.

- Raw text -


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