Some weird variant of getchar...

Richard A. O'Keefe ok at goanna.cs.rmit.oz.au
Wed Nov 28 17:31:49 AEST 1990


In article <2773 at ux.acs.umn.edu>, mndaily at ux.acs.umn.edu (Linda Seebach) writes:
> Ok, I know this sounds stupid. However:

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

There isn't any portable way of doing it in C, because some of the
operating systems C is available on cannot do it.  The best you can do
is make up two names (kb_getch, kb_ready, perhaps) and write an
implementation for each of the systems you are concerned with.

Perhaps it is time the net collaborated to produce model implementations
of these functions for MS-DOS, OS/2, VMS, BSD, S5, put them on a mail
server somewhere, and added the location to the FAQ?
-- 
I am not now and never have been a member of Mensa.		-- Ariadne.



More information about the Comp.lang.c mailing list