summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2013-06-24 07:41:12 +0200
committerBardur Arantsson <bardur@scientician.net>2013-06-29 05:37:49 +0200
commit45c2cb4e51f3683cf527598bff0554e0b1723402 (patch)
tree3296924f9ac1b08b63f0a635b75d11eed83ef207
parentd39105ff82a42cbedbb1b68683aefce050228551 (diff)
Remove HANDLE_SIGNALS and SPECIAL_BSD
-rw-r--r--src/config.h33
-rw-r--r--src/externs.h3
-rw-r--r--src/files.c126
-rw-r--r--src/main.c3
4 files changed, 0 insertions, 165 deletions
diff --git a/src/config.h b/src/config.h
index 8ee46cf7..cb258925 100644
--- a/src/config.h
+++ b/src/config.h
@@ -44,13 +44,6 @@
/*
- * OPTION: define "SPECIAL_BSD" for using certain versions of UNIX
- * that use the 4.4BSD Lite version of Curses in "main-gcu.c"
- */
-/* #define SPECIAL_BSD */
-
-
-/*
* OPTION: Use the POSIX "termios" methods in "main-gcu.c"
*/
/* #define USE_TPOSIX */
@@ -112,11 +105,6 @@
#endif
-/*
- * OPTION: Handle signals
- */
-#define HANDLE_SIGNALS
-
@@ -139,27 +127,6 @@
#define USE_GRAPHICS
-/*
- * OPTION: Hack -- Macintosh stuff
- */
-#ifdef MACINTOSH
-
-/* Do not handle signals */
-# undef HANDLE_SIGNALS
-
-#endif
-
-
-/*
- * OPTION: Hack -- Windows stuff
- */
-#ifdef WINDOWS
-
-/* Do not handle signals */
-# undef HANDLE_SIGNALS
-
-#endif
-
/*
* OPTION: Set the "default" path to the angband "lib" directory.
diff --git a/src/externs.h b/src/externs.h
index 290a3152..deb93010 100644
--- a/src/externs.h
+++ b/src/externs.h
@@ -890,9 +890,6 @@ extern void display_scores(int from, int to);
extern errr predict_score(void);
extern void predict_score_gui(bool_ *initialized, bool_ *game_in_progress);
extern void close_game(void);
-extern void signals_ignore_tstp(void);
-extern void signals_handle_tstp(void);
-extern void signals_init(void);
extern errr get_rnd_line(char * file_name, char * output);
extern char *get_line(char* fname, cptr fdir, char *linbuf, int line);
extern void do_cmd_knowledge_corruptions(void);
diff --git a/src/files.c b/src/files.c
index 8e19922f..7b1d10ce 100644
--- a/src/files.c
+++ b/src/files.c
@@ -4236,9 +4236,6 @@ void do_cmd_save_game(void)
/* The player is not dead */
(void)strcpy(died_from, "(saved)");
- /* Forbid suspend */
- signals_ignore_tstp();
-
/* Save the player */
if (save_player())
{
@@ -4253,9 +4250,6 @@ void do_cmd_save_game(void)
remove_cave_view(FALSE);
- /* Allow suspend again */
- signals_handle_tstp();
-
/* Refresh */
Term_fresh();
@@ -5114,8 +5108,6 @@ void race_legends(void)
/*
* Enters a players name on a hi-score table, if "legal", and in any
* case, displays some relevant portion of the high score list.
- *
- * Assumes "signals_ignore_tstp()" has been called.
*/
static errr top_twenty(void)
{
@@ -5531,9 +5523,6 @@ void close_game(void)
flush();
- /* No suspending now */
- signals_ignore_tstp();
-
/* Hack -- Character is now "icky" */
character_icky = TRUE;
@@ -5608,10 +5597,6 @@ void close_game(void)
/* Predict score (or ESCAPE) */
if (inkey() != ESCAPE) predict_score();
}
-
-
- /* Allow suspending now */
- signals_handle_tstp();
}
@@ -5865,114 +5850,3 @@ errr get_xtra_line(char *file_name, monster_type *m_ptr, char *output)
/* Success */
return (0);
}
-
-
-#ifdef HANDLE_SIGNALS
-
-
-#include <signal.h>
-
-
-/*
- * Handle signals -- suspend
- *
- * Actually suspend the game, and then resume cleanly
- */
-static void handle_signal_suspend(int sig)
-{
- /* Disable handler */
- (void)signal(sig, SIG_IGN);
-
-#ifdef SIGSTOP
-
- /* Flush output */
- Term_fresh();
-
- /* Suspend the "Term" */
- Term_xtra(TERM_XTRA_ALIVE, 0);
-
- /* Suspend ourself */
- (void)kill(0, SIGSTOP);
-
- /* Resume the "Term" */
- Term_xtra(TERM_XTRA_ALIVE, 1);
-
- /* Redraw the term */
- Term_redraw();
-
- /* Flush the term */
- Term_fresh();
-
-#endif
-
- /* Restore handler */
- (void)signal(sig, handle_signal_suspend);
-}
-
-
-/*
- * Ignore SIGTSTP signals (keyboard suspend)
- */
-void signals_ignore_tstp(void)
-{
-
-#ifdef SIGTSTP
- (void)signal(SIGTSTP, SIG_IGN);
-#endif
-
-}
-
-/*
- * Handle SIGTSTP signals (keyboard suspend)
- */
-void signals_handle_tstp(void)
-{
-
-#ifdef SIGTSTP
- (void)signal(SIGTSTP, handle_signal_suspend);
-#endif
-
-}
-
-
-/*
- * Prepare to handle the relevant signals
- */
-void signals_init(void)
-{
-
-#ifdef SIGHUP
- (void)signal(SIGHUP, SIG_IGN);
-#endif
-
-
-#ifdef SIGTSTP
- (void)signal(SIGTSTP, handle_signal_suspend);
-#endif
-
-}
-
-
-#else /* HANDLE_SIGNALS */
-
-
-/*
-* Do nothing
-*/
-void signals_ignore_tstp(void)
-{}
-
-/*
-* Do nothing
-*/
-void signals_handle_tstp(void)
-{}
-
-/*
-* Do nothing
-*/
-void signals_init(void)
-{}
-
-
-#endif /* HANDLE_SIGNALS */
diff --git a/src/main.c b/src/main.c
index 2950506f..10500ab6 100644
--- a/src/main.c
+++ b/src/main.c
@@ -589,9 +589,6 @@ usage:
if (!done) quit("Unable to prepare any 'display module'!");
- /* Catch nasty signals */
- signals_init();
-
/* Initialize */
init_angband();