SCCS-vsn: usr.bin/mail/send.c 2.4
-static char *SccsId = "@(#)send.c 2.3 %G%";
+static char *SccsId = "@(#)send.c 2.4 %G%";
/*
* Send message described by the passed pointer to the
/*
* Send message described by the passed pointer to the
* the number of lines written. Adjust the status: field
* if need be. If doign is set, suppress ignored header fields.
*/
* the number of lines written. Adjust the status: field
* if need be. If doign is set, suppress ignored header fields.
*/
send(mailp, obuf, doign)
struct message *mailp;
FILE *obuf;
send(mailp, obuf, doign)
struct message *mailp;
FILE *obuf;
- /*
- * We are looking at a header line.
- * See if it is the status: field,
- * and if it is, print the real status: field
- */
- if (icisname(line, "status", 6)) {
- if (dostat) {
- statusput(mailp, obuf, doign);
- dostat = 0;
- }
- continue;
- }
/*
* Pick up the header field.
* If it is an ignored field and
/*
* Pick up the header field.
* If it is an ignored field and
*cp2 = 0;
if (doign && isign(field))
continue;
*cp2 = 0;
if (doign && isign(field))
continue;
+ /*
+ * If the field is "status," go compute and print the
+ * real Status: field
+ */
+ if (icequal(field, "status")) {
+ if (dostat) {
+ statusput(mailp, obuf, doign);
+ dostat = 0;
+ }
+ continue;
+ }
}
writeit:
fputs(line, obuf);
}
writeit:
fputs(line, obuf);