Message-ID: <3CE66B4F.839F12BA@yahoo.com> From: CBFalconer Organization: Ched Research X-Mailer: Mozilla 4.75 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: How to avoid kbhit() and getkey() ? References: <12024 DOT 1021660112 AT www22 DOT gmx DOT net> <7999-Sat18May2002095237+0300-eliz AT is DOT elta DOT co DOT il> <3CE6268F DOT B82FB4BF AT yahoo DOT com> <8971-Sat18May2002145209+0300-eliz AT is DOT elta DOT co DOT il> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 32 Date: Sat, 18 May 2002 15:09:48 GMT NNTP-Posting-Host: 12.90.167.44 X-Complaints-To: abuse AT worldnet DOT att DOT net X-Trace: bgtnsc05-news.ops.worldnet.att.net 1021734588 12.90.167.44 (Sat, 18 May 2002 15:09:48 GMT) NNTP-Posting-Date: Sat, 18 May 2002 15:09:48 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Eli Zaretskii wrote: > > > From: CBFalconer > > Newsgroups: comp.os.msdos.djgpp > > Date: Sat, 18 May 2002 10:14:15 GMT > > > > IMNSHO the portable way is to create your own function > > > > int chready(FILE *f); > > > > which returns 0 unless it knows that fgetc(f) will return > > immediately. > > I think the question was how to implement such a function so that it > will work both in DJGPP and on Posix platforms. So why did you snip my next sentence, which was: > immediately. You have given a couple of methods of implementing > chready. Once you have this all the rest is under control, > although you may have to eschew some standard library calls to > avoid getting hung up awaiting user input. and it pointed out that this had a wider market than just DJGPP/Posix. -- Chuck F (cbfalconer AT yahoo DOT com) (cbfalconer AT worldnet DOT att DOT net) Available for consulting/temporary embedded and systems. USE worldnet address!