Author: Nicolas Carrasco
Date: 08:45:36 09/05/99
Dear Guys,
Now I am able to comunicate my chess engine to Winboard but I only want to ask
you some questions to know if I can have any problems because at the file
included at Winboard.
What this function do ?
setbuf(stdout, NULL);
At winbord´s protocol file says that "scanf" can have problems so I created my
own function:
////////////////////////////////////////////////////////////////////
#include <stdio.h>
void cgets ( char *buffer )
{
char i, ch;
/* Read in single line from "stdin": */
for( i = 0; (i < 80) && ((ch = getchar()) != EOF) && (ch != '\n'); i++ )
buffer[i] = (char)ch;
/* Terminate string with null character: */
buffer[i] = '\0';
}
/////////////////////////////////////////////////////////////////
I think with this works fine!
But, can I use printf to comunicate Winboard succesfuly ?
How crafty thinks and gets text at the same time?
Thanks
This page took 0 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.