X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=lib-crypt%2Fpgpkey.c;h=96db58a5cb0993f7b33eba080a93f6fe2eab3146;hb=4956024f0d540c5dd689444113307fa7f9dd4067;hp=b1ded7c5d36db0ceef5a3b920f4f7816e352e122;hpb=38dacbf03fe1a0daa9ce426caaef5582b90006b2;p=apps%2Fmadmutt.git diff --git a/lib-crypt/pgpkey.c b/lib-crypt/pgpkey.c index b1ded7c..96db58a 100644 --- a/lib-crypt/pgpkey.c +++ b/lib-crypt/pgpkey.c @@ -235,11 +235,10 @@ pgp_entry_fmt (char *dest, ssize_t destlen, char op, *dest = '\0'; } - if (optional) - m_strformat (dest, destlen, ifstr, mutt_attach_fmt, data, 0); - else if (flags & M_FORMAT_OPTIONAL) - m_strformat (dest, destlen, elstr, mutt_attach_fmt, data, 0); - return (src); + if (flags & M_FORMAT_OPTIONAL) + m_strformat(dest, destlen, 0, optional ? ifstr : elstr, + mutt_attach_fmt, data, 0); + return src; } static void pgp_entry (char *s, ssize_t l, MUTTMENU * menu, int num) @@ -250,8 +249,7 @@ static void pgp_entry (char *s, ssize_t l, MUTTMENU * menu, int num) entry.uid = KeyTable[num]; entry.num = num + 1; - m_strformat(s, l, NONULL (PgpEntryFormat), pgp_entry_fmt, - (void*)&entry, + m_strformat(s, l, COLS - SW, PgpEntryFormat, pgp_entry_fmt, &entry, option(OPTARROWCURSOR) ? M_FORMAT_ARROWCURSOR : 0); } @@ -507,7 +505,7 @@ static pgp_key_t pgp_select_key (pgp_key_t keys, address_t * p, const char *s) break; } - fp = m_tempfile (tempfile, sizeof(tempfile), NONULL(Tempdir), NULL); + fp = m_tempfile (tempfile, sizeof(tempfile), NONULL(MCore.tmpdir), NULL); if (!fp) { m_fclose(&devnull); mutt_perror (_("Can't create temporary file")); @@ -684,7 +682,7 @@ BODY *pgp_make_key_attachment (char *tempf) pgp_free_key (&key); if (!tempf) { - tempfp = m_tempfile (tempfb, sizeof(tempfb), NONULL(Tempdir), NULL); + tempfp = m_tempfile (tempfb, sizeof(tempfb), NONULL(MCore.tmpdir), NULL); tempf = tempfb; } else { tempfp = safe_fopen(tempf, "a");