From fd5a1ba781a0c37fa6181aa8e856d77d321df7a5 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Mon, 18 Sep 2006 08:34:16 +0000 Subject: [PATCH] Input capture to 'sst-input.log' now happens automatically when idebug is on. --- src/io.c | 8 ++++---- src/sst.c | 7 +++++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/io.c b/src/io.c index 7b4855f..5d4ea9a 100644 --- 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); diff --git a/src/sst.c b/src/sst.c index 0679cbb..5d34a0d 100644 --- 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); } } -- 2.31.1