diff options
author | peter <peter@FreeBSD.org> | 1996-12-03 06:15:52 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1996-12-03 06:15:52 +0000 |
commit | aad7d263e00971bb9e46e80ebc671b30c5e0fa73 (patch) | |
tree | dc5eb8eff5bf4f08980ac82e89f5dbbd95fad91c /usr.sbin/sendmail/src/headers.c | |
parent | 7a3624533288fa35a41c29ac536eca2fa5a5917f (diff) | |
download | FreeBSD-src-aad7d263e00971bb9e46e80ebc671b30c5e0fa73.zip FreeBSD-src-aad7d263e00971bb9e46e80ebc671b30c5e0fa73.tar.gz |
Merge 8.8.3->8.8.4 changes onto our mainline where we've edited the
file at some point in the past.
Obtained from: Eric Allman <eric@sendmail.org>
Diffstat (limited to 'usr.sbin/sendmail/src/headers.c')
-rw-r--r-- | usr.sbin/sendmail/src/headers.c | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/usr.sbin/sendmail/src/headers.c b/usr.sbin/sendmail/src/headers.c index 6ab97e4..7ae2acf 100644 --- a/usr.sbin/sendmail/src/headers.c +++ b/usr.sbin/sendmail/src/headers.c @@ -33,7 +33,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)headers.c 8.100 (Berkeley) 9/15/96"; +static char sccsid[] = "@(#)headers.c 8.101 (Berkeley) 11/23/96"; #endif /* not lint */ # include <errno.h> @@ -1267,8 +1267,14 @@ put_vanilla_header(h, v, mci) { register char *nlp; register char *obp; + int putflags; char obuf[MAXLINE]; + putflags = 0; +#ifdef _FFR_7BITHDRS + if (bitnset(M_7BITHDRS, mci->mci_mailer->m_flags)) + putflags |= PXLF_STRIP8BIT; +#endif (void) snprintf(obuf, sizeof obuf, "%.200s: ", h->h_field); obp = obuf + strlen(obuf); while ((nlp = strchr(v, '\n')) != NULL) @@ -1280,7 +1286,7 @@ put_vanilla_header(h, v, mci) l = sizeof obuf - (obp - obuf); snprintf(obp, SPACELEFT(obuf, obp), "%.*s", l, v); - putline(obuf, mci); + putxline(obuf, mci, putflags); v += l + 1; obp = obuf; if (*v != ' ' && *v != '\t') @@ -1288,7 +1294,7 @@ put_vanilla_header(h, v, mci) } snprintf(obp, SPACELEFT(obuf, obp), "%.*s", sizeof obuf - (obp - obuf) - 1, v); - putline(obuf, mci); + putxline(obuf, mci, putflags); } /* ** COMMAIZE -- output a header field, making a comma-translated list. @@ -1319,6 +1325,7 @@ commaize(h, p, oldstyle, mci, e) int opos; int omax; bool firstone = TRUE; + int putflags = 0; char obuf[MAXLINE + 3]; /* @@ -1329,6 +1336,11 @@ commaize(h, p, oldstyle, mci, e) if (tTd(14, 2)) printf("commaize(%s: %s)\n", h->h_field, p); +#ifdef _FFR_7BITHDRS + if (bitnset(M_7BITHDRS, mci->mci_mailer->m_flags)) + putflags |= PXLF_STRIP8BIT; +#endif + obp = obuf; (void) snprintf(obp, SPACELEFT(obuf, obp), "%.200s: ", h->h_field); opos = strlen(h->h_field) + 2; @@ -1425,7 +1437,7 @@ commaize(h, p, oldstyle, mci, e) if (opos > omax && !firstone) { snprintf(obp, SPACELEFT(obuf, obp), ",\n"); - putline(obuf, mci); + putxline(obuf, mci, putflags); obp = obuf; (void) strcpy(obp, " "); opos = strlen(obp); @@ -1444,7 +1456,7 @@ commaize(h, p, oldstyle, mci, e) *p = savechar; } *obp = '\0'; - putline(obuf, mci); + putxline(obuf, mci, putflags); } /* ** COPYHEADER -- copy header list |