Re: WOT: Testing stdin

New Message Reply Date view Thread view Subject view Author view

Alejandro_Saez++at++dmr.ca
Thu, 24 Jun 1999 16:02:09 +0200


In my old days of DOS programming there was a function called kbhit that did the
trick which returned TRUE if the
keyborad had been used. Now, that was C so you might need to add (prepend) an
underscore to be able to "see" it from C++
code ( _kbhit() ). And of course WinNT has nothing to do with DOS, right? but
then if I were to bet on it, I would say chances are
 pretty high it will work anyways

If Iīm not mistaking it, select should be available with winsockets but I donīt
know if the winsocket implementation is complete and
seamless enough to integrate with stdin (under BSD unixs is also a system call).
but may be someone may comment. It would
be nice for portability issues.

Thom DeCarlo <trdecarlo++at++tasc.com> on 23/06/99 23:13:35

To: Don Hatch <hatch++at++sgi.com>
cc: info-vega <info-vega++at++paradigmsim.com>, info-performer
      <info-performer++at++sgi.com> (bcc: Alejandro Saez/MAD/DMR/CA)
Subject: Re: WOT: Testing stdin

Well, I guess I have to admit it. I'm not writing this on an SGI. I'm on WinNT
using VC++ 6.0 and VegaNT.

I can't find anything on this machine that defines the select() function. And
the read() function still blocks until '\n' is entered. I did find an
_filelength() function which I thought might work, but it just returns an
error whether anything is on the input buffer or not.

Thom

-----------------------------------------------------------------------
List Archives, FAQ, FTP: http://www.sgi.com/software/performer/
            Submissions: info-performer++at++sgi.com
        Admin. requests: info-performer-request++at++sgi.com


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Thu Jun 24 1999 - 07:00:41 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.