diff options
| author | Franklin Wei <frankhwei536@gmail.com> | 2014-06-23 15:08:58 -0400 |
|---|---|---|
| committer | Franklin Wei <frankhwei536@gmail.com> | 2014-06-23 15:08:58 -0400 |
| commit | b4f84e24ff5a33b22fcdeeec2f7180248e535e52 (patch) | |
| tree | f63caa643dae391b8c6f9359709e0329eda41f52 /joshua.c | |
| parent | fb1871333736e17196ee0bb72a7dc86aabfd55f4 (diff) | |
| download | wargames-server-b4f84e24ff5a33b22fcdeeec2f7180248e535e52.zip wargames-server-b4f84e24ff5a33b22fcdeeec2f7180248e535e52.tar.gz wargames-server-b4f84e24ff5a33b22fcdeeec2f7180248e535e52.tar.bz2 wargames-server-b4f84e24ff5a33b22fcdeeec2f7180248e535e52.tar.xz | |
Cleaned up code, fixed some bugs
Diffstat (limited to 'joshua.c')
| -rw-r--r-- | joshua.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -3,7 +3,13 @@ #include <curses.h> #include <stdlib.h> #include <util.h> +#include <signal.h> #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); |