From 93bfd04eb412391ac39e8193b253e8e12e4ace96 Mon Sep 17 00:00:00 2001 From: Thomas Roessler Date: Sat, 8 Jan 2000 09:06:37 +0000 Subject: [PATCH] Undo Michaels "pgpsearchext" patch. --- init.h | 12 ------------ mutt.h | 1 - parse.c | 44 -------------------------------------------- 3 files changed, 57 deletions(-) diff --git a/init.h b/init.h index 189d6e51b..318cb6f62 100644 --- a/init.h +++ b/init.h @@ -1306,18 +1306,6 @@ struct option_t MuttVars[] = { { "forw_decrypt", DT_SYN, R_NONE, UL "forward_decrypt", 0 }, /* */ - { "pgp_search_text", DT_BOOL, R_NONE, OPTPGPSEARCHTEXT, 0 }, - /* - ** .pp - ** Controls whether Mutt will search text/plain messages for old style - ** PGP message which are not properly labled using MIME header fields. - ** If the first non-blank line in a message contains "-----BEGIN PGP" - ** it will be assumed that it is an aplication/pgp content-type. - ** NOTE: this option should only be used as a last resort when procmail - ** is not available on your system. See doc/PGP-notes.txt for the - ** recommended way to handle old-style messages. Using this option may - ** lead to longer time required to parse your mailbox. - */ #endif /* _PGPPATH */ #ifdef USE_SSL diff --git a/mutt.h b/mutt.h index 710699218..9e03e71c7 100644 --- a/mutt.h +++ b/mutt.h @@ -360,7 +360,6 @@ enum OPTPGPSTRICTENC, OPTFORWDECRYPT, OPTPGPSHOWUNUSABLE, - OPTPGPSEARCHTEXT, #endif /* pseudo options */ diff --git a/parse.c b/parse.c index 52f9d970f..93b3854c2 100644 --- a/parse.c +++ b/parse.c @@ -1266,50 +1266,6 @@ ENVELOPE *mutt_read_rfc822_header (FILE *f, HEADER *hdr, short user_hdrs, dprint(1,(debugfile,"read_rfc822_header(): no date found, using received time from msg separator\n")); hdr->date_sent = hdr->received; } - -#ifdef _PGPPATH - if (option (OPTPGPSEARCHTEXT) && hdr->content->type == TYPETEXT && - !strcasecmp("plain",hdr->content->subtype)) - { - char scratch[LONG_STRING]; - - /* continue reading until we hit the first line of text in the message. - we check here to see if this might be an old-style PGP message - which is not properly labeled */ - - /* save this location so we can return here */ - loc = ftell (f); - - while (fgets (scratch, sizeof (scratch), f) != NULL) - { - p = scratch; - SKIPWS (p); - if (*p != '\n') - { - /* we got a non-empty line, check it */ - if (!strncmp ("-----BEGIN PGP", scratch, 14)) - { - /* yes, this looks like an old style pgp message, alter - the apparent content-type so that we handle this - corrrectly */ - hdr->content->type = TYPEAPPLICATION; - FREE (&hdr->content->subtype); - hdr->content->subtype = safe_strdup ("pgp"); - mutt_free_parameter (&hdr->content->parameter); - mutt_set_parameter ("format", "text", &hdr->content->parameter); - /* check to see what type of PGP message we have */ - mutt_set_parameter ("x-action", - !strncmp (" SI", scratch + 14, 3) ? "sign" : "encrypt", - &hdr->content->parameter); - } - break; - } - } - - /* return to where we ended before */ - fseek (f, loc, SEEK_SET); - } -#endif /* _PGPPATH */ } return (e); -- 2.40.0