projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mmh.sh: Minimal change.
[mmh]
/
uip
/
send.c
diff --git
a/uip/send.c
b/uip/send.c
index
5054273
..
a2e9932
100644
(file)
--- a/
uip/send.c
+++ b/
uip/send.c
@@
-16,16
+16,10
@@
#include <h/tws.h>
#include <h/utils.h>
#include <h/tws.h>
#include <h/utils.h>
-#ifdef TIME_WITH_SYS_TIME
+#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
# include <sys/time.h>
-# include <time.h>
-#else
-# ifdef TM_IN_SYS_TIME
-# include <sys/time.h>
-# else
-# include <time.h>
-# endif
#endif
#endif
+#include <time.h>
int debugsw = 0; /* global */
int forwsw = 1;
int debugsw = 0; /* global */
int forwsw = 1;
@@
-97,6
+91,7
@@
main(int argc, char **argv)
int msgp = 0, nfiles = 0, distsw = 0, vecp = 1;
int msgnum, status;
int in, out;
int msgp = 0, nfiles = 0, distsw = 0, vecp = 1;
int msgnum, status;
int in, out;
+ int n;
char *cp, *maildir = NULL;
char buf[BUFSIZ], **ap, **argp, **arguments;
char *msgs[MAXARGS], *vec[MAXARGS];
char *cp, *maildir = NULL;
char buf[BUFSIZ], **ap, **argp, **arguments;
char *msgs[MAXARGS], *vec[MAXARGS];
@@
-304,7
+299,9
@@
main(int argc, char **argv)
}
status = 0;
vec[0] = "spost";
}
status = 0;
vec[0] = "spost";
- closefds(3);
+ for (n=3; n<OPEN_MAX; n++) {
+ close(n);
+ }
for (msgnum = 0; msgnum < nfiles; msgnum++) {
switch (sendsbr(vec, vecp, files[msgnum], &st, 1)) {
for (msgnum = 0; msgnum < nfiles; msgnum++) {
switch (sendsbr(vec, vecp, files[msgnum], &st, 1)) {
@@
-627,9
+624,9
@@
make_mime_composition_file_entry(char *file_name)
adios(NULL, "unable to access file `%s'", file_name);
}
adios(NULL, "unable to access file `%s'", file_name);
}
- fprintf(composition_file, "#%s; name=\"%s\" <>{attachment}",
- content_type,
- (!(cp = strrchr(file_name, '/'))) ? file_name : cp + 1);
+ cp = (!(cp = strrchr(file_name, '/'))) ? file_name : cp + 1;
+ fprintf(composition_file, "#%s; name=\"%s\" <> [%s] {attachment}",
+ content_type, cp, cp);
fprintf(composition_file, " %s\n", file_name);
fprintf(composition_file, " %s\n", file_name);