The reading, decoding and handling of the engine output is now put in
a routine HandleEngineOutput(), which is still an infinite loop that
wakes up a blocked GUI thread after a 'uciok', 'readyok' or 'bestmove'
command. This in preparation of a new design, where it would break out
of the loop and return after these commands, to let its caller process
any queued GUI commands.
return (x != EOF);\r
}\r
\r
-void *\r
-Engine2GUI()\r
+void\r
+HandleEngineOutput()\r
{\r
char line[1024], command[256]; static char egts[999];\r
\r
- if(fromF = fopen("DefectiveEngineOptions.ini", "r")) printf("# fake engine input\n");\r
while(1) {\r
int i=0, x; char *p, dummy, len;\r
\r
}\r
}\r
\r
+void *\r
+Engine2GUI()\r
+{\r
+ if(fromF = fopen("DefectiveEngineOptions.ini", "r")) printf("# fake engine input\n");\r
+ HandleEngineOutput();\r
+}\r
+\r
void\r
Move4Engine(char *m)\r
{\r