delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/09/16/14:28:02

Message-ID: <36000460.AF81BCB@vlsi.com>
Date: Wed, 16 Sep 1998 11:33:04 -0700
From: Charles Marslett <charles DOT marslett AT vlsi DOT com>
MIME-Version: 1.0
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
CC: "Salvador Eduardo Tropea (SET)" <salvador AT inti DOT gov DOT ar>,
djgpp-workers AT delorie DOT com
Subject: Re: auto-binary-mode?
References: <Pine DOT SUN DOT 3 DOT 91 DOT 980916163104 DOT 7343D-100000 AT is>

Eli Zaretskii wrote:
> 
> On Wed, 16 Sep 1998, Salvador Eduardo Tropea (SET) wrote:
> 
> > I agree with Andris and Morten, it must be an optional switch.
> 
> I agree with Morten that doing this by default might be dangerous, but I
> also think that introducing an optional variable or O_xxx bit will render
> this entire change useless.  The whole point of DJ's suggestion, as I
> understand it, was to do all this transparently, like the support for
> "/dev/null" we already have.  If an application will need to be aware of
> the option and use it on purpose, why is this different from O_BINARY?

If the optional variable enabled autodetect, then it would function
differently from O_BINARY if the file were identified to be text mode.

This does bring up the issue of output files, though.  How are they
handled?
Do we wait for a certain number of bytes to be written, then decide if
we
should have been translating 0A's to 0D0As?  That sounds sort of messy
to me.  It could be done, but bugs in the input side and bugs in the
output side would not necessarily be symmetric since the code is not
likely to look much alike.  Or are they always binary?  Or text?  Or?

--Charles

- Raw text -


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