Author: Robert Hyatt
Date: 20:40:49 12/19/03
Go up one level in this thread
On December 19, 2003 at 17:47:50, Dann Corbit wrote:
>On December 19, 2003 at 17:23:25, Robert Hyatt wrote:
>>Download 19.8 again. I just fixed the problem.
>
>Me too. I wonder if our fixes were identical...
>
>Here is what I did to fix it... I removed the EPD stuff in option.c from its new
>location and put it here:
The problem was that "if (initialized)." Once the engine is initialized, it
is always true, and it never lets Option return (unknown_command) which triggers
reading a move. :)
I assume you put it at the top and removed the else if and just made it an
if. And you do _not_ want an else on the next if either. :)
>
>#include <stdio.h>
>#include <stdlib.h>
>#include <string.h>
>#include <ctype.h>
>#include <signal.h>
>#include "chess.h"
>#include "data.h"
>#if defined(UNIX) || defined(AMIGA)
># include <unistd.h>
># include <signal.h>
>#endif
>#include "epdglue.h"
>
>/* last modified 02/10/03 */
>/*
>********************************************************************************
>* *
>* Option() is used to handle user input necessary to control/customize the *
>* program. it performs all functions excepting chess move input which is *
>* handled by main(). *
>* *
>********************************************************************************
>*/
>int Option(TREE * tree)
>{
>
>/*
> ----------------------------------------------------------
>| |
>| parse the input. if it looks like a FEN string, don't |
>| parse using "/" as a separator, otherwise do. |
>| |
> ----------------------------------------------------------
>*/
> if (StrCnt(buffer, '/') >= 7)
> nargs = ReadParse(buffer, args, " ;=");
> else
> nargs = ReadParse(buffer, args, " ;=/");
> if (!nargs)
> return (1);
> if (args[0][0] == '#')
> return (1);
>#ifdef EPD
>/*
> ----------------------------------------------------------
>| |
>| EPD implementation interface code. EPD commands can |
>| not be handled if the program is actually searching in |
>| a real game, and if Crafty is "pondering" this has to |
>| be stopped. |
>| |
> ----------------------------------------------------------
>*/
> if (initialized) {
> if (EGCommandCheck(buffer)) {
> if (thinking || pondering)
> return (2);
> else {
> (void) EGCommand(buffer);
> return (1);
> }
> }
> }
>#endif
Looks good to me. just what I did...
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.