projects
/
mmh
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
a0b824f
)
Replaced open_form() with new_fs() in forw.c.
author
markus schnalke
<meillo@marmaro.de>
Thu, 9 Feb 2012 19:48:26 +0000
(20:48 +0100)
committer
markus schnalke
<meillo@marmaro.de>
Thu, 9 Feb 2012 19:48:26 +0000
(20:48 +0100)
uip/forw.c
patch
|
blob
|
history
diff --git
a/uip/forw.c
b/uip/forw.c
index
feb60f9
..
38ede22
100644
(file)
--- a/
uip/forw.c
+++ b/
uip/forw.c
@@
-73,6
+73,7
@@
main(int argc, char **argv)
char *folder = NULL;
char *form = NULL, buf[BUFSIZ], value[10];
char **argp, **arguments, *msgs[MAXARGS];
char *folder = NULL;
char *form = NULL, buf[BUFSIZ], value[10];
char **argp, **arguments, *msgs[MAXARGS];
+ char *nfs;
#ifdef MHE
int buildsw = 0;
#ifdef MHE
int buildsw = 0;
@@
-213,6
+214,9
@@
main(int argc, char **argv)
done(1);
seq_setprev(mp); /* set the previous sequence */
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) {
/* Open form (component) file. */
if (digest) {
if (issue == 0) {
@@
-230,18
+234,16
@@
main(int argc, char **argv)
if (!form)
form = digestcomps;
in = build_form(form, digest, volume, issue);
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);
close(out);
+
add_forw_hdr(drft);
if (digest) {
add_forw_hdr(drft);
if (digest) {