Mail Archives: djgpp/1998/04/01/09:02:12
On Tue, 31 Mar 1998, Nate Eldredge wrote:
> Your program will have to put stdin in binary mode as well. The recommended
> method is:
>
> if (isatty(fileno(stdin))
> setmode(fileno(stdin), O_BINARY);
Should be "!isatty", right?
> while `kbhit' and `getch' talk directly to the BIOS.
That's a common misconception. `getch' calls DOS character input
function, so it can be redirected (try it). (`kbhit' indeed calls BIOS,
so it cannot be used with redirected stdin.)
- Raw text -