char *folder = NULL;
char *form = NULL, buf[BUFSIZ], value[10];
char **argp, **arguments, *msgs[MAXARGS];
+ char *nfs;
#ifdef MHE
int buildsw = 0;
done(1);
seq_setprev(mp); /* set the previous sequence */
+ if ((out = creat(drft, m_gmprot())) == NOTOK)
+ adios(drft, "unable to create");
+
/* Open form (component) file. */
if (digest) {
if (issue == 0) {
if (!form)
form = digestcomps;
in = build_form(form, digest, volume, issue);
- } else
- in = open_form(&form, forwcomps);
-
- if ((out = creat(drft, m_gmprot())) == NOTOK)
- adios(drft, "unable to create");
-
- /*
- ** copy the components into the draft
- */
- cpydata(in, out, form, drft);
- close(in);
+ cpydata(in, out, form, drft);
+ close(in);
+ } else {
+ nfs = new_fs(form, NULL, forwcomps, NULL);
+ if (write(out, nfs, strlen(nfs)) != strlen(nfs)) {
+ adios(drft, "error writing");
+ }
+ }
close(out);
+
add_forw_hdr(drft);
if (digest) {