delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/09/28/04:29:28

Date: Tue, 28 Sep 1999 09:32:31 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Antonio Bonifati <abonifati AT telsa DOT it>
cc: djgpp AT delorie DOT com
Subject: Re: R: open console into binary mode ?
In-Reply-To: <002001bf091c$af7e7da0$119cd2d4@utente.telsa.it>
Message-ID: <Pine.SUN.3.91.990928093213.17309G-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Mon, 27 Sep 1999, Antonio Bonifati wrote:

> if (!isatty(STDIN_FILENO))
>    setmode(STDIN_FILENO,  O_BINARY);
> if (!isatty(STDOUT_FILENO))
>    setmode(STDOUT_FILENO, O_BINARY);
> 
> and now it's all okay!

Yes, this is the general solution if you need to put only redirected
stdin/stdout into binary mode.

> thank again.
> also thank you for your wonderful DJGPP FAQ

You are welcome.

- Raw text -


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