Disable many "stupid" CLI options or some that will have better equivalents soon...
[apps/madmutt.git] / lib-sys / mutt_signal.c
index 8609671..bdb8577 100644 (file)
@@ -9,7 +9,7 @@
 
 #include <lib-lib/lib-lib.h>
 
 
 #include <lib-lib/lib-lib.h>
 
-#include <lib-ui/curses.h>
+#include <lib-ui/lib-ui.h>
 
 #include "mutt_signal.h"
 
 
 #include "mutt_signal.h"
 
@@ -22,10 +22,10 @@ static int IsEndwin = 0;
 /* Attempt to catch "ordinary" signals and shut down gracefully. */
 static void exit_handler (int sig)
 {
 /* Attempt to catch "ordinary" signals and shut down gracefully. */
 static void exit_handler (int sig)
 {
-  curs_set (1);
-  endwin ();                    /* just to be safe */
-  printf(_("Caught %s...  Exiting.\n"), strsignal(sig));
-  exit (0);
+    curs_set(1);
+    endwin();                    /* just to be safe */
+    printf(_("Caught %s...  Exiting.\n"), strsignal(sig));
+    exit(0);
 }
 
 static void chld_handler(int sig __attribute__((unused)))
 }
 
 static void chld_handler(int sig __attribute__((unused)))
@@ -49,25 +49,17 @@ static void sighandler (int sig)
 
   case SIGCONT:
     if (!IsEndwin)
 
   case SIGCONT:
     if (!IsEndwin)
-      refresh ();
+      refresh();
     mutt_curs_set (-1);
     mutt_curs_set (-1);
-#if defined (HAVE_RESIZETERM)
     /* We don't receive SIGWINCH when suspended; however, no harm is done by
      * just assuming we received one, and triggering the 'resize' anyway. */
     /* We don't receive SIGWINCH when suspended; however, no harm is done by
      * just assuming we received one, and triggering the 'resize' anyway. */
-    SigWinch = 1;
-#endif
-    break;
-
-#if defined (HAVE_RESIZETERM)
   case SIGWINCH:
     SigWinch = 1;
     break;
   case SIGWINCH:
     SigWinch = 1;
     break;
-#endif
 
   case SIGINT:
     SigInt = 1;
     break;
 
   case SIGINT:
     SigInt = 1;
     break;
-
   }
   errno = save_errno;
 }
   }
   errno = save_errno;
 }
@@ -105,9 +97,7 @@ void mutt_signal_initialize (void)
   sigaction (SIGCONT, &act, NULL);
   sigaction (SIGTSTP, &act, NULL);
   sigaction (SIGINT, &act, NULL);
   sigaction (SIGCONT, &act, NULL);
   sigaction (SIGTSTP, &act, NULL);
   sigaction (SIGINT, &act, NULL);
-#if defined (HAVE_RESIZETERM)
   sigaction (SIGWINCH, &act, NULL);
   sigaction (SIGWINCH, &act, NULL);
-#endif
 
   /* POSIX doesn't allow us to ignore SIGCHLD,
    * so we just install a dummy handler for it
 
   /* POSIX doesn't allow us to ignore SIGCHLD,
    * so we just install a dummy handler for it
@@ -129,9 +119,7 @@ void mutt_block_signals (void)
     sigaddset (&Sigset, SIGHUP);
     sigaddset (&Sigset, SIGTSTP);
     sigaddset (&Sigset, SIGINT);
     sigaddset (&Sigset, SIGHUP);
     sigaddset (&Sigset, SIGTSTP);
     sigaddset (&Sigset, SIGINT);
-#if defined (HAVE_RESIZETERM)
     sigaddset (&Sigset, SIGWINCH);
     sigaddset (&Sigset, SIGWINCH);
-#endif
     sigprocmask (SIG_BLOCK, &Sigset, 0);
     set_option (OPTSIGNALSBLOCKED);
   }
     sigprocmask (SIG_BLOCK, &Sigset, 0);
     set_option (OPTSIGNALSBLOCKED);
   }