Getchar w/wout echo
Dave Hammond
daveh at marob.MASA.COM
Sat Aug 20 04:53:32 AEST 1988
Newsgroups: comp.lang.c
Subject: Re: Re: Echoing chars and input functions
References: <8808160751.aa03016 at SMOKE.BRL.MIL> <5940003 at hpcupt1.HP.COM>
Reply-To: daveh at marob.masa.com (Dave Hammond)
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?!!!!
I wonder what makes this such a misunderstood and flammable topic.
Is it such a problem to consider things such as echo, line editing
and other terminal management tasks be the domain of the operating system,
(and as such, machine-dependent) ?
Isn't ioctl(), stty(), or fcntl() [or similar device management routine] in
the same manual as getchar() [no flames about different volumes, please :-)] ?
>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!
I haven't got much Basic experience, but suspect that if the Basic INKEY
function is one which solicits raw (non echoed, key-at-a-time) keyboard input,
there is one which will solicite cooked (echoed, editable, line-at-a-time)
input as well.
More information about the Comp.lang.c
mailing list