Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!src.honeywell.com!msi.umn.edu!cs.umn.edu!ux.acs!mndaily From: mndaily@ux.acs.umn.edu (Linda Seebach) Newsgroups: comp.lang.c Subject: Some weird variant of getchar... Message-ID: <2773@ux.acs.umn.edu> Date: 27 Nov 90 08:30:33 GMT Reply-To: mndaily@ux.acs.umn.edu (Linda Seebach) Organization: University of Minnesota, ACSS Lines: 17 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