X-Git-Url: http://winboard.nl/cgi-bin?p=polyglot.git;a=blobdiff_plain;f=gui.cpp;h=71d0cc07dd45c1140c70b80ee22f6f310c20b87f;hp=dac260f7c25a61c4813bd5ec6a9b7abb71a3ed4c;hb=92a5061fe11dab6ef0bb339cbe7798e6ccb35626;hpb=07265afaa167049a447b4c5f43e5ef90c7451a49 diff --git a/gui.cpp b/gui.cpp index dac260f..71d0cc0 100644 --- a/gui.cpp +++ b/gui.cpp @@ -68,7 +68,11 @@ bool gui_get_non_blocking(gui_t * gui, char string[], int size) { return false; } #else - if ((gui->io).GetBuffer(string)) { + if((gui->io).EOF_()){ + my_log("POLYGLOT *** EOF from GUI ***\n"); + quit(); + return true; // we never get here + }else if ((gui->io).GetBuffer(string)) { my_log("GUI->Adapter: %s\n", string); return true; } else { @@ -83,6 +87,10 @@ bool gui_get_non_blocking(gui_t * gui, char string[], int size) { void gui_get(gui_t * gui, char string[], int size) { bool data_available; #ifdef _WIN32 + if((gui->io).EOF_()){ + my_log("POLYGLOT *** EOF from GUI ***\n"); + quit(); + } (gui->io).LineInput(string); my_log("GUI->Adapter: %s\n", string); #else