]> diplodocus.org Git - nmh/commitdiff
Remove final traces of TMA support
authorKen Hornstein <kenh@pobox.com>
Fri, 17 May 2019 18:27:28 +0000 (14:27 -0400)
committerKen Hornstein <kenh@pobox.com>
Fri, 17 May 2019 18:41:39 +0000 (14:41 -0400)
TMA (the TTI Trusted Mail Agent) was an early implementation of
encrypted mail and is long gone.  There were a few vestigial bits
of this support left in nmh, and this is finally removing them.
This includes the check for the "Encrypted" header field in various
scan formats and some code to return the code SCNENC from scan()
function where it would have special handling by programs like inc(1).

16 files changed:
etc/scan.MMDDYY
etc/scan.YYYYMMDD
etc/scan.curses
etc/scan.default
etc/scan.highlighted
etc/scan.mailx
etc/scan.nomime
etc/scan.size
etc/scan.time
etc/scan.timely
etc/scan.unseen
test/format/test-fmtdump
uip/inc.c
uip/scan.c
uip/scansbr.c
uip/scansbr.h

index f4a20bd..96c122b 100644 (file)
@@ -3,7 +3,7 @@
 %; Like scan.default, but the date is printed in MM/DD/YY format rather than
 %; MM/DD.
 %;
 %; Like scan.default, but the date is printed in MM/DD/YY format rather than
 %; MM/DD.
 %;
-%4(msg)%<(cur)+%| %>%<{replied}-%?{encrypted}E%| %>\
+%4(msg)%<(cur)+%| %>%<{replied}-%| %>\
 %02(mon{date})/%02(mday{date})/%(void(year{date}))%02(modulo 100)%<{date} %|*%>\
 %<(mymbox{from})%<{to}To:%14(unquote(decode(friendly{to})))%>%>\
 %<(zero)%17(unquote(decode(friendly{from})))%>  \
 %02(mon{date})/%02(mday{date})/%(void(year{date}))%02(modulo 100)%<{date} %|*%>\
 %<(mymbox{from})%<{to}To:%14(unquote(decode(friendly{to})))%>%>\
 %<(zero)%17(unquote(decode(friendly{from})))%>  \
index 97016c2..f106a8a 100644 (file)
@@ -3,7 +3,7 @@
 %; Like scan.default, but the date is printed in YYYY-MM-DD format rather than
 %; MM/DD.
 %;
 %; Like scan.default, but the date is printed in YYYY-MM-DD format rather than
 %; MM/DD.
 %;
-%4(msg)%<(cur)+%| %>%<{replied}-%?{encrypted}E%| %>\
+%4(msg)%<(cur)+%| %>%<{replied}-%| %>\
 %4(year{date})-%02(mon{date})-%02(mday{date})%<{date} %|*%>\
 %<(mymbox{from})%<{to}To:%14(unquote(decode(friendly{to})))%>%>\
 %<(zero)%17(unquote(decode(friendly{from})))%>  \
 %4(year{date})-%02(mon{date})-%02(mday{date})%<{date} %|*%>\
 %<(mymbox{from})%<{to}To:%14(unquote(decode(friendly{to})))%>%>\
 %<(zero)%17(unquote(decode(friendly{from})))%>  \
index f2d5d13..ec8e356 100644 (file)
 %4(msg)\
 %;
 %; If it's the current message, output a '+' in the next column, otherwise
 %4(msg)\
 %;
 %; If it's the current message, output a '+' in the next column, otherwise
-%; a space.  Also use '-' if it's got a "Replied" header and 'E' if it's
-%; encrypted (not currently supported)
+%; a space.  Also use '-' if it's got a "Replied" header.
 %;
 %;
-%<(cur)+%| %>%<{replied}-%?{encrypted}E%| %>\
+%<(cur)+%| %>%<{replied}-%| %>\
 %;
 %; Output the date, but mark it with a '*' if it's missing and was synthesized.
 %; Note the use of 02 to make sure the date is padded with a leading zero.
 %;
 %; Output the date, but mark it with a '*' if it's missing and was synthesized.
 %; Note the use of 02 to make sure the date is padded with a leading zero.
