The -T flag just creates a temporary file for use with netnews that
contains the article ids of messages that have been read or deleted.
This is obsolete and should just be removed...

 - todd

Index: usr.bin/mail/glob.h
===================================================================
RCS file: /home/cvs/openbsd/src/usr.bin/mail/glob.h,v
retrieving revision 1.7
diff -u -r1.7 glob.h
--- usr.bin/mail/glob.h 3 Jun 2003 02:56:11 -0000       1.7
+++ usr.bin/mail/glob.h 24 Nov 2014 13:41:21 -0000
@@ -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 */
Index: usr.bin/mail/main.c
===================================================================
RCS file: /home/cvs/openbsd/src/usr.bin/mail/main.c,v
retrieving revision 1.23
diff -u -r1.23 main.c
--- usr.bin/mail/main.c 27 Oct 2009 23:59:40 -0000      1.23
+++ usr.bin/mail/main.c 24 Nov 2014 13:40:19 -0000
@@ -80,16 +80,6 @@
        subject = NULL;
        while ((i = getopt(argc, argv, "EINT: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.
Index: usr.bin/mail/quit.c
===================================================================
RCS file: /home/cvs/openbsd/src/usr.bin/mail/quit.c,v
retrieving revision 1.20
diff -u -r1.20 quit.c
--- usr.bin/mail/quit.c 27 Oct 2009 23:59:40 -0000      1.20
+++ usr.bin/mail/quit.c 24 Nov 2014 13:41:16 -0000
@@ -64,7 +64,7 @@
 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 @@
                        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 @@
                        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 @@
 {
        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 @@
                }
                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) {

Reply via email to