Oops -- this wasn't in the repo.
[super-star-trek.git] / sst.c
diff --git a/sst.c b/sst.c
index 5cba52ea154cc675bc71f5a390360149e9bd4756..59b0b3221f0cd6c442ee90a2a2c9689eb42ea991 100644 (file)
--- a/sst.c
+++ b/sst.c
@@ -300,15 +300,17 @@ static void makemoves(void) {
                         clrscr();
 #endif /* SERGEEV */
                        proutn("COMMAND> ");
-#ifdef SERGEEV
                         if (scan() == IHEOL) {
+#ifdef SERGEEV
                             _setcursortype(_NOCURSOR);
                             setwnd(4);
                             clrscr();
                             chart(0);
                             _setcursortype(_NORMALCURSOR);
+#endif /* SERGEEV */
                             continue;
                         }
+#ifdef SERGEEV
                         ididit=0;
                         clrscr();
                         setwnd(4);
@@ -500,14 +502,21 @@ int main(int argc, char **argv) {
            }
        }
 
+#ifndef SERGEEV
        iostart(usecurses);
-       prelim(); 
+#else
+       randomize();
+        textattr(7);
+        clrscr();
+        setwnd(0);
+#endif /* SERGEEV */
        line[0] = '\0';
        for (i = optind; i < argc;  i++) {
                strcat(line, argv[i]);
                strcat(line, " ");
        }
        while (TRUE) { /* Play a game */
+               prelim(); 
                setup(line[0] == '\0');
                if (alldone) {
                        score();
@@ -637,6 +646,13 @@ int scan(void) {
                        return IHEOL;
                }
                getline(line, sizeof(line));
+#ifdef SERGEEV
+                fflush(stdin);
+                if (curwnd==5){
+                   clrscr();
+                   setwnd(4);
+                   clrscr();
+#endif /* SERGEEV */
                linep = line;
        }
        // Skip leading white space