projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed some more problems caught by gcc -ansi -pedantic.
[mmh]
/
uip
/
sendsbr.c
diff --git
a/uip/sendsbr.c
b/uip/sendsbr.c
index
04d6ea9
..
3eff75d
100644
(file)
--- a/
uip/sendsbr.c
+++ b/
uip/sendsbr.c
@@
-9,7
+9,7
@@
#include <h/mh.h>
#include <h/signals.h>
#include <h/mh.h>
#include <h/signals.h>
-#include <h/m_setjmp.h>
+#include <setjmp.h>
#include <signal.h>
#include <fcntl.h>
#include <h/mime.h>
#include <signal.h>
#include <fcntl.h>
#include <h/mime.h>
@@
-110,7
+110,7
@@
sendsbr (char **vec, int vecp, char *drft, struct stat *st, int rename_drft, cha
}
done=armed_done;
}
done=armed_done;
- switch (m_setjmp (env)) {
+ switch (setjmp (env)) {
case OK:
/*
* If given -push and -unique (which is undocumented), then
case OK:
/*
* If given -push and -unique (which is undocumented), then
@@
-192,6
+192,7
@@
attach(char *attachment_header_field_name, char *draft_file_name,
int has_body; /* draft has a message body */
int length; /* length of attachment header field name */
char *p; /* miscellaneous string pointer */
int has_body; /* draft has a message body */
int length; /* length of attachment header field name */
char *p; /* miscellaneous string pointer */
+ FILE *fp; /* pointer for mhn.defaults */
/*
* Open up the draft file.
/*
* Open up the draft file.
@@
-301,6
+302,11
@@
attach(char *attachment_header_field_name, char *draft_file_name,
* that specify attachments. Add a mhbuild MIME composition file for each.
*/
* that specify attachments. Add a mhbuild MIME composition file for each.
*/
+ if ((fp = fopen (p = etcpath ("mhn.defaults"), "r"))) {
+ readconfig ((struct node **) NULL, fp, p, 0);
+ fclose(fp);
+ }
+
rewind(draft_file);
while (get_line() != EOF && *field != '\0' && *field != '-') {
rewind(draft_file);
while (get_line() != EOF && *field != '\0' && *field != '-') {
@@
-496,10
+502,12
@@
make_mime_composition_file_entry(char *file_name, int attachformat)
} else {
/* Suppress Content-Id, insert simple Content-Disposition
and Content-Description with filename. */
} else {
/* Suppress Content-Id, insert simple Content-Disposition
and Content-Description with filename. */
+ p = strrchr(file_name, '/');
(void) fprintf (composition_file,
(void) fprintf (composition_file,
- "#%1$s; name=\"%2$s\" <> [%2$s]{attachment}",
+ "#%s; name=\"%s\" <> [%s]{attachment}",
content_type,
content_type,
- ((p = strrchr(file_name, '/')) == (char *)0) ? file_name : p + 1);
+ (p == (char *)0) ? file_name : p + 1,
+ (p == (char *)0) ? file_name : p + 1);
}
break;
}
break;
@@
-513,10
+521,12
@@
make_mime_composition_file_entry(char *file_name, int attachformat)
} else {
/* Suppress Content-Id, insert Content-Disposition with
modification date and Content-Description wtih filename. */
} else {
/* Suppress Content-Id, insert Content-Disposition with
modification date and Content-Description wtih filename. */
+ p = strrchr(file_name, '/');
(void) fprintf (composition_file,
(void) fprintf (composition_file,
- "#%1$s; name=\"%2$s\" <>[%2$s]{attachment; modification-date=\"%3$s\"}",
+ "#%s; name=\"%s\" <>[%s]{attachment; modification-date=\"%s\"}",
content_type,
content_type,
- ((p = strrchr(file_name, '/')) == (char *)0) ? file_name : p + 1,
+ (p == (char *)0) ? file_name : p + 1,
+ (p == (char *)0) ? file_name : p + 1,
dtime (&st.st_mtime, 0));
}
dtime (&st.st_mtime, 0));
}