Path: utzoo!yunexus!hydroesm!jtsv16!torsqnt!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!sdd.hp.com!elroy.jpl.nasa.gov!george!alan From: alan@george.Jpl.Nasa.Gov (Alan S. Mazer) Newsgroups: comp.unix.questions Subject: Re: Check input buffer in C Message-ID: <1990May29.200600.6586@elroy.jpl.nasa.gov> Date: 29 May 90 20:06:00 GMT Article-I.D.: elroy.1990May29.200600.6586 References: <1990May26.144958.4395@aucs.uucp> Sender: news@elroy.jpl.nasa.gov (Usenet) Organization: Image Analysis Systems Grp, JPL Lines: 11 In article <1990May26.144958.4395@aucs.uucp>, 852028e@aucs.uucp (Amari M. Elammari) writes: > Is there a UNIX C (sun4 C) function that checks if the input buffer > is empty??? Under 4.2 there was an FIONREAD ioctl -- not sure if this is still available. That returned the number of characters waiting to be read. You can also use select() to find out if something is there. -- Alan # "But seriously, what could go wrong?" ..!ames!elroy!alan alan@elroy.jpl.nasa.gov