🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #6234

HELP! checking and getting a char without actually waiting for return.

#6234
From: Alan Waterman
Date: Sun, 25 Feb 1990 03:02
12 lines
1073 bytes
I am writing a program where I need to get single character commands.

I want to be able to check to see if a char has been entered without
waiting for a return. If nothing is entered, then the program should
continue on with the next statement after a few mseconds.
If a char is entered, I want to retrieve it for use. I've figured
out how to prompt for single char input without having to wait for
a carriage return. Now I need to do the same thing but without waiting
for a char to be entered.

Any clues? Does it have anything to do with cbreak and curses?
Technical Details
Message-ID: <6841@ucdavis.ucdavis.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!ucdavis!ucscb.UCSC.EDU!sorka

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!ucdavis!ucscb.UCSC.EDU!sorka
From: sorka@ucscb.UCSC.EDU (Alan Waterman)
Newsgroups: comp.std.c
Subject: HELP! checking and getting a char without actually waiting for return.
Message-ID: <6841@ucdavis.ucdavis.edu>
Date: 25 Feb 90 03:02:14 GMT
Sender: uucp@ucdavis.ucdavis.edu
Reply-To: sorka@ucscb.UCSC.EDU (Alan Waterman)
Distribution: comp.std.unix
Organization: UCSC Open Access
Lines: 12