X-Git-Url: http://winboard.nl/cgi-bin?p=fairymax.git;a=blobdiff_plain;f=maxqi.c;h=f050292884ff187a91393f0d331df84b0a1ac1cf;hp=cb7bc7efcbd8c6998f70dc6a4d2a45de78297d12;hb=HEAD;hpb=5e8888872e9eee65ea426440f9f73d4434db4dba diff --git a/maxqi.c b/maxqi.c index cb7bc7e..f050292 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,9 +88,9 @@ int GetTickCount() // with thanks to Tord gettimeofday(&t, NULL); return t.tv_sec*1000 + t.tv_usec/1000; } -#ifndef INI_FILE -#define INI_FILE "qmax.ini" -#endif +#ifndef INI_FILE +#define INI_FILE "qmax.ini" +#endif #else @@ -382,7 +382,7 @@ void CopyBoard(int s) void PrintVariants() { - int i, j, count=0; char c, buf[80]; + int i, j, count=0; char c = EOF+1, buf[80]; FILE *f; f = fopen(inifile, "r"); @@ -399,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; @@ -531,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); @@ -583,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;