Echoing chars and input functions

Michael Burgett burgett at steel.COM
Fri Aug 19 23:43:50 AEST 1988


In article <5940003 at hpcupt1.HP.COM> williamo at hpcupt1.HP.COM (William O'Saughnessy) writes:
>
>OK, what is the proper and portable way to get a character from stdin
>without having it echoed to the screen?!!!!
>
>Basic may have C beat here it defines the way with INKEY but there 
>appears to be no machine independent way of doing it in C!

Sigh... if you are on unix, check the ioctl system library functions to see
how to toggle terminal echo, if your're on some other OS RTFB for that OS, 
C treats io as a file... do you *really* think C would echo characters read 
from a file back to it?  One has to remember that C was designed to be 
portable... a claim that I've never (seriously) heard mentioned about that
other language (and I do use that term loosely...) you mentioned.

	mike burget

			burgett!adobe at decwrl.dec.com



More information about the Comp.lang.c mailing list