1-char input in C

Dubman mort at ihuxn.UUCP
Thu Dec 22 12:44:54 AEST 1983


I am writing a program in C that requires a menu with four choices,
I, D, L, and Q for Insert, Delete, List and Quit.

I want to have it so that the program can key an ASCII value for the key
from the VT100 terminal without having to have the user type RETURN.

I tried using getchar() but inputs an entire line up to the RETURN, returns
the first letter, and shoves the rest in a buffer that is emptied the next
time getchar() is called.

Any ideas?

		Thanks in Advance,


-- 

Jonathan Dubman - care of:

		Mort Dubman		AT&T Bell Laboratories
		ihnp4!ihuxn!mort	Naperville, IL.



More information about the Comp.lang.c mailing list