Tuukka Toivonen wrote:
> How to read one character from console, so that the
> user doesn't have to press enter after the key?
> If I use directly, say getc(), I have to press enter
> after a line. I need something like readkey() function
> was in Borland's MS-DOG compilers (if I remember right).
>
> This should be pretty easy question. Maybe it's some
> ioctl() call but I couldn't find one.
Use tcsetattr() to disable canonical (ICANON) mode. See the termios(2)
and stty(1) manpages for more details about configuring the terminal
driver.
--
Glynn Clements <[EMAIL PROTECTED]>