Convert more stuff from #ifdef to dspwrappers: SetupBoard.
[gnushogi.git] / gnushogi / commondsp.c
index 7987307..39d8500 100644 (file)
@@ -42,7 +42,6 @@
 #include <sys/types.h>
 #include <sys/file.h>
 
-#include <curses.h>
 #include "gnushogi.h"
 
 char mvstr[4][6];
@@ -1569,16 +1568,7 @@ InputCommand(char *command)
             Sdepth = 0;
 
 #ifdef QUIETBACKGROUND
-            if (NOT_CURSES)
-            {
-                PromptForMove();
-            }
-            else
-            {
-                ShowSidetoMove();
-                ShowPrompt();
-            }
-
+            ShowPrompt();
             have_shown_prompt = true;
 #endif /* QUIETBACKGROUND */
 
@@ -1625,15 +1615,7 @@ InputCommand(char *command)
         {
 #endif /* QUIETBACKGROUND */
 
-            if (NOT_CURSES)
-            {
-                PromptForMove();
-            }
-            else
-            {
-                ShowSidetoMove();
-                ShowPrompt();
-            }
+            ShowPrompt();
 
 #ifdef QUIETBACKGROUND
         }
@@ -1641,23 +1623,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;
         }
@@ -1708,7 +1679,7 @@ InputCommand(char *command)
         {
             EditBoard();
         }
-        else if (NOT_CURSES && (strcmp(s, CP[190]) == 0))  /* setup */
+        else if ((strcmp(s, CP[190]) == 0))  /* setup */
         {
             SetupBoard();
         }