summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2014-11-24 20:01:43 +0000
committermillert <millert@openbsd.org>2014-11-24 20:01:43 +0000
commitb87139ef51739f2f7925a2421e164f57b5ff9261 (patch)
tree36b58e6d4556a71fe828d9e2a15e7b4b17194f94
parentadd a (currently crashing) test case by Sebastien Marie (diff)
downloadwireguard-openbsd-b87139ef51739f2f7925a2421e164f57b5ff9261.tar.xz
wireguard-openbsd-b87139ef51739f2f7925a2421e164f57b5ff9261.zip
Remove undocumented and obsolete -T option. It was intended for
use with old netnews. OK sobrado@ tobias@
-rw-r--r--usr.bin/mail/glob.h3
-rw-r--r--usr.bin/mail/mail.18
-rw-r--r--usr.bin/mail/main.c14
-rw-r--r--usr.bin/mail/quit.c32
4 files changed, 9 insertions, 48 deletions
diff --git a/usr.bin/mail/glob.h b/usr.bin/mail/glob.h
index ffa44a7e084..27ea07f65c8 100644
--- a/usr.bin/mail/glob.h
+++ b/usr.bin/mail/glob.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: glob.h,v 1.7 2003/06/03 02:56:11 millert Exp $ */
+/* $OpenBSD: glob.h,v 1.8 2014/11/24 20:01:43 millert Exp $ */
/* $NetBSD: glob.h,v 1.4 1996/06/08 19:48:25 christos Exp $ */
/*
@@ -40,7 +40,6 @@
int msgCount; /* Count of messages read in */
int rcvmode; /* True if receiving mail */
int sawcom; /* Set after first command */
-char *Tflag; /* -T temp file for netnews */
int senderr; /* An error while checking */
int edit; /* Indicates editing a file */
int readonly; /* Will be unable to rewrite file */
diff --git a/usr.bin/mail/mail.1 b/usr.bin/mail/mail.1
index feb473193fd..fdfd4d46134 100644
--- a/usr.bin/mail/mail.1
+++ b/usr.bin/mail/mail.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: mail.1,v 1.65 2014/03/27 13:08:24 jmc Exp $
+.\" $OpenBSD: mail.1,v 1.66 2014/11/24 20:01:43 millert Exp $
.\"
.\" Copyright (c) 1980, 1990, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -29,7 +29,7 @@
.\"
.\" @(#)mail.1 8.8 (Berkeley) 4/28/95
.\"
-.Dd $Mdocdate: March 27 2014 $
+.Dd $Mdocdate: November 24 2014 $
.Dt MAIL 1
.Os
.Sh NAME
@@ -1202,10 +1202,6 @@ This man page is derived from the
.%T "Mail Reference Manual"
originally written by Kurt Shoens.
.Sh BUGS
-There are some flags that are not documented here.
-Most are
-not useful to the general user.
-.Pp
Usually,
.Nm mail
and
diff --git a/usr.bin/mail/main.c b/usr.bin/mail/main.c
index 16e0c8090f1..b8196c69650 100644
--- a/usr.bin/mail/main.c
+++ b/usr.bin/mail/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.23 2009/10/27 23:59:40 deraadt Exp $ */
+/* $OpenBSD: main.c,v 1.24 2014/11/24 20:01:43 millert Exp $ */
/* $NetBSD: main.c,v 1.7 1997/05/13 06:15:57 mikel Exp $ */
/*
@@ -78,18 +78,8 @@ main(int argc, char **argv)
bcc = NULL;
smopts = NULL;
subject = NULL;
- while ((i = getopt(argc, argv, "EINT:b:c:dfins:u:v")) != -1) {
+ while ((i = getopt(argc, argv, "EIN:b:c:dfins:u:v")) != -1) {
switch (i) {
- case 'T':
- /*
- * Next argument is temp file to write which
- * articles have been read/deleted for netnews.
- */
- Tflag = optarg;
- if ((i = creat(Tflag, 0600)) < 0)
- err(1, "%s", Tflag);
- (void)close(i);
- break;
case 'u':
/*
* Next argument is person to pretend to be.
diff --git a/usr.bin/mail/quit.c b/usr.bin/mail/quit.c
index 7320df9d372..56216375b1a 100644
--- a/usr.bin/mail/quit.c
+++ b/usr.bin/mail/quit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: quit.c,v 1.20 2009/10/27 23:59:40 deraadt Exp $ */
+/* $OpenBSD: quit.c,v 1.21 2014/11/24 20:01:43 millert Exp $ */
/* $NetBSD: quit.c,v 1.6 1996/12/28 07:11:07 tls Exp $ */
/*
@@ -64,7 +64,7 @@ int
quit(void)
{
int mcount, p, modify, autohold, anystat, holdbit, nohold;
- FILE *ibuf = NULL, *obuf, *fbuf, *rbuf, *readstat = NULL, *abuf;
+ FILE *ibuf = NULL, *obuf, *fbuf, *rbuf, *abuf;
struct message *mp;
int c, fd;
struct stat minfo;
@@ -154,10 +154,6 @@ quit(void)
mp->m_flag |= holdbit;
}
modify = 0;
- if (Tflag != NULL) {
- if ((readstat = Fopen(Tflag, "w")) == NULL)
- Tflag = NULL;
- }
for (c = 0, p = 0, mp = &message[0]; mp < &message[msgCount]; mp++) {
if (mp->m_flag & MBOX)
c++;
@@ -165,15 +161,7 @@ quit(void)
p++;
if (mp->m_flag & MODIFY)
modify++;
- if (Tflag != NULL && (mp->m_flag & (MREAD|MDELETED)) != 0) {
- char *id;
-
- if ((id = hfield("article-id", mp)) != NULL)
- fprintf(readstat, "%s\n", id);
- }
}
- if (Tflag != NULL)
- (void)Fclose(readstat);
if (p == msgCount && !modify && !anystat) {
printf("Held %d message%s in %s\n",
p, p == 1 ? "" : "s", mailname);
@@ -399,17 +387,13 @@ edstop(void)
{
int gotcha, c;
struct message *mp;
- FILE *obuf, *ibuf, *readstat = NULL;
+ FILE *obuf, *ibuf;
struct stat statb;
char tempname[PATHSIZE];
if (readonly)
return(0);
holdsigs();
- if (Tflag != NULL) {
- if ((readstat = Fopen(Tflag, "w")) == NULL)
- Tflag = NULL;
- }
for (mp = &message[0], gotcha = 0; mp < &message[msgCount]; mp++) {
if (mp->m_flag & MNEW) {
mp->m_flag &= ~MNEW;
@@ -417,16 +401,8 @@ edstop(void)
}
if (mp->m_flag & (MODIFY|MDELETED|MSTATUS))
gotcha++;
- if (Tflag != NULL && (mp->m_flag & (MREAD|MDELETED)) != 0) {
- char *id;
-
- if ((id = hfield("article-id", mp)) != NULL)
- fprintf(readstat, "%s\n", id);
- }
}
- if (Tflag != NULL)
- (void)Fclose(readstat);
- if (!gotcha || Tflag != NULL)
+ if (!gotcha)
goto done;
ibuf = NULL;
if (stat(mailname, &statb) >= 0 && statb.st_size > mailsize) {