From b4f84e24ff5a33b22fcdeeec2f7180248e535e52 Mon Sep 17 00:00:00 2001 From: Franklin Wei Date: Mon, 23 Jun 2014 15:08:58 -0400 Subject: Cleaned up code, fixed some bugs --- joshua.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'joshua.c') diff --git a/joshua.c b/joshua.c index f225ec9..5b5f27a 100644 --- a/joshua.c +++ b/joshua.c @@ -3,7 +3,13 @@ #include #include #include +#include #define RANDOM_TIME 1 +void cleanup(int signum) +{ + endwin(); + exit(0); +} void random_stuff(void) /* print random junk on the screen for about 3 seconds */ { clear(); @@ -19,6 +25,7 @@ void be_joshua() { initscr(); clear(); + signal(SIGINT, &cleanup); /* start_color(); init_pair(1, COLOR_BLUE, COLOR_BLACK); -- cgit v1.1