]> diplodocus.org Git - nmh/blobdiff - uip/mhlsbr.c
Added tests of MMDF mailbox format to test-eom-align.
[nmh] / uip / mhlsbr.c
index 5a977ba65ca58bf2253effd361336918d41d9a06..5c050e3e33a1a70fcd91b63514de1ee4300d4eb3 100644 (file)
@@ -10,6 +10,7 @@
 #include <h/addrsbr.h>
 #include <h/fmt_scan.h>
 #include <h/tws.h>
+#include "h/done.h"
 #include <h/utils.h>
 #include "sbr/m_popen.h"
 #include <setjmp.h>
@@ -303,8 +304,6 @@ static char delim3[] =              /* from forw.c */
     "\n----------------------------------------------------------------------\n\n";
 static char delim4[] = "\n------------------------------\n\n";
 
-static FILE *(*mhl_action)(char *);
-
 /*
  * prototypes
  */
@@ -475,12 +474,8 @@ mhl (int argc, char **argv)
 
     if (isatty (fileno (stdout))) {
        if (!nomore && moreproc && *moreproc != '\0') {
-           if (mhl_action) {
-               SIGNAL (SIGINT, SIG_IGN);
-               SIGNAL2 (SIGQUIT, quitser);
-           }
            SIGNAL2 (SIGPIPE, pipeser);
-           m_popen (moreproc, mhl_action != NULL);
+           m_popen(moreproc, false);
            ontty = PITTY;
        } else {
            SIGNAL (SIGINT, SIG_IGN);
@@ -879,7 +874,7 @@ process (char *folder, char *fname, int ofilen, int ofilec)
     switch (setjmp (env)) {
        case OK: 
            if (fname) {
-               fp = mhl_action ? (*mhl_action) (fname) : fopen (fname, "r");
+               fp = fopen(fname, "r");
                if (fp == NULL) {
                    advise (fname, "unable to open");
                    exitstat++;
@@ -911,7 +906,7 @@ process (char *folder, char *fname, int ofilen, int ofilec)
        default:
            if (ontty != PITTY)
                SIGNAL (SIGINT, SIG_IGN);
-           if (mhl_action == NULL && fp != stdin && fp != NULL)
+           if (fp != stdin && fp != NULL)
                fclose (fp);
             free(holder.c_text);
             holder.c_text = NULL;