CompuServe Thread

Forum unknown · Programming

#C

3 messages in this thread
#18704From: john samuelsMay 13, 1986 8:28 PM
Can anyone tell me (without making me look like an idiot) how to read a single character from the keyboard without having to hit Return in 'C' (I'm using Manx). Just learning this stuff, y' see.
#18722From: Don CurtisMay 13, 1986 10:36 PM
Look in the Manx manual under Library Overview, page libov.17 where it describes console I/O. The CONSOLE (keyboard) is normally buffered by the system so you can't get a single character until you "flush" the buffer with a CR. The function ioctl(fd,cmd,stty) sets the mode of the console and can be set for unbuffered I/O. Look on page lib.25 for a description.
#18722From: Don CurtisMay 13, 1986 10:36 PM
Look in the Manx manual under Library Overview, page libov.17 where it describes console I/O. The CONSOLE (keyboard) is normally buffered by the system so you can't get a single character until you "flush" the buffer with a CR. The function ioctl(fd,cmd,stty) sets the mode of the console and can be set for unbuffered I/O. Look on page lib.25 for a description.