Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: C and Linux

Author: Frank Phillips

Date: 13:24:28 04/08/02

Go up one level in this thread


On April 08, 2002 at 15:15:20, Robert Hyatt wrote:

>On April 08, 2002 at 13:56:02, Frank Phillips wrote:
>
>>I am looking for an alternative C command (in Linux) to
>>
>>cin.rdbuf()->in_avail()
>>
>>available in C++, which I currently use to test for input while pondering.
>>
>>Not because I am insane, but I need to remove C++ I/O so that I can compile my
>>program with the Intel compiler under Mandrake 8.2.   (There seems to a problem
>>with the substitute headers in this version of Mandrake.).
>>
>>As as aside, as I have removed progressive amount of C++ I/O, the executable has
>>got smaller and slower.
>>
>>Frank
>
>
>What does "in_avail()" do???
>
>If you are testing for input and reading it when available, look at the
>Crafty source file utility.c, and examine "CheckInput()" to see how to use
>select() in Unix...

Returns the number of characters available for fetching.  Mentioned in Tim
Mann's xboard documentation.

I tried the select() command, straight from the man pages, but obviously messed
up. Time to examine Crafty - again - thanks.

Frank



This page took 0.01 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.