drop account-hooks for now.
[apps/madmutt.git] / lib-sys / mutt_signal.c
index 159612b..115460d 100644 (file)
@@ -7,16 +7,7 @@
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <signal.h>
-#include <string.h>
-#include <sys/wait.h>
-#include <errno.h>
-
-#include <lib-lib/macros.h>
+#include <lib-lib/lib-lib.h>
 
 #include <lib-ui/curses.h>
 
@@ -29,32 +20,20 @@ static struct sigaction SysOldQuit;
 static int IsEndwin = 0;
 
 /* Attempt to catch "ordinary" signals and shut down gracefully. */
-RETSIGTYPE exit_handler (int sig)
+static void exit_handler (int sig)
 {
   curs_set (1);
   endwin ();                    /* just to be safe */
-#ifdef SYS_SIGLIST_DECLARED
-  printf (_("%s...  Exiting.\n"), sys_siglist[sig]);
-#else
-#if defined(__sun__) && defined(__svr4__)
-  printf (_("Caught %s...  Exiting.\n"), _sys_siglist[sig]);
-#else
-#if defined(__alpha) && defined(__osf__)
-  printf (_("Caught %s...  Exiting.\n"), __sys_siglist[sig]);
-#else
-  printf (_("Caught signal %d...  Exiting.\n"), sig);
-#endif
-#endif
-#endif
+  printf(_("Caught %s...  Exiting.\n"), strsignal(sig));
   exit (0);
 }
 
-RETSIGTYPE chld_handler(int sig __attribute__((unused)))
+static void chld_handler(int sig __attribute__((unused)))
 {
   /* empty */
 }
 
-RETSIGTYPE sighandler (int sig)
+static void sighandler (int sig)
 {
   int save_errno = errno;