static char tmpfil[] = "/tmp/pstXXXXXX";
-static char from[BUFSIZ]; /* my network address */
-static char signature[BUFSIZ]; /* my signature */
static char *filter = NULL; /* the filter for BCC'ing */
static char *subject = NULL; /* the subject field for BCC'ing */
static char *fccfold[FCCS]; /* foldernames for FCC'ing */
** static prototypes
*/
static void putfmt(char *, char *, FILE *);
-static void start_headers(void);
static void finish_headers(FILE *);
static int get_header(char *, struct headers *);
static void putadr(char *, struct mailname *);
if ((in = fopen(msg, "r")) == NULL)
adios(msg, "unable to open");
- start_headers();
if (debug) {
verbose++;
out = stdout;
/*
-** Construct signature name
+** Add yet missing headers.
*/
static void
-start_headers(void)
+finish_headers(FILE *out)
{
char *cp;
+ char from[BUFSIZ]; /* my network address */
+ char signature[BUFSIZ]; /* my signature */
+ char *resentstr = (msgstate == resent) ? "Resent-" : "";
+
+ if (!(msgflags & MDAT)) {
+ fprintf(out, "%sDate: %s\n", resentstr, dtimenow(0));
+ }
strncpy(from, getusername(), sizeof(from));
if ((cp = getfullname()) && *cp) {
} else {
snprintf(signature, sizeof(signature), "%s", from);
}
-}
-
-
-/*
-** Add yet missing headers.
-*/
-static void
-finish_headers(FILE *out)
-{
- char *resentstr = (msgstate == resent) ? "Resent-" : "";
-
- if (!(msgflags & MDAT)) {
- fprintf(out, "%sDate: %s\n", resentstr, dtimenow(0));
- }
if (!(msgflags & MFRM)) {
fprintf(out, "%sFrom: %s\n", resentstr, signature);
} else {
- /* Add a Sender: header in case the From: header is fake. */
+ /* In case the From: header contains multiple addresses. */
fprintf(out, "%sSender: %s\n", resentstr, from);
}
#ifdef notdef