X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=gnushogi%2Fcommondsp.c;h=53efa2b3f51f44976e7fc25bbdb3135db836c1a6;hb=de68af0b286eb210b5a3fb4bf4deb44b1b7a727e;hp=79873070bb9f9283f3b2d645eb0297eb9fd846ae;hpb=3f589711eb3ecc7644378d6a0f2f29bc4b4c7db9;p=gnushogi.git diff --git a/gnushogi/commondsp.c b/gnushogi/commondsp.c index 7987307..53efa2b 100644 --- a/gnushogi/commondsp.c +++ b/gnushogi/commondsp.c @@ -42,7 +42,6 @@ #include #include -#include #include "gnushogi.h" char mvstr[4][6]; @@ -1641,23 +1640,12 @@ InputCommand(char *command) have_shown_prompt = false; #endif /* QUIETBACKGROUND */ - if (command == NULL) - { + if (command == NULL) { if (NOT_CURSES) - { - s[0] = sx[0] = '\0'; + s[0] = '\0'; - while(!eof && !sx[0]) - eof = (fgets(sx, 80, stdin) == NULL); - } - else - { - fflush(stdout); - eof = (getstr(sx) == ERR); - } - } - else - { + eof = GetString(sx); + } else { strcpy(sx, command); done = true; }