Some weird variant of getchar...

Linda Seebach mndaily at ux.acs.umn.edu
Tue Nov 27 19:30:33 AEST 1990


Ok, I know this sounds stupid. However:

I have been looking, for ages, for a way of doing a non-waiting getchar.

Normally, getchar() waits until you give it a carriage return. If you are
in cbreak/raw mode (or something equivalent) it waits until you hit a
key. Is there any portable call (i.e., one that can be expected to work
on most computers, without hardware hacks) that will return *whether or not*
you have hit a key, and return a meaningful value? I would like to have such
a routine so I can check to see what the user wants to do without halting
my program. How is this done, pray tell?

--SeebS--
-- 
mndaily under *NO CIRCUMSTANCES WHATSOEVER* speaks for the Minnesota Daily.
Posts signed "--SeebS--" have no connection to Linda Seebach.
Any similarities to persons living or dead are ... oops



More information about the Comp.lang.c mailing list