Move #include from h/mh.h to source files
[mmh] / uip / pick.c
index 6c59add..07dca9a 100644 (file)
@@ -9,6 +9,8 @@
 #include <h/mh.h>
 #include <h/tws.h>
 #include <h/utils.h>
+#include <unistd.h>
+#include <locale.h>
 
 #ifdef HAVE_SYS_TIME_H
 # include <sys/time.h>
@@ -76,7 +78,7 @@ static int pmatches(FILE *, int, long, long);
 
 static int listsw = -1;
 
-static void putzero_done();
+void putzero_done();
 
 int
 main(int argc, char **argv)
@@ -91,7 +93,9 @@ main(int argc, char **argv)
        struct msgs *mp;
        register FILE *fp;
 
-       atexit(putzero_done);
+        if (atexit(putzero_done) != 0) {
+               adios(NULL, "atexit failed");
+       }
 
        setlocale(LC_ALL, "");
        invo_name = mhbasename(argv[0]);
@@ -307,7 +311,7 @@ main(int argc, char **argv)
 }
 
 
-static void
+void
 putzero_done()
 {
        if (listsw && !isatty(fileno(stdout)))