Augmented new_fs() with an additional argument for a default form.
[mmh] / uip / rcvdist.c
index 077f912..9adb5d4 100644 (file)
@@ -10,7 +10,6 @@
 #include <h/fmt_scan.h>
 #include <h/rcvmail.h>
 #include <h/tws.h>
-#include <h/mts.h>
 #include <h/utils.h>
 
 static struct swit switches[] = {
@@ -54,7 +53,6 @@ main(int argc, char **argv)
        /* read user profile/context */
        context_read();
 
-       mts_init(invo_name);
        arguments = getarguments(invo_name, argc, argv, 1);
        argp = arguments;
 
@@ -135,8 +133,6 @@ main(int argc, char **argv)
 
 #define SBUFSIZ 256
 
-static int outputlinelen = OUTPUTLINELEN;
-
 static struct format *fmt;
 
 static int ncomps = 0;
@@ -175,7 +171,7 @@ rcvdistout(FILE *inb, char *form, char *addrs)
                adios(drft, "unable to create");
 
        /* get new format string */
-       cp = new_fs(form ? form : rcvdistcomps, NULL, NULL);
+       cp = new_fs(form ? form : rcvdistcomps, NULL, NULL, NULL);
        format_len = strlen(cp);
        ncomps = fmt_compile(cp, &fmt) + 1;
        if (!(nxtbuf = compbuffers =
@@ -254,7 +250,7 @@ finished: ;
        i = format_len + char_read + 256;
        scanl = mh_xmalloc((size_t) i + 2);
        dat[0] = dat[1] = dat[2] = dat[4] = 0;
-       dat[3] = outputlinelen;
+       dat[3] = OUTPUTLINELEN;
        fmt_scan(fmt, scanl, i, dat);
        fputs(scanl, out);