From: H.G.Muller Date: Sat, 8 Dec 2018 21:13:29 +0000 (+0100) Subject: Print compliant error message on invalid command X-Git-Tag: v4.0~5 X-Git-Url: http://winboard.nl/cgi-bin?p=uci2wb.git;a=commitdiff_plain;h=ef6cf0bc31b6830ce800325ec6e281e86df091cb Print compliant error message on invalid command UCI2WB now prints the compliant eror message when it gets an unrecognized command. To prevent spurious error messages it now recognizes some more ignored commands too. --- diff --git a/UCI2WB.c b/UCI2WB.c index 1cb0a16..bac4bcb 100644 --- a/UCI2WB.c +++ b/UCI2WB.c @@ -468,8 +468,12 @@ GUI2Engine() StopSearch(1); } else if(!strcmp(command, "xboard")) ; + else if(!strcmp(command, "random")) ; else if(!strcmp(command, "accepted")) ; else if(!strcmp(command, "rejected")) ; + else if(!strcmp(command, "book")) ; + else if(!strcmp(command, "ics")) ; + else if(!strcmp(command, "hint")) ; else if(!strcmp(command, "computer")) comp = 1; else { //convert easy & hard to "option" after treating their effect on the adapter if(!strcmp(command, "easy")) { @@ -620,6 +624,7 @@ DoCommand () computer = NONE; } else if(!strcmp(command, "quit")) { EPRINT((f, "# quit\n")) fflush(toE), exit(atoi(line+4)); } + else printf("Error (unknown command): %s\n", command); fflush(stdout); }