]> diplodocus.org Git - nmh/blobdiff - sbr/signals.c
Add basic support for the STLS command in POP
[nmh] / sbr / signals.c
index 39a01b32325535af9991f66232ca68caf1d9b264..36ba9d02ebf4eae8002bf884a8c8c0b2b9a51ffb 100644 (file)
@@ -5,11 +5,9 @@
  * complete copyright information.
  */
 
-#include <h/mh.h>
-#include <h/signals.h>
-
-/* sbr/m_mktemp.c */
-extern void remove_registered_files(int);
+#include "h/mh.h"
+#include "h/signals.h"
+#include "m_mktemp.h"
 
 
 /*
@@ -41,8 +39,8 @@ SIGNAL (int sig, SIGNAL_HANDLER func)
 # endif
     }
     if (sigaction(sig, &act, &oact) < 0)
-       return (SIG_ERR);
-    return (oact.sa_handler);
+       return SIG_ERR;
+    return oact.sa_handler;
 }
 
 
@@ -58,7 +56,7 @@ SIGNAL2 (int sig, SIGNAL_HANDLER func)
     struct sigaction act, oact;
 
     if (sigaction(sig, NULL, &oact) < 0)
-       return (SIG_ERR);
+       return SIG_ERR;
     if (oact.sa_handler != SIG_IGN) {
        act.sa_handler = func;
        sigemptyset(&act.sa_mask);
@@ -74,9 +72,9 @@ SIGNAL2 (int sig, SIGNAL_HANDLER func)
 # endif
        }
        if (sigaction(sig, &act, &oact) < 0)
-           return (SIG_ERR);
+           return SIG_ERR;
     }
-    return (oact.sa_handler);
+    return oact.sa_handler;
 }
 
 
@@ -84,7 +82,8 @@ SIGNAL2 (int sig, SIGNAL_HANDLER func)
  * For use by nmh_init().
  */
 int
-setup_signal_handlers() {
+setup_signal_handlers(void)
+{
     /*
      * Catch HUP, INT, QUIT, and TERM so that we can clean up tmp
      * files when the user terminates the process early.  And also a