X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=maxqi.c;h=1ee059fcc71c6f6951a5423cf872af5f441dac8b;hb=5a188e6a93ea98890db4a360ccd2cf1279a65652;hp=9b15595c2aaa86e3b1bd18aceac5191042fb475d;hpb=01c98981a223a4534f0fc1e7fceefd522a3b74db;p=fairymax.git diff --git a/maxqi.c b/maxqi.c index 9b15595..1ee059f 100644 --- a/maxqi.c +++ b/maxqi.c @@ -52,7 +52,7 @@ /* add array for specifying board zones */ /* add zone limiter for each piece */ /* change promotion code to act when crossing river */ -/* remove stalemate code */ +/* remove stalemate code */ /* G) o[] and oo[] made int, to work on big-endian machines */ /***************************************************************************/ @@ -88,14 +88,14 @@ int GetTickCount() // with thanks to Tord gettimeofday(&t, NULL); return t.tv_sec*1000 + t.tv_usec/1000; } -#ifndef QINI_FILE -#define QINI_FILE "qmax.ini" -#endif +#ifndef INI_FILE +#define INI_FILE "qmax.ini" +#endif #else #include -#define QINI_FILE "qmax.ini" +#define INI_FILE "qmax.ini" #endif @@ -132,7 +132,7 @@ int Fifty; int UnderProm; int GameNr; char piecename[32], piecetype[32], defaultchar[]=".PPKNBRQEWFMACHG"; -char *inifile = QINI_FILE; +char *inifile = INI_FILE; int Ticks, tlim, Setup, SetupQ; @@ -330,10 +330,6 @@ int PrintResult(int s) } K=I; cnt = D(s,-I,I,Q,4*S,3); - if(cnt==0 && K==0 && L==0) { - printf("1/2-1/2 {Stalemate}\n"); - return 2; - } if(cnt==-I+1) { if (s == WHITE) printf("0-1 {Black mates}\n"); @@ -403,8 +399,8 @@ void PrintVariants() fclose(f); } - -int LoadGame(char *name) + +void LoadGame(char *name) { int i, j, count=0; char c, buf[80]; static int currentVariant; @@ -535,7 +531,7 @@ int main(int argc, char **argv) continue; } if (!fgets(line, 256, stdin)) - return; + return 1; if (line[0] == '\n') continue; sscanf(line, "%s", command); @@ -587,7 +583,7 @@ int main(int argc, char **argv) } if (!strcmp(command, "quit")) /* exit engine */ - return; + return 0; if (!strcmp(command, "force")) { /* computer plays neither */ Computer = EMPTY;