index 1fc24fc..d44de74 100644 (file)
--- a/UCI2WB.c
+++ b/UCI2WB.c
@@ -441,12 +441,9 @@ char mySide;
char queue, *qStart, *qEnd;\r
\r
void\r
-GUI2Engine()\r
+LaunchSearch()\r
{\r
-    char line, command, *p;\r
-\r
-    while(1) {\r
-       int i, difficult;\r
+    int i;\r
\r
if((computer == stm || computer == ANALYZE && !searching) && !suspended) {\r
DPRINT("# start search\n");\r
@@ -462,6 +459,17 @@ GUI2Engine()
EPRINT((f, "\n")) searching = 2; // suppresses spurious commands during analysis starting new searches\r
} else pause = 2, searching = 3, StartSearch(""); // request suspending of input processing while thinking\r
} else if(ponderAlways && computer == NONE) move[moveNr] = 0, StartPonder(moveNr-1);\r
+}\r
+\r
+void\r
+GUI2Engine()\r
+{\r
+    char line, command, *p;\r
+\r
+    while(1) {\r
+       int i, difficult;\r
+\r
+       LaunchSearch(); // start a search if we need one\r
nomove:\r
for(difficult=0; !difficult; ) { // read and handle commands that can (or must) be handled during thinking\r
fflush(toE); fflush(stdout);\r
@@ -522,13 +530,13 @@ GUI2Engine()
StopPonder(1); searching = 0;\r
}\r
strcpy(move[moveNr++], command); // possibly overwrites ponder move\r
-           continue;\r
-       }\r
+       } else\r
if(!strcmp(command, "resume")) {\r
searching = 0;\r
if(suspended == 2) StartPonder(moveNr); // restart interrupted ponder search\r
-           suspended = 0; continue;  // causes thinking to start in normal way if on move or analyzing\r
-       }\r
+           suspended = 0;  // causes thinking to start in normal way if on move or analyzing\r
+       } else\r
+      {\r
if(searching == 3) { // command arrived during thinking; order abort for 'instant commands'\r
if(!strcmp(command, "?") || !strcmp(command, "quit") ||\r
!strcmp(command, "force") || !strcmp(command, "result")) { EPRINT((f, "# stop\n")); fflush(toE); }\r
@@ -537,6 +545,7 @@ GUI2Engine()
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
\r
{"ft_lang_label":"__label__en","ft_lang_prob":0.5016783,"math_prob":0.8806779,"size":1797,"snap":"2020-10-2020-16","text_gpt3_token_len":598,"char_repetition_ratio":0.12604573,"word_repetition_ratio":0.06818182,"special_character_ratio":0.37173066,"punctuation_ratio":0.17857143,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.98433423,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-04-07T15:59:42Z\",\"WARC-Record-ID\":\"<urn:uuid:ac9a60c7-f6f6-4d1f-8ee7-de27f8763185>\",\"Content-Length\":\"16563\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:ebc209fc-73bb-420e-8f83-8c079e440725>\",\"WARC-Concurrent-To\":\"<urn:uuid:5d0f752f-b4a3-41f6-b3b0-44cac6dffb5a>\",\"WARC-IP-Address\":\"69.163.153.187\",\"WARC-Target-URI\":\"http://hgm.nubati.net/cgi-bin/gitweb.cgi?p=uci2wb.git;a=blobdiff;f=UCI2WB.c;h=d44de7441491dc485679f43204e7eecbe38cc6a8;hp=1fc24fc2a3e8beeedc4249d49896420f7128bc19;hb=4aeefd3c3c03994a5b477935cf4d8e6c73062a14;hpb=47b967aa38dcb5db60229931abf391f42c2abf1f\",\"WARC-Payload-Digest\":\"sha1:PUETVO3E5NS3QBRP7TZYXDPUYPNYFTTS\",\"WARC-Block-Digest\":\"sha1:IZXB5MBCOW6F22ZK5EEB4QT76ZS5BMQZ\",\"WARC-Identified-Payload-Type\":\"application/xhtml+xml\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-16/CC-MAIN-2020-16_segments_1585371803248.90_warc_CC-MAIN-20200407152449-20200407182949-00022.warc.gz\"}"}