delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/09/20/03:18:46

Date: Sun, 20 Sep 1998 10:16:54 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Charles Marslett <charles DOT marslett AT vlsi DOT com>
cc: djgpp-workers AT delorie DOT com
Subject: Re: auto-binary-mode? [OT: What is text mode?]
In-Reply-To: <3602AA07.DD74FEB0@vlsi.com>
Message-ID: <Pine.SUN.3.91.980920101122.406C-100000@is>
MIME-Version: 1.0

On Fri, 18 Sep 1998, Charles Marslett wrote:

> How does the "-literally" function work?  No CR/LF -> LF conversions and
> binary-overwrite, I would guess.  Any other specific behavior?

``Literally'' means literally: i.e., no conversions whatever.  You get in 
the buffer exactly what is on the disk.  And vice versa, when you save 
the buffer in the file.

> Maybe we are using different definitions of the phrase "side effect."  To
> me, it refers to the fact that a programmer must have knowledge of the file
> system to properly write a program that does not manipulate the file system
> explicitly.

No, you just need to know what ANSI standard promises, and not use any 
functionality beyond that, if you want your program to work on more than 
a single platform.  In the case of fseek/ftell, ANSI explicitly says that 
you can't rely on any simple relationship between what fseek returns and 
the byte offsets into the file.

- Raw text -


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