Input capture to 'sst-input.log' now happens automatically when idebug is on.
authorEric S. Raymond <esr@thyrsus.com>
Mon, 18 Sep 2006 08:34:16 +0000 (08:34 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Mon, 18 Sep 2006 08:34:16 +0000 (08:34 +0000)
src/io.c
src/sst.c

index 7b4855f6c88048b78890a477733ae6757018bf96..5d4ea9a13154752c0ed904fc55f3116ee41fb936 100644 (file)
--- a/src/io.c
+++ b/src/io.c
@@ -38,13 +38,13 @@ void iostart(void)
     textdomain(PACKAGE);
     gettext("");
 
+    if (atexit(outro)){
+       fprintf(stderr,"Unable to register outro(), exiting...\n");
+       exit(1);
+    }
     if (!(game.options & OPTION_CURSES)) {
        rows = atoi(getenv("LINES"));
     } else {
-       if (atexit(outro)){
-           fprintf(stderr,"Unable to register outro(), exiting...\n");
-           exit(1);
-       }
        (void)initscr();
 #ifdef KEY_MIN
        keypad(stdscr, TRUE);
index 0679cbb9c271a9b8bfe759fa5756eda213accec3..5d34a0dd43c58caee73dfeb6c61c8584c5c92162 100644 (file)
--- a/src/sst.c
+++ b/src/sst.c
@@ -584,14 +584,17 @@ int main(int argc, char **argv)
     else
        game.options |= OPTION_TTY;
 
-    while ((option = getopt(argc, argv, "t")) != -1) {
+    while ((option = getopt(argc, argv, "tx")) != -1) {
        switch (option) {
        case 't':
            game.options |= OPTION_TTY;
            game.options &=~ OPTION_CURSES;
            break;
+       case 'x':
+           idebug = true;
+           break;
        default:
-           fprintf(stderr, "usage: sst [-t] [startcommand...].\n");
+           fprintf(stderr, "usage: sst [-t] [-x] [startcommand...].\n");
            exit(0);
        }
     }