projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Removed the -clear switch from scan(1).
[mmh]
/
uip
/
dist.c
diff --git
a/uip/dist.c
b/uip/dist.c
index
52e480e
..
4e83a7b
100644
(file)
--- a/
uip/dist.c
+++ b/
uip/dist.c
@@
-45,6
+45,7
@@
main(int argc, char **argv)
char *form = NULL, *msg = NULL, buf[BUFSIZ], drft[BUFSIZ];
char **argp, **arguments;
struct msgs *mp = NULL;
char *form = NULL, *msg = NULL, buf[BUFSIZ], drft[BUFSIZ];
char **argp, **arguments;
struct msgs *mp = NULL;
+ char *nfs;
#ifdef LOCALE
setlocale(LC_ALL, "");
#ifdef LOCALE
setlocale(LC_ALL, "");
@@
-134,15
+135,14
@@
main(int argc, char **argv)
if (file && (msg || folder))
adios(NULL, "can't mix files and folders/msgs");
if (file && (msg || folder))
adios(NULL, "can't mix files and folders/msgs");
- in = open_form(&form, distcomps);
-
strncpy(drft, m_draft(seq_beyond), sizeof(drft));
strncpy(drft, m_draft(seq_beyond), sizeof(drft));
-
if ((out = creat(drft, m_gmprot())) == NOTOK)
adios(drft, "unable to create");
if ((out = creat(drft, m_gmprot())) == NOTOK)
adios(drft, "unable to create");
- cpydata(in, out, form, drft);
- close(in);
+ nfs = new_fs(form, distcomps);
+ if (write(out, nfs, strlen(nfs)) != strlen(nfs)) {
+ adios(drft, "error writing");
+ }
close(out);
if (file) {
close(out);
if (file) {