index adca1fc..8a6ed74 100644 (file)
@@ -4,7 +4,7 @@
 %; format string (for non-UK sites) which was compiled into the
 %; command "scan".  See the source file "h/scansbr.h" for details.
 %;
 %; format string (for non-UK sites) which was compiled into the
 %; command "scan".  See the source file "h/scansbr.h" for details.
 %;
-%4(msg)%<(cur)+%| %>%<{replied}-%?{encrypted}E%| %>\
+%4(msg)%<(cur)+%| %>%<{replied}-%| %>\
 %02(mon{date})/%02(mday{date})%<{date} %|*%>\
 %<(mymbox{from})%<{to}To:%14(unquote(decode(friendly{to})))%>%>\
 %<(zero)%17(unquote(decode(friendly{from})))%>  \
 %02(mon{date})/%02(mday{date})%<{date} %|*%>\
 %<(mymbox{from})%<{to}To:%14(unquote(decode(friendly{to})))%>%>\
 %<(zero)%17(unquote(decode(friendly{from})))%>  \
index 944dbce..751821e 100644 (file)
@@ -34,7 +34,7 @@
 %;
 %<(cur)%(zputlit(lit \e[33;40m))%>\
 %<(unseen)%(zputlit(lit \e[36;40m))%>\
 %;
 %<(cur)%(zputlit(lit \e[33;40m))%>\
 %<(unseen)%(zputlit(lit \e[36;40m))%>\
-%4(msg)%<(cur)+%| %>%<{replied}-%?{encrypted}E%| %>\
+%4(msg)%<(cur)+%| %>%<{replied}-%| %>\
 %02(mon{date})/%02(mday{date})%<{date} %|*%>\
 %<(mymbox{from})%<{to}To:%14(unquote(decode(friendly{to})))%>%>\
 %<(zero)%17(unquote(decode(friendly{from})))%>  \
 %02(mon{date})/%02(mday{date})%<{date} %|*%>\
 %<(mymbox{from})%<{to}To:%14(unquote(decode(friendly{to})))%>%>\
 %<(zero)%17(unquote(decode(friendly{from})))%>  \
index 942e265..b051f0d 100644 (file)
@@ -1,6 +1,6 @@
 %<(cur)>%| %>\
 %<{status} %|N%>\
 %<(cur)>%| %>\
 %<{status} %|N%>\
-%<{replied}R%?{encrypted}E%| %>\
+%<{replied}R%| %>\
 %4(msg) \
 %<(mymbox{from})%<{to}To: %13(unquote(decode(friendly{to})))%>%>\
 %<(zero)%17(unquote(decode(friendly{from})))%> \
 %4(msg) \
 %<(mymbox{from})%<{to}To: %13(unquote(decode(friendly{to})))%>%>\
 %<(zero)%17(unquote(decode(friendly{from})))%> \
index 8e2cedf..4966228 100644 (file)
@@ -4,7 +4,7 @@
 %; format for scan, that doesn't do any RFC-2047 decoding of
 %; header components.
 %;
 %; format for scan, that doesn't do any RFC-2047 decoding of
 %; header components.
 %;
-%4(msg)%<(cur)+%| %>%<{replied}-%?{encrypted}E%| %>\
+%4(msg)%<(cur)+%| %>%<{replied}-%| %>\
 %02(mon{date})/%02(mday{date})%<{date} %|*%>\
 %<(mymbox{from})%<{to}To:%14(friendly{to})%>%>%<(zero)%17(friendly{from})%>  \
 %{subject}%<{body}<<%{body}>>%>
 %02(mon{date})/%02(mday{date})%<{date} %|*%>\
 %<(mymbox{from})%<{to}To:%14(friendly{to})%>%>%<(zero)%17(friendly{from})%>  \
 %{subject}%<{body}<<%{body}>>%>
index 9b48078..60ebbb2 100644 (file)
@@ -1,4 +1,4 @@
-%4(msg)%<(cur)+%| %>%<{replied}-%?{encrypted}E%| %>\
+%4(msg)%<(cur)+%| %>%<{replied}-%| %>\
 %02(mon{date})/%02(mday{date})%<{date} %|*%>\
 %5(size) \
 %<(mymbox{from})%<{to}To:%14(unquote(decode(friendly{to})))%>%>\
 %02(mon{date})/%02(mday{date})%<{date} %|*%>\
 %5(size) \
 %<(mymbox{from})%<{to}To:%14(unquote(decode(friendly{to})))%>%>\
index ff37628..9b082c1 100644 (file)
@@ -1,4 +1,4 @@
-%4(msg)%<(cur)+%| %>%<{replied}-%?{encrypted}E%| %>\
+%4(msg)%<(cur)+%| %>%<{replied}-%| %>\
 %02(mon{date})/%02(mday{date}) \
 %02(hour{date}):%02(min{date})%3(tzone{date})\
 %<{date} %|*%>\
 %02(mon{date})/%02(mday{date}) \
 %02(hour{date}):%02(min{date})%3(tzone{date})\
 %<{date} %|*%>\
index de09b8b..2d7aa9f 100644 (file)
@@ -1,4 +1,4 @@
-%4(msg)%<(cur)+%| %>%<{replied}-%?{encrypted}E%| %>\
+%4(msg)%<(cur)+%| %>%<{replied}-%| %>\
 %(void(rclock{date}))\
 %<(gt 15768000)%03(month{date})%(void(year{date}))%02(modulo 100)\
 %?(gt 604800)%02(mday{date})%03(month{date})\
 %(void(rclock{date}))\
 %<(gt 15768000)%03(month{date})%(void(year{date}))%02(modulo 100)\
 %?(gt 604800)%02(mday{date})%03(month{date})\
index 1b254d4..df7561c 100644 (file)
@@ -1,4 +1,4 @@
-%4(msg)%<(cur)+%| %>%<(unseen)U%| %>%<{replied}-%?{encrypted}E%| %>\
+%4(msg)%<(cur)+%| %>%<(unseen)U%| %>%<{replied}-%| %>\
 %02(mon{date})/%02(mday{date})%<{date} %|*%>\
 %<(mymbox{from})%<{to}To:%14(unquote(decode(friendly{to})))%>%>\
 %<(zero)%17(unquote(decode(friendly{from})))%>  \
 %02(mon{date})/%02(mday{date})%<{date} %|*%>\
 %<(mymbox{from})%<{to}To:%14(unquote(decode(friendly{to})))%>%>\
 %<(zero)%17(unquote(decode(friendly{from})))%>  \
index 0e723dc..eded036 100755 (executable)
@@ -85,12 +85,8 @@ L1:  LS_COMP, comp "replied"
        IF_S continue else goto L2
        CHAR '-'
        GOTO L3
        IF_S continue else goto L2
        CHAR '-'
        GOTO L3
-L2:    LS_COMP, comp "encrypted"
-       IF_S continue else goto L4
-       CHAR 'E'
-L3:    GOTO L5
-L4:    CHAR ' '
-L5:    PARSEDATE, c_name "date", c_type <DATE>
+L2:    CHAR ' '
+L3:    PARSEDATE, c_name "date", c_type <DATE>
        LV_MON, c_name "date", c_type <DATE>
        NUMF, width 2, fill '0'
        CHAR '/'
        LV_MON, c_name "date", c_type <DATE>
        NUMF, width 2, fill '0'
        CHAR '/'
@@ -98,35 +94,35 @@ L5: PARSEDATE, c_name "date", c_type <DATE>
        LV_MDAY, c_name "date", c_type <DATE>
        NUMF, width 2, fill '0'
        LS_COMP, comp "date", c_type <DATE>
        LV_MDAY, c_name "date", c_type <DATE>
        NUMF, width 2, fill '0'
        LS_COMP, comp "date", c_type <DATE>
-       IF_S continue else goto L6
+       IF_S continue else goto L4
        CHAR ' '
        CHAR ' '
-       GOTO L7
-L6:    CHAR '*'
-L7:    MYMBOX, c_name "from", c_type <ADDR>
+       GOTO L5
+L4:    CHAR '*'
+L5:    MYMBOX, c_name "from", c_type <ADDR>
        LV_COMPFLAG, comp "from", c_type <ADDR>
        LV_COMPFLAG, comp "from", c_type <ADDR>
-       IF_V_NE 0 continue else goto L8
+       IF_V_NE 0 continue else goto L6
        LS_COMP, comp "to", c_type <ADDR>
        LS_COMP, comp "to", c_type <ADDR>
-       IF_S continue else goto L8
+       IF_S continue else goto L6
        LIT "To:"
        PARSEADDR, c_name "to", c_type <ADDR>
        LS_FRIENDLY, c_name "to", c_type <ADDR>
        LS_DECODE
        STRF, width 14, fill ' '
        LIT "To:"
        PARSEADDR, c_name "to", c_type <ADDR>
        LS_FRIENDLY, c_name "to", c_type <ADDR>
        LS_DECODE
        STRF, width 14, fill ' '
-L8:    IF_V_EQ 0 continue else goto L9
+L6:    IF_V_EQ 0 continue else goto L7
        PARSEADDR, c_name "from", c_type <ADDR>
        LS_FRIENDLY, c_name "from", c_type <ADDR>
        LS_DECODE
        STRF, width 17, fill ' '
        PARSEADDR, c_name "from", c_type <ADDR>
        LS_FRIENDLY, c_name "from", c_type <ADDR>
        LS_DECODE
        STRF, width 17, fill ' '
-L9:    LIT "  "
+L7:    LIT "  "
        LS_COMP, comp "subject"
        LS_DECODE
        STR
        LS_COMP, comp "body"
        LS_COMP, comp "subject"
        LS_DECODE
        STR
        LS_COMP, comp "body"
-       IF_S continue else goto L10
+       IF_S continue else goto L8
        LIT "<<"
        COMP, comp "body"
        LIT ">>"
        LIT "<<"
        COMP, comp "body"
        LIT ">>"
-L10:   CHAR '\n'
+L8:    CHAR '\n'
        DONE
 EOF
 
        DONE
 EOF
 
@@ -146,12 +142,8 @@ L1:        LS_COMP, comp "replied"
        IF_S continue else goto L2
        CHAR '-'
        GOTO L3
        IF_S continue else goto L2
        CHAR '-'
        GOTO L3
-L2:    LS_COMP, comp "encrypted"
-       IF_S continue else goto L4
-       CHAR 'E'
-L3:    GOTO L5
-L4:    CHAR ' '
-L5:    PARSEDATE, c_name "date", c_type <DATE>
+L2:    CHAR ' '
+L3:    PARSEDATE, c_name "date", c_type <DATE>
        LV_MON, c_name "date", c_type <DATE>
        NUMF, width 2, fill '0'
        CHAR '/'
        LV_MON, c_name "date", c_type <DATE>
        NUMF, width 2, fill '0'
        CHAR '/'
@@ -159,37 +151,37 @@ L5:       PARSEDATE, c_name "date", c_type <DATE>
        LV_MDAY, c_name "date", c_type <DATE>
        NUMF, width 2, fill '0'
        LS_COMP, comp "date", c_type <DATE>
        LV_MDAY, c_name "date", c_type <DATE>
        NUMF, width 2, fill '0'
        LS_COMP, comp "date", c_type <DATE>
-       IF_S continue else goto L6
+       IF_S continue else goto L4
        CHAR ' '
        CHAR ' '
-       GOTO L7
-L6:    CHAR '*'
-L7:    MYMBOX, c_name "from", c_type <ADDR>
+       GOTO L5
+L4:    CHAR '*'
+L5:    MYMBOX, c_name "from", c_type <ADDR>
        LV_COMPFLAG, comp "from", c_type <ADDR>
        LV_COMPFLAG, comp "from", c_type <ADDR>
-       IF_V_NE 0 continue else goto L8
+       IF_V_NE 0 continue else goto L6
        LS_COMP, comp "to", c_type <ADDR>
        LS_COMP, comp "to", c_type <ADDR>
-       IF_S continue else goto L8
+       IF_S continue else goto L6
        LIT "To:"
        PARSEADDR, c_name "to", c_type <ADDR>
        LS_FRIENDLY, c_name "to", c_type <ADDR>
        LS_DECODE
        LS_UNQUOTE
        STRF, width 14, fill ' '
        LIT "To:"
        PARSEADDR, c_name "to", c_type <ADDR>
        LS_FRIENDLY, c_name "to", c_type <ADDR>
        LS_DECODE
        LS_UNQUOTE
        STRF, width 14, fill ' '
-L8:    IF_V_EQ 0 continue else goto L9
+L6:    IF_V_EQ 0 continue else goto L7
        PARSEADDR, c_name "from", c_type <ADDR>
        LS_FRIENDLY, c_name "from", c_type <ADDR>
        LS_DECODE
        LS_UNQUOTE
        STRF, width 17, fill ' '
        PARSEADDR, c_name "from", c_type <ADDR>
        LS_FRIENDLY, c_name "from", c_type <ADDR>
        LS_DECODE
        LS_UNQUOTE
        STRF, width 17, fill ' '
-L9:    LIT "  "
+L7:    LIT "  "
        LS_COMP, comp "subject"
        LS_DECODE
        STR
        LS_COMP, comp "body"
        LS_COMP, comp "subject"
        LS_DECODE
        STR
        LS_COMP, comp "body"
-       IF_S continue else goto L10
+       IF_S continue else goto L8
        LIT "<<"
        COMP, comp "body"
        LIT ">>"
        LIT "<<"
        COMP, comp "body"
        LIT ">>"
-L10:   CHAR '\n'
+L8:    CHAR '\n'
        DONE
 EOF
 
        DONE
 EOF
 
index e40b730..bac4442 100644 (file)
--- a/uip/inc.c
+++ b/uip/inc.c
@@ -655,7 +655,6 @@ main (int argc, char **argv)
                break;
 
            case SCNMSG:
                break;
 
            case SCNMSG:
-           case SCNENC:
            default:
                if (aud)
                    fputs (charstring_buffer (scanl), aud);
            default:
                if (aud)
                    fputs (charstring_buffer (scanl), aud);
@@ -717,7 +716,6 @@ main (int argc, char **argv)
                break;
 
            case SCNMSG:
                break;
 
            case SCNMSG:
-           case SCNENC:
                /*
                 *  Run the external program hook on the message.
                 */
                /*
                 *  Run the external program hook on the message.
                 */
@@ -799,7 +797,6 @@ main (int argc, char **argv)
                break;
 
            case SCNMSG:
                break;
 
            case SCNMSG:
-           case SCNENC:
            default:
                /*
                 *  Run the external program hook on the message.
            default:
                /*
                 *  Run the external program hook on the message.
index b999378..1287905 100644 (file)
@@ -195,7 +195,7 @@ main (int argc, char **argv)
                          hdrflag ? file : NULL, 0L, 1, &scanl);
            if (scanl)
                charstring_clear(scanl);
                          hdrflag ? file : NULL, 0L, 1, &scanl);
            if (scanl)
                charstring_clear(scanl);
-           if (state != SCNMSG && state != SCNENC)
+           if (state != SCNMSG)
                break;
        }
        charstring_free (scanl);
                break;
        }
        charstring_free (scanl);
@@ -283,7 +283,6 @@ main (int argc, char **argv)
                        msgnum == mp->curmsg, unseen,
                        folder, 0L, 1, &scanl)) {
                case SCNMSG: 
                        msgnum == mp->curmsg, unseen,
                        folder, 0L, 1, &scanl)) {
                case SCNMSG: 
-               case SCNENC: 
                case SCNERR: 
                    break;
 
                case SCNERR: 
                    break;
 
index 38b2ca4..8030715 100644 (file)
@@ -57,7 +57,7 @@ scan (FILE *inb, int innum, int outnum, char *nfs, int width, int curflg,
 {
     static bool deja_vu;
     static int tty_width;
 {
     static bool deja_vu;
     static int tty_width;
-    int i, compnum, encrypted, state;
+    int i, compnum, state;
     char *cp, *tmpbuf, *startbody, **nxtbuf;
     char *saved_c_text = NULL;
     struct comp *cptr;
     char *cp, *tmpbuf, *startbody, **nxtbuf;
     char *saved_c_text = NULL;
     struct comp *cptr;
@@ -96,9 +96,6 @@ scan (FILE *inb, int innum, int outnum, char *nfs, int width, int curflg,
        cptr = fmt_findcomp("folder");
        if (cptr && folder)
            cptr->c_text = mh_xstrdup(folder);
        cptr = fmt_findcomp("folder");
        if (cptr && folder)
            cptr->c_text = mh_xstrdup(folder);
-       if (fmt_addcompentry("encrypted")) {
-               ncomps++;
-       }
        cptr =  fmt_findcomp("dtimenow");
        if (cptr)
            cptr->c_text = getcpy(dtimenow (0));
        cptr =  fmt_findcomp("dtimenow");
        if (cptr)
            cptr->c_text = getcpy(dtimenow (0));
@@ -343,9 +340,6 @@ finished:
     if (noisy)
        fputs (charstring_buffer (*scanl), stdout);
 
     if (noisy)
        fputs (charstring_buffer (*scanl), stdout);
 
-    cptr = fmt_findcomp ("encrypted");
-    encrypted = cptr && cptr->c_text;
-
     /* return dynamically allocated buffers to pool */
     while ((cptr = *savecomp++)) {
        cptr->c_text = NULL;
     /* return dynamically allocated buffers to pool */
     while ((cptr = *savecomp++)) {
        cptr->c_text = NULL;
@@ -354,7 +348,7 @@ finished:
     if (scnout && (ferror(scnout) || fclose (scnout) == EOF))
        DIEWRERR();
 
     if (scnout && (ferror(scnout) || fclose (scnout) == EOF))
        DIEWRERR();
 
-    return state != FILEEOF ? SCNERR : encrypted ? SCNENC : SCNMSG;
+    return state != FILEEOF ? SCNERR : SCNMSG;
 }
 
 
 }
 
 
index a7c8aed..cb2c060 100644 (file)
@@ -4,7 +4,6 @@
  * COPYRIGHT file in the root directory of the nmh distribution for
  * complete copyright information. */
 
  * COPYRIGHT file in the root directory of the nmh distribution for
  * complete copyright information. */
 
-#define        SCNENC  2               /* message just fine, but encrypted(!!) */
 #define        SCNMSG  1               /* message just fine                    */
 #define        SCNEOF  0               /* empty message                        */
 #define        SCNERR  (-1)            /* error message                        */
 #define        SCNMSG  1               /* message just fine                    */
 #define        SCNEOF  0               /* empty message                        */
 #define        SCNERR  (-1)            /* error message                        */
 
 #ifndef        UK
 #define        FORMAT  \
 
 #ifndef        UK
 #define        FORMAT  \
-"%4(msg)%<(cur)+%| %>%<{replied}-%?{encrypted}E%| %>\
+"%4(msg)%<(cur)+%| %>%<{replied}-%| %>\
 %02(mon{date})/%02(mday{date})%<{date} %|*%>\
 %<(mymbox{from})%<{to}To:%14(decode(friendly{to}))%>%>\
 %<(zero)%17(decode(friendly{from}))%>  \
 %(decode{subject})%<{body}<<%{body}>>%>\n"
 #else
 #define        FORMAT  \
 %02(mon{date})/%02(mday{date})%<{date} %|*%>\
 %<(mymbox{from})%<{to}To:%14(decode(friendly{to}))%>%>\
 %<(zero)%17(decode(friendly{from}))%>  \
 %(decode{subject})%<{body}<<%{body}>>%>\n"
 #else
 #define        FORMAT  \
-"%4(msg)%<(cur)+%| %>%<{replied}-%?{encrypted}E%| %>\
+"%4(msg)%<(cur)+%| %>%<{replied}-%| %>\
 %02(mday{date})/%02(mon{date})%<{date} %|*%>\
 %<(mymbox{from})%<{to}To:%14(decode(friendly{to}))%>%>\
 %<(zero)%17(decode(friendly{from}))%>  \
 %02(mday{date})/%02(mon{date})%<{date} %|*%>\
 %<(mymbox{from})%<{to}To:%14(decode(friendly{to}))%>%>\
 %<(zero)%17(decode(friendly{from}))%>  \