Mail Archives: djgpp/1999/09/27/09:29:45
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 -