Cbreak or not Cbreak, that is the question ...

jpm at bnl.ARPA jpm at bnl.ARPA
Mon Sep 10 17:19:46 AEST 1984


>    To do unbuffered I/O on Unix systems without playing with the tty driver
>you can use the lowest level I/O commands (short of asm), read and write.  

But that wont get the same thing as turning CBREAK on. The read() call
still wont return until a full line has been typed. There is no call in Unix
like ci() in DeSmet C. ci() can be simulated by going into CBREAK mode,
reading one character, and then going back to normal. A better idea might
be to rework the program to use CBREAK mode at all times.

--
				John McNamee
			..!decvax!philabs!sbcs!bnl!jpm
				jpm at Bnl.Arpa

			   "Use a modem, Go to jail"



More information about the Comp.lang.c mailing list