From: Eric S. Raymond Date: Mon, 18 Sep 2006 08:34:16 +0000 (+0000) Subject: Input capture to 'sst-input.log' now happens automatically when idebug is on. X-Git-Tag: 2.0~241 X-Git-Url: https://jxself.org/git/?p=super-star-trek.git;a=commitdiff_plain;h=fd5a1ba781a0c37fa6181aa8e856d77d321df7a5;ds=sidebyside Input capture to 'sst-input.log' now happens automatically when idebug is on. --- 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); } }