Added application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
[mmh] / uip / rcvdist.c
index 7d66910..4061735 100644 (file)
@@ -2,8 +2,6 @@
 /*
  * rcvdist.c -- asynchronously redistribute messages
  *
- * $Id$
- *
  * This code is Copyright (c) 2002, by the authors of nmh.  See the
  * COPYRIGHT file in the root directory of the nmh distribution for
  * complete copyright information.
@@ -76,10 +74,10 @@ main (int argc, char **argv)
                        "%s [switches] [switches for postproc] address ...",
                        invo_name);
                    print_help (buf, switches, 1);
-                   done (1);
+                   done (0);
                case VERSIONSW:
                    print_version(invo_name);
-                   done (1);
+                   done (0);
 
                case FORMSW: 
                    if (!(form = *argp++) || *form == '-')
@@ -116,6 +114,10 @@ main (int argc, char **argv)
     vec[0] = r1bindex (postproc, '/');
     vec[vecp++] = "-dist";
     vec[vecp++] = drft;
+    if ((cp = context_find ("mhlproc"))) {
+      vec[vecp++] = "-mhlproc";
+      vec[vecp++] = cp;
+    }
     vec[vecp] = NULL;
 
     for (i = 0; (child_id = fork()) == NOTOK && i < 5; i++)
@@ -260,7 +262,7 @@ finished: ;
     scanl = mh_xmalloc ((size_t) i + 2);
     dat[0] = dat[1] = dat[2] = dat[4] = 0;
     dat[3] = outputlinelen;
-    fmt_scan (fmt, scanl, i, dat);
+    fmt_scan (fmt, scanl, i + 1, i, dat);
     fputs (scanl, out);
 
     if (ferror (out))