From ef6cf0bc31b6830ce800325ec6e281e86df091cb Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Sat, 8 Dec 2018 22:13:29 +0100 Subject: [PATCH] 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. --- UCI2WB.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) 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); } -- 1.7.0.4