Return to BSD News archive
Received: by minnie.vk1xwt.ampr.org with NNTP
id AA6361 ; Fri, 08 Jan 93 13:02:45 EST
Xref: sserve comp.unix.bsd:9784 comp.lang.c:37776
Path: sserve!manuel.anu.edu.au!munnari.oz.au!spool.mu.edu!umn.edu!news.d.umn.edu!ub.d.umn.edu!not-for-mail
From: cbusch@ub.d.umn.edu (Chris)
Newsgroups: comp.unix.bsd,comp.lang.c
Subject: a unix terminal question
Date: 10 Jan 1993 20:14:44 -0600
Organization: University of Minnesota, Duluth
Lines: 16
Message-ID: <1iql6kINNisk@ub.d.umn.edu>
NNTP-Posting-Host: ub.d.umn.edu
How does one read in a character from standard input without having
the program wait for the key. Basically, I want to do something like:
if(kbhit()) c=getch();
Except that is not standard, and I want it to work on all platforms.
Thanx.
--
-=-=-=-=-=-=-=-=-= Chris Busch cbusch@ub.d.umn.edu =-=-=-=-=-=-=-=-=-=-
C(o_o)) _ "The use of COBOL cripples the
(=) (_ -|- -|- is the mind; its teaching should,
--|-- language of choice. therefore, be reguarded as a
/^\ Protest the use of BASIC! criminal offense." -E.W. Dijkstra
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Wanted: Cheap run-of-the-mill standard VGA board.
Wanted: RC airplane engines, radios, planes, etc