Date: Mon, 27 Sep 1999 09:53:39 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Damian Yerrick 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: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk 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.