Another rollup patch.
[super-star-trek.git] / src / sst.c
index ccf7470b64ea04fc4f39152e0fa75ff6e272f5a5..c51dc27835fdd853742f6419638befe8087208d2 100644 (file)
--- a/src/sst.c
+++ b/src/sst.c
@@ -282,7 +282,7 @@ commands[] = {
 #endif
 };
 
-#define NUMCOMMANDS    sizeof(commands)/sizeof(commands[0])
+#define NUMCOMMANDS    ARRAY_SIZE(commands)
 #define ACCEPT(i)      (!commands[i].option || (commands[i].option & game.options))
 
 static void listCommands(void) 
@@ -387,13 +387,6 @@ static void helpme(void)
     fclose(fp);
 }
 
-void enqueue(char *s)
-/* enqueue input for the command parser */
-{
-    chew();
-    strcpy(line, s);
-}
-
 static void makemoves(void)
 /* command-interpretation loop */
 {
@@ -413,7 +406,8 @@ static void makemoves(void)
            clrscr();
            proutn("COMMAND> ");
            if (scan() == IHEOL) {
-               makechart();
+               if (game.options & OPTION_CURSES)
+                   makechart();
                continue;
            }
            game.ididit = false;
@@ -439,13 +433,13 @@ static void makemoves(void)
        commandhook(commands[i].name, true);
        switch (v) { /* command switch */
        case SRSCAN:                 // srscan
-           srscan(SCAN_FULL);
+           srscan();
            break;
        case STATUS:                 // status
-           srscan(SCAN_STATUS);
+           status(0);
            break;
        case REQUEST:                   // status request 
-           srscan(SCAN_REQUEST);
+           request();
            break;
        case LRSCAN:                    // lrscan
            lrscan();
@@ -476,7 +470,7 @@ static void makemoves(void)
            dreprt();
            break;
        case CHART:                     // chart
-           chart(false);
+           makechart();
            break;
        case IMPULSE:                   // impulse
            impuls();