From: markus schnalke Date: Mon, 13 Feb 2012 13:16:45 +0000 (+0100) Subject: Removed support for Encrypted: headers, which were removed in RFC 2822. X-Git-Tag: mmh-thesis-end~295 X-Git-Url: http://git.marmaro.de/?p=mmh;a=commitdiff_plain;h=064527f7b57ab050e5af13e15ad99aeeab125857 Removed support for Encrypted: headers, which were removed in RFC 2822. This is a relict from RFC 822. --- diff --git a/etc/scan.MMDDYY b/etc/scan.MMDDYY index 942ddcc..6d83b64 100644 --- a/etc/scan.MMDDYY +++ b/etc/scan.MMDDYY @@ -3,7 +3,7 @@ %; 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(decode(friendly{to}))%>%>\ %<(zero)%17(decode(friendly{from}))%> \ diff --git a/etc/scan.YYYYMMDD b/etc/scan.YYYYMMDD index e91bcb1..efe63d3 100644 --- a/etc/scan.YYYYMMDD +++ b/etc/scan.YYYYMMDD @@ -3,7 +3,7 @@ %; 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(decode(friendly{to}))%>%>\ %<(zero)%17(decode(friendly{from}))%> \ diff --git a/etc/scan.mailx b/etc/scan.mailx index 27d18d3..4f00a3c 100644 --- a/etc/scan.mailx +++ b/etc/scan.mailx @@ -1,6 +1,6 @@ %<(cur)>%| %>\ %<{status} %|N%>\ -%<{replied}R%?{encrypted}E%| %>\ +%<{replied}R%| %>\ %4(msg) \ %<(mymbox{from})%<{to}To: %13(decode(friendly{to}))%>%>\ %<(zero)%17(decode(friendly{from}))%> \ diff --git a/etc/scan.nmh b/etc/scan.nmh index b15a281..019bc3e 100644 --- a/etc/scan.nmh +++ b/etc/scan.nmh @@ -2,7 +2,7 @@ %; %; This is nmh's default format string (for non-UK sites). %; -%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}))%> \ diff --git a/etc/scan.nomime b/etc/scan.nomime index 145e73f..c6ead71 100644 --- a/etc/scan.nomime +++ b/etc/scan.nomime @@ -4,7 +4,7 @@ %; 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} diff --git a/etc/scan.size b/etc/scan.size index 5f35b36..d595f7a 100644 --- a/etc/scan.size +++ b/etc/scan.size @@ -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(decode(friendly{to}))%>%>\ diff --git a/etc/scan.time b/etc/scan.time index 4c58133..99df666 100644 --- a/etc/scan.time +++ b/etc/scan.time @@ -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} %|*%>\ diff --git a/etc/scan.timely b/etc/scan.timely index 54f6d0a..d8e07be 100644 --- a/etc/scan.timely +++ b/etc/scan.timely @@ -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})\ diff --git a/etc/scan.unseen b/etc/scan.unseen index 2cd0b82..ba1fee3 100644 --- a/etc/scan.unseen +++ b/etc/scan.unseen @@ -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(decode(friendly{to}))%>%>\ %<(zero)%17(decode(friendly{from}))%> \ diff --git a/h/scansbr.h b/h/scansbr.h index bf2e88f..b07feef 100644 --- a/h/scansbr.h +++ b/h/scansbr.h @@ -4,7 +4,6 @@ extern char *scanl; -#define SCNENC 2 /* message just fine, but encrypted(!!) */ #define SCNMSG 1 /* message just fine */ #define SCNEOF 0 /* empty message */ #define SCNERR (-1) /* error message */ @@ -15,7 +14,7 @@ extern char *scanl; ** default format for `scan' and `inc' */ # define FORMAT \ -"=%4(msg)%<(cur)+%| %>%<{replied}-%?{encrypted}E%| %>\ +"=%4(msg)%<(cur)+%| %>%<{replied}-%| %>\ %4(year{date})-%02(mon{date})-%02(mday{date}) \ %<(mymbox{from})%<{to}To:%14(decode(friendly{to}))%>%>\ %<(zero)%17(decode(friendly{from}))%> %(decode{subject})\n" diff --git a/man/mh-format.man5 b/man/mh-format.man5 index dccedad..b292586 100644 --- a/man/mh-format.man5 +++ b/man/mh-format.man5 @@ -399,15 +399,14 @@ The first part is: .PP .RS .nf -%4(msg)%<(cur)+%| %>%<{replied}\-%?{encrypted}E%| %> +%4(msg)%<(cur)+%| %>%<{replied}\-%| %> .fi .RE .PP which says that the message number should be printed in four digits. If the message is the current message then a `+' else a space should be printed; if a \*(lqReplied:\*(rq field is present then a `\-' -else if an \*(lqEncrypted:\*(rq field is present then an `E' otherwise -a space should be printed. Next: +else a space should be printed. Next: .PP .RS .nf diff --git a/uip/inc.c b/uip/inc.c index b48c9ea..04572c0 100644 --- a/uip/inc.c +++ b/uip/inc.c @@ -412,7 +412,6 @@ main(int argc, char **argv) break; case SCNMSG: - case SCNENC: /* ** Run the external program hook on the message. */ diff --git a/uip/mhstoresbr.c b/uip/mhstoresbr.c index aa95dd8..6a0cf04 100644 --- a/uip/mhstoresbr.c +++ b/uip/mhstoresbr.c @@ -825,7 +825,7 @@ losing: break; default: - if (!uprf(buffer, XXX_FIELD_PRF) && !uprf(buffer, VRSN_FIELD) && !uprf(buffer, "Subject:") && !uprf(buffer, "Encrypted:") && !uprf(buffer, "Message-ID:")) { + if (!uprf(buffer, XXX_FIELD_PRF) && !uprf(buffer, VRSN_FIELD) && !uprf(buffer, "Subject:") && !uprf(buffer, "Message-ID:")) { filterstate = -1; buffer[0] = 0; break; @@ -1063,7 +1063,6 @@ copy_some_headers(FILE *out, CT ct) if (!uprf(hp->name, XXX_FIELD_PRF) && mh_strcasecmp(hp->name, VRSN_FIELD) && mh_strcasecmp(hp->name, "Subject") && - mh_strcasecmp(hp->name, "Encrypted") && mh_strcasecmp(hp->name, "Message-ID")) fprintf(out, "%s:%s", hp->name, hp->value); hp = hp->next; /* next header field */ diff --git a/uip/scan.c b/uip/scan.c index d5cc50f..1520553 100644 --- a/uip/scan.c +++ b/uip/scan.c @@ -129,7 +129,7 @@ main(int argc, char **argv) for (msgnum = 1; ; ++msgnum) { state = scan(in, msgnum, -1, nfs, width, 0, 0, NULL, 0L, 1); - if (state != SCNMSG && state != SCNENC) + if (state != SCNMSG) break; } fclose(in); @@ -210,7 +210,6 @@ main(int argc, char **argv) msgnum == mp->curmsg, unseen, folder, 0L, 1)) { case SCNMSG: - case SCNENC: case SCNERR: break; diff --git a/uip/scansbr.c b/uip/scansbr.c index a43044c..4b71243 100644 --- a/uip/scansbr.c +++ b/uip/scansbr.c @@ -71,7 +71,7 @@ int scan(FILE *inb, int innum, int outnum, char *nfs, int width, int curflg, int unseen, char *folder, long size, int noisy) { - int i, compnum, encrypted, state; + int i, compnum, state; unsigned char *cp, *tmpbuf; char **nxtbuf; char *saved_c_text = NULL; @@ -109,14 +109,6 @@ scan(FILE *inb, int innum, int outnum, char *nfs, int width, int curflg, FINDCOMP(cptr, "folder"); if (cptr && folder) cptr->c_text = folder; - FINDCOMP(cptr, "encrypted"); - if (!cptr) - if ((cptr = (struct comp *)calloc(1, sizeof(*cptr)))) { - cptr->c_name = "encrypted"; - cptr->c_next = wantcomp[i = CHASH(cptr->c_name)]; - wantcomp[i] = cptr; - ncomps++; - } FINDCOMP(cptr, "dtimenow"); if (cptr) cptr->c_text = getcpy(dtimenow(0)); @@ -348,9 +340,6 @@ finished: if (noisy) fputs(scanl, stdout); - FINDCOMP(cptr, "encrypted"); - encrypted = cptr && cptr->c_text; - /* return dynamically allocated buffers to pool */ while ((cptr = *savecomp++)) { *--nxtbuf = cptr->c_text; @@ -361,7 +350,7 @@ finished: if (outnum && (ferror(scnout) || fclose(scnout) == EOF)) DIEWRERR(); - return (state != FILEEOF ? SCNERR : encrypted ? SCNENC : SCNMSG); + return (state != FILEEOF ? SCNERR : SCNMSG); } static int