}\r
}\r
\r
-int DoCommand (char *line);\r
+int DoCommand ();\r
char mySide;\r
+char queue[10000], *qStart, *qEnd;\r
\r
void\r
GUI2Engine()\r
!strcmp(command, "force") || !strcmp(command, "result")) { EPRINT((f, "# stop\n")); fflush(toE); }\r
Sync(PAUSE); Release(); // block processing of difficult commands during thinking; send backlog left because of race\r
}\r
- if(DoCommand(line)) goto nomove;\r
+ if(qStart == qEnd) qStart = qEnd = queue;\r
+ p = line; while(qEnd < queue+10000 && (*qEnd++ = *p++) != '\n') {}\r
+ if(DoCommand()) goto nomove;\r
}\r
}\r
\r
int\r
-DoCommand (char *line)\r
+DoCommand ()\r
{\r
- char command[256], *p, *q, *r, type[99];\r
+ char line[1024], command[256], *p, *q, *r, type[99];\r
int i;\r
\r
+ p=line; while(qStart < qEnd && (*p++ = *qStart++) != '\n') {} *p = 0;\r
sscanf(line, "%s", command);\r
\r
if(!strcmp(command, "new")) {\r