delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/07/14/10:15:34

Date: Fri, 14 Jul 2000 10:14:37 -0400
Message-Id: <200007141414.KAA29959@envy.delorie.com>
From: DJ Delorie <dj AT delorie DOT com>
To: djgpp AT delorie DOT com
In-reply-to: <8kn119$fcg$1@nets3.rz.RWTH-Aachen.DE> (message from
Hans-Bernhard Broeker on 14 Jul 2000 12:28:25 GMT)
Subject: Re: Pipe to sendmail (again)
References: <yG3a5.322335$k22 DOT 1427482 AT flipper> <56ga5.329089$k22 DOT 1448044 AT flipper> <8kcu4s$juv$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE> <200007130406 DOT AAA24310 AT envy DOT delorie DOT com> <8kkki9$gcv$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE> <200007131819 DOT OAA25496 AT envy DOT delorie DOT com> <8kn119$fcg$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> mounted as 'text', the other as 'binary'. Now, as long as this program
> really writes text files, everything should work nicely, as stated.

Yup.  It's the "really writes text files" cases that the mount table
is designed for.

> But what if it starts to operate on some files meant to be binary,
> too? Remember: there are no "rb" or "wb" modes in this code. I.e. the

Programs that require binary mode must specify binary mode.  Programs
that deal with text files don't specify anything, and the mount table
determines what kind of text file they create.  I have written
programs that use "wt" when I know the file *must* be cr/lf
(i.e. batch files) regardless of whether or not the "other" text files
are cr/lf or just lf.

- Raw text -


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