]> diplodocus.org Git - nmh/blobdiff - uip/mhlsbr.c
Added -[no]rmmproc switches to rmm and mhfixmsg.
[nmh] / uip / mhlsbr.c
index c31b93ed971d8ce2a86bc8ba317e4d37c5daa85c..5dbf341cc09c99ccf366db7cbd2eef4e723d2ca4 100644 (file)
@@ -1164,7 +1164,8 @@ mcomp_format (struct mcomp *c1, struct mcomp *c2)
            if (!cp[1])
                *cp = 0;
 
-       fmt_scan (c1->c_fmt, buffer, sizeof buffer - 1, sizeof buffer - 1, dat);
+       fmt_scan (c1->c_fmt, buffer, sizeof buffer - 1, sizeof buffer - 1,
+                 dat, NULL);
        /* Don't need to append a newline, dctime() already did */
        c2->c_text = getcpy (buffer);
 
@@ -1197,7 +1198,8 @@ mcomp_format (struct mcomp *c1, struct mcomp *c2)
            p->pq_error = NULL;
        }
 
-       fmt_scan (c1->c_fmt, buffer, sizeof buffer - 1, sizeof buffer - 1, dat);
+       fmt_scan (c1->c_fmt, buffer, sizeof buffer - 1, sizeof buffer - 1,
+                 dat, NULL);
        if (*buffer) {
            if (c2->c_text)
                c2->c_text = add (",\n", c2->c_text);
@@ -1860,18 +1862,17 @@ filterbody (struct mcomp *c1, char *buf, int bufsz, int state, FILE *fp,
      */
 
     switch (filterpid = fork()) {
-        char **args;
+        char **args, *program;
        struct arglist *a;
-       int i, dat[5], s;
+       int i, dat[5], s, argp;
 
     case 0:
        /*
-        * Allocate an argument array for us
+        * Configure an argument array for us
         */
 
-       args = (char **) mh_xmalloc((filter_nargs + 2) * sizeof(char *));
-       args[0] = formatproc;
-       args[filter_nargs + 1] = NULL;
+       args = argsplit(formatproc, &program, &argp);
+       args[argp + filter_nargs] = NULL;
        dat[0] = 0;
        dat[1] = 0;
        dat[2] = 0;
@@ -1882,9 +1883,9 @@ filterbody (struct mcomp *c1, char *buf, int bufsz, int state, FILE *fp,
         * Pull out each argument and scan them.
         */
 
-       for (a = arglist_head, i = 1; a != NULL; a = a->a_next, i++) {
+       for (a = arglist_head, i = argp; a != NULL; a = a->a_next, i++) {
            args[i] = mh_xmalloc(BUFSIZ);
-           fmt_scan(a->a_fmt, args[i], BUFSIZ - 1, BUFSIZ, dat);
+           fmt_scan(a->a_fmt, args[i], BUFSIZ - 1, BUFSIZ, dat, NULL);
            /*
             * fmt_scan likes to put a trailing newline at the end of the
             * format string.  If we have one, get rid of it.