changeset 8:78df7025783b

Make sure all output appears when exiting
author edwarj4
date Fri, 23 Oct 2009 01:38:53 +0000
parents d388234c4ce9
children 38acf3eb27e6
files rogue3/command.c rogue3/main.c rogue3/rip.c
diffstat 3 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/rogue3/command.c	Fri Oct 16 14:40:16 2009 +0000
+++ b/rogue3/command.c	Fri Oct 23 01:38:53 2009 +0000
@@ -189,6 +189,7 @@
 			wclrtoeol(cw);
 			draw(cw);
 			endwin();
+			printf("See you soon, %s!\n", whoami);
 			exit(0);
 		    }
 		when '.' : ;			/* Rest command */
--- a/rogue3/main.c	Fri Oct 16 14:40:16 2009 +0000
+++ b/rogue3/main.c	Fri Oct 23 01:38:53 2009 +0000
@@ -145,9 +145,9 @@
         dnum = lowtime + md_getpid();
 
     if (wizard || env)
-	printf("Hello %s, welcome to dungeon #%d", whoami, dnum);
+	printf("Hello %s, welcome to dungeon #%d\n", whoami, dnum);
     else
-	printf("Hello %s, just a moment while I dig the dungeon...", whoami);
+	printf("Hello %s, just a moment while I dig the dungeon...\n", whoami);
 
     fflush(stdout);
     seed = dnum;
--- a/rogue3/rip.c	Fri Oct 16 14:40:16 2009 +0000
+++ b/rogue3/rip.c	Fri Oct 23 01:38:53 2009 +0000
@@ -78,6 +78,11 @@
     move(LINES-1, 0);
     draw(stdscr);
     score(purse, 0, monst);
+    /* Make sure all the output gets through ssh and
+       anything else that might be in the way. */
+    printf("[Press return to exit]\n");
+    fflush(NULL);
+    getchar();
     exit(0);
 }