delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/09/27/09:29:45

Date: Mon, 27 Sep 1999 09:53:39 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Damian Yerrick <web DOT poison AT pineight DOT 8m DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: open console into binary mode ?
In-Reply-To: <7sltf1$4ta$1@solomon.cs.rose-hulman.edu>
Message-ID: <Pine.SUN.3.91.990927095324.8548J-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 Sun, 26 Sep 1999, Damian Yerrick wrote:

> DOS's console is always in text mode. How would a
> console (a text input device) be in binary mode?

Of course, it can.  Binary mode implies certain processing (or,
actually, the lack thereof) on the characters that arrive from the
file or device, both on the DOS level and on the C library level.
Since files and devices are treated (almost) identically by the core
DOS/Windows I/O functions and by the library, the same processing can
be done or not done for the console device as well.  `setmode' is
*the* means to switch the console into binary mode, since the console
is already open when the program starts.

Please read the docs of `setmode' in libc.info for more details.  The
documentation of the `signal' function has some more related
information about the DJGPP-specific aspects of switching console
device to binary mode.

- Raw text -


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