summaryrefslogtreecommitdiff
path: root/usr.bin/mail/send.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1997-07-22 18:54:46 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1997-07-22 18:54:46 +0000
commit046867d40907d5ade612ed34c2b84bbf3c01ad02 (patch)
treea8fe17bfaa2131a2835dc76831bb634f89127862 /usr.bin/mail/send.c
parent51b2752e6430295a6a39bbd6b7001e887df471cf (diff)
grabh() now returns SIGINT if it was interrupted (previously always
returned 0 and the return val was always ignored). Add gethfromtty() to get a header (using grabh) from the tty and quit on two ^C's. Use gethfromtty() when getting Subject, Cc, and Bcc headers so we can quit nicely. Closes PR #291. Don't use longs where it doesn't make sense.
Diffstat (limited to 'usr.bin/mail/send.c')
-rw-r--r--usr.bin/mail/send.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/usr.bin/mail/send.c b/usr.bin/mail/send.c
index a86a8bcc7aa..85183bf2b55 100644
--- a/usr.bin/mail/send.c
+++ b/usr.bin/mail/send.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: send.c,v 1.6 1997/07/14 15:56:25 millert Exp $ */
+/* $OpenBSD: send.c,v 1.7 1997/07/22 18:54:41 millert Exp $ */
/* $NetBSD: send.c,v 1.6 1996/06/08 19:48:39 christos Exp $ */
/*
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)send.c 8.1 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: send.c,v 1.6 1997/07/14 15:56:25 millert Exp $";
+static char rcsid[] = "$OpenBSD: send.c,v 1.7 1997/07/22 18:54:41 millert Exp $";
#endif
#endif /* not lint */
@@ -65,7 +65,7 @@ send(mp, obuf, doign, prefix)
struct ignoretab *doign;
char *prefix;
{
- long count;
+ int count;
register FILE *ibuf;
char line[LINESIZE];
int ishead, infld, ignoring = 0, dostat, firstline;
@@ -315,16 +315,6 @@ mail1(hp, printheaders)
*/
if ((mtf = collect(hp, printheaders)) == NULL)
return;
- if (value("interactive") != NULL)
- if (value("askcc") != NULL || value("askbcc") != NULL) {
- if (value("askcc") != NULL)
- grabh(hp, GCC);
- if (value("askbcc") != NULL)
- grabh(hp, GBCC);
- } else {
- puts("EOT");
- (void)fflush(stdout);
- }
if (fsize(mtf) == 0)
if (hp->h_subject == NULL)
puts("No message, no subject; hope that's ok");