Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA
Path: utzoo!watmath!clyde!bonnie!akgua!sdcsvax!dcdwest!ittvax!decvax!genrad!mit-eddie!godot!harvard!seismo!brl-tgr!tgr!lcc.barry@UCLA-LOCUS.ARPA
From: Barry Gold 
Newsgroups: net.unix-wizards
Subject: Re: Scanning stdin with no pause
Message-ID: <6695@brl-tgr.ARPA>
Date: Thu, 20-Dec-84 14:08:13 EST
Article-I.D.: brl-tgr.6695
Posted: Thu Dec 20 14:08:13 1984
Date-Received: Sun, 23-Dec-84 01:41:16 EST
Sender: news@brl-tgr.ARPA
Organization: Ballistic Research Lab
Lines: 13

May I suggest:
	A. ioctl(fildes,FIONREAD, &count) which will tell you whether there are
any characters available from the file.
	B. If you're using stdio, look in the buffer--the format of the stdio
FILE construct is published.
	C. Run in cbreak mode and make the character you want to spot (I assume
it's one specific character you're interested in) into an interrupt character
(INT or QUIT) which you can then catch.

If you really want never to hang on that input stream, you'd better not use
stdio.

barry