changeset: 6809:0ce5f9bff1fd user: Kevin McCarthy <[email protected]> date: Sat Oct 08 12:56:22 2016 -0700 link: http://dev.mutt.org/hg/mutt/rev/0ce5f9bff1fd
automatic post-release commit for mutt-1.7.1 changeset: 6810:e8d9ae6f41d3 user: Kevin McCarthy <[email protected]> date: Sat Oct 08 12:56:33 2016 -0700 link: http://dev.mutt.org/hg/mutt/rev/e8d9ae6f41d3 Added tag mutt-1-7-1-rel for changeset 0ce5f9bff1fd changeset: 6811:58f4b38312bf user: Kevin McCarthy <[email protected]> date: Sat Oct 08 12:57:57 2016 -0700 link: http://dev.mutt.org/hg/mutt/rev/58f4b38312bf mutt-1.7.1 signed changeset: 6812:4bcc3a12cc4d user: Kevin McCarthy <[email protected]> date: Sat Oct 08 13:24:00 2016 -0700 link: http://dev.mutt.org/hg/mutt/rev/4bcc3a12cc4d merge stable diffs (truncated from 7449 to 950 lines): diff -r 5c5848dfa4ea -r 4bcc3a12cc4d .hgsigs --- a/.hgsigs Tue Oct 04 11:13:24 2016 -0700 +++ b/.hgsigs Sat Oct 08 13:24:00 2016 -0700 @@ -12,3 +12,4 @@ 1ef1e39a7218704ebd715ffc8d29079ae7f63061 0 iQIcBAABCgAGBQJXJSLcAAoJEK3vdoSAMWvak3UP/1aspHpsP/TpvqvCwg/1xhrOi5EJNCzshz+8d/hvVSiK1HELcTUL84LuRmgPGWDuxo1BQ1/v31OCvdM0i9N3PySFpC81K0H2fwCoox8sL4gc9cDXeBy0kvwg0cHim/41JhQxVXjml53MmMhWO8arJgie+PX3ikU9JL1bctd6hqZkuaR6Gix/GX0/Hh07aJwooFFI3c/JIU12DkSy3WE7r2e7Z6x6EV8i9m+8So64/k7vA8ndQLzz8he915B0U8TlGjqGHM2t2t7eLhdKwD+ND4WgACyOU3gjOavNWYOgRC0S6RUd2QAfxHynJ0BQ85VAcTIBx69pN1J05d+/BKCHggn5JpxXs/GpoLlSeMZKCEvjc77PW3pFC5HKLkOHbcpwA1wXkvTA8+g6+1CvfU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yvGnGNK2sFjlFu69zd7jYOnuBpshVBIDhWT7Ay/Bw0x5WFUUshLHPwdNYz/LI9ZeQ2/AQh7aKTze2tCH60OaLqoGdNKSTML962qsRA6d2g1Ww8s6ril2prWyA0pb4EOII4OtaySYA5TCgE4fGh0Nruv78XHGN2B/xI7dugCHUrLQ90yhbOCN7L3YigJkPRiq4AagzR3je+q2q8MImkuM2DiH4KFg7uWFyYZqn0WHM5Rv25/eLb0lOg0QOZIR98yuAJhAb38dd6oPGI1DSWn8QzTF4aXKoAgDe0Fec/goZBf15qYFmfw04upyCjswOAgHWSfHS6szTiq9tWpcH4MxlDZ68B3yvZhln3Kmp0MgyOqKqR7RUBuquVs2V diff -r 5c5848dfa4ea -r 4bcc3a12cc4d .hgtags --- a/.hgtags Tue Oct 04 11:13:24 2016 -0700 +++ b/.hgtags Sat Oct 08 13:24:00 2016 -0700 @@ -104,3 +104,4 @@ 1ef1e39a7218704ebd715ffc8d29079ae7f63061 mutt-1-6-1-rel 7ccd4417bd70373d873c5f9d38e4d22aa5df9afe mutt-1-6-2-rel a4e83f60e42f80599e71df90bfc69db4704e5f97 mutt-1-7-rel +0ce5f9bff1fdfe86c91109312329c7e8849b347b mutt-1-7-1-rel diff -r 5c5848dfa4ea -r 4bcc3a12cc4d ChangeLog --- a/ChangeLog Tue Oct 04 11:13:24 2016 -0700 +++ b/ChangeLog Sat Oct 08 13:24:00 2016 -0700 @@ -1,3 +1,161 @@ +2016-10-04 11:13 -0700 Kevin McCarthy <[email protected]> (5c5848dfa4ea) + + * muttlib.c: Preserve forwarded attachment names in d_filename. + + When forwarding an attachment with an non-ascii name, + mutt_copy_body() mangles the filename when calling mutt_adv_mktemp. + Preserve the original attachment filename in d_filename. + + Remove the double copy of b->filename, which is a memory leak. + +2016-09-25 13:11 -0700 Kevin McCarthy <[email protected]> (586dad383893) + + * parse.c: Reset invalid parsed received dates to 0. (closes #3878) + + The actual problem in the ticket would be solved by d3f31cf9239e + (see #3798). However there is still the bug that Mutt considers a + (hdr->received != 0) to be set and usable, despite not checking the + return value of mutt_parse_date(). + + Change mutt_read_rfc822_header() to unset an invalid received value + back to 0. We don't do this inside mutt_read_rfc822_line() because + that would cause the next received line to be parsed. + +2016-09-21 18:10 -0700 Antonio Radici <[email protected]> (ee0fe5834195) + + * po/de.po, po/es.po, po/it.po: Mark some gpgme pgp menu keybinding + translations as fuzzy. (closes #3874) + + Some translations for crypt-gpgme.c are marked as fuzzy but the + keybindings attached to these translations are not, this creates + confusions for the users who see the english message but have the + keybindings for a message in their own language available. + + As long as the translations are fuzzy, the keybindings should stay + fuzzy. + +2016-09-21 22:51 +0200 Kevin McCarthy <[email protected]> (9f6e08ba6ff3) + + * mx.c: Check for NULL mx_ops in mx.c + + Eike Rathke reported this happening when in an IMAP index view the + underlying connection was terminated, ctx->mx_ops was NULL and thus + accessing ctx->mx_ops->check segfaulted. + + Thanks also to Eike Rathke for the initial patch, for which I + expanded the checks to other functions. + +2016-09-20 13:58 -0700 Antonio Radici <[email protected]> (8ed017079800) + + * crypt-gpgme.c: Fix gpgme segfault when querying candidates with a + '+' in the address. (closes #3873) + + list_to_pattern() was not allocating enough space for the '+' to + '%2B' transformation. + +2016-09-07 18:54 -0700 Kevin McCarthy <[email protected]> (a431c7618def) + + * doc/manual.xml.head, init.h: Fix sidebar documentation a bit. + (closes #3859) + + Sidebar_whitelist is a command, not a variable. Also add a blurb + about what it does. + + Fix the sort order for $sidebar_divider_char and + $sidebar_delim_chars. + +2016-09-05 18:50 -0700 Kevin McCarthy <[email protected]> (cd127a968399) + + * contrib/Makefile.am: Add missing sidebar contrib sample files to + dist tarball. + + I previously added the files, but neglected to add them to the + contrib/Makefile.am file. + + Thanks to isdtor for pointing out the problem and for the original + patch. + +2016-09-05 12:35 -0700 Kevin McCarthy <[email protected]> (bb25613ce8a4) + + * getdomain.c: Stub out getdnsdomainname() unless HAVE_GETADDRINFO. + + It seems unlikely there are systems without it (given that this + mistake has been in since 1.6.0), but for correctness we should stub + out the function for those without it. + +2016-09-05 12:22 -0700 Kevin McCarthy <[email protected]> (90c1b756d87d) + + * configure.ac: Autoconf: always check for getaddrinfo(). + + The getdnsdomainname() function introduced in 1.6.0 uses + getaddrinfo(). + + Pull the dependency checks for libnsl, libsocket, and getaddrinfo() + outside of the "need_socket" block, so they are always checked for. + +2016-09-04 18:50 -0700 Guilhem Moulin <[email protected]> (b082bcd5d5e2) + + * pgppubring.c: Fix pgpring reporting of DSA and Elgamal key lengths. + (closes #3867) + + Patch provided by Guilhem Moulin from an original idea of Fabrizio + Tarizzo. + + The key length is always the length of the first MPI for RSA, DSA, + and Elgamal. + +2016-09-02 19:32 -0700 Kevin McCarthy <[email protected]> (ba5d900a90db) + + * doc/manual.xml.head, pattern.c: Disable ~X when message scoring. + (closes #3861) + + mutt_score_message() purposely passes a NULL context to + mutt_pattern_exec(). The idea was to block slow patterns, and the + scoring documentation notes this by saying: + + "For efficiency reasons, patterns which scan information not + available in the index, such as ~b, ~B or ~h, may not be used" + + ~X needs the context to parse the messages (during message scoring + at least), and thus isn't suitable for message scoring either. + + Block ~X from being used when the context is NULL. Add ~X to the + list of patterns noted as unusable in the message scoring + documentation. + +2016-09-02 16:20 -0700 Kevin McCarthy <[email protected]> (eef1e8abc46f) + + * browser.c: Increase date buffer size for $folder_format. (closes + #3863) + + The buffer size of 16 was sufficient to hold the %d format, but not + for using %D. Change to use a SHORT_STRING. + + Thanks to Ian Zimmerman for the original patch, and to Antonio + Radici for forwarding it on to us. + +2016-08-17 20:17 -0700 Kevin McCarthy <[email protected]> (328e1a32034b) + + * sys_socket.h: merge default into stable + +2016-08-17 20:14 -0700 Kevin McCarthy <[email protected]> (e5fcfc5f9c2e) + + * .hgsigs: mutt-1.7.0 signed + +2016-08-17 20:12 -0700 Kevin McCarthy <[email protected]> (be1a70b1c080) + + * .hgtags: Added tag mutt-1-7-rel for changeset a4e83f60e42f + +2016-08-17 20:12 -0700 Kevin McCarthy <[email protected]> (a4e83f60e42f) + + * ChangeLog, UPDATING, VERSION, po/bg.po, po/ca.po, po/cs.po, + po/da.po, po/de.po, po/el.po, po/eo.po, po/es.po, po/et.po, + po/eu.po, po/fr.po, po/ga.po, po/gl.po, po/hu.po, po/id.po, + po/it.po, po/ja.po, po/ko.po, po/lt.po, po/nl.po, po/pl.po, + po/pt_BR.po, po/ru.po, po/sk.po, po/sv.po, po/tr.po, po/uk.po, + po/zh_CN.po, po/zh_TW.po: automatic post-release commit for + mutt-1.7.0 + 2016-08-17 18:07 -0700 TAKAHASHI Tamotsu <[email protected]> (c513c311026f) * po/ja.po: Updated Japanese translation. diff -r 5c5848dfa4ea -r 4bcc3a12cc4d UPDATING --- a/UPDATING Tue Oct 04 11:13:24 2016 -0700 +++ b/UPDATING Sat Oct 08 13:24:00 2016 -0700 @@ -4,6 +4,10 @@ The keys used are: !: modified feature, -: deleted feature, +: new feature +1.7.1 (2016-10-08): + + ! Bug fix release. No features were modified or added. + 1.7.0 (2016-08-18): ! Improved alignment when using multi-column characters with diff -r 5c5848dfa4ea -r 4bcc3a12cc4d VERSION --- a/VERSION Tue Oct 04 11:13:24 2016 -0700 +++ b/VERSION Sat Oct 08 13:24:00 2016 -0700 @@ -1,1 +1,1 @@ -1.7.0 +1.7.1 diff -r 5c5848dfa4ea -r 4bcc3a12cc4d browser.c --- a/browser.c Tue Oct 04 11:13:24 2016 -0700 +++ b/browser.c Sat Oct 08 13:24:00 2016 -0700 @@ -176,11 +176,12 @@ tnow = time (NULL); t_fmt = tnow - folder->ff->mtime < 31536000 ? "%b %d %H:%M" : "%b %d %Y"; } - if (do_locales) - setlocale(LC_TIME, NONULL (Locale)); /* use environment if $locale is not set */ - else - setlocale(LC_TIME, "C"); - strftime (date, sizeof (date), t_fmt, localtime (&folder->ff->mtime)); + + if (!do_locales) + setlocale (LC_TIME, "C"); + strftime (date, sizeof (date), t_fmt, localtime (&folder->ff->mtime)); + if (!do_locales) + setlocale (LC_TIME, ""); mutt_format_s (dest, destlen, fmt, date); } diff -r 5c5848dfa4ea -r 4bcc3a12cc4d configure.ac --- a/configure.ac Tue Oct 04 11:13:24 2016 -0700 +++ b/configure.ac Sat Oct 08 13:24:00 2016 -0700 @@ -689,13 +689,16 @@ crypto_libs="" AC_CHECK_LIB(z, deflate, [crypto_libs=-lz]) - AC_CHECK_LIB(crypto, X509_new, - [crypto_libs="-lcrypto $crypto_libs"],, [$crypto_libs]) + AC_CHECK_LIB(crypto, X509_STORE_CTX_new, + [crypto_libs="-lcrypto $crypto_libs"], + AC_MSG_ERROR([Unable to find SSL library]), [$crypto_libs]) AC_CHECK_LIB(ssl, SSL_new,, AC_MSG_ERROR([Unable to find SSL library]), [$crypto_libs]) LIBS="$LIBS $crypto_libs" AC_CHECK_FUNCS(RAND_status RAND_egd) + AC_CHECK_DECLS([SSL_set_mode, SSL_MODE_AUTO_RETRY],, + AC_MSG_ERROR([Unable to find decent SSL header]), [[#include <openssl/ssl.h>]]) AC_DEFINE(USE_SSL,1,[ Define if you want support for SSL. ]) AC_DEFINE(USE_SSL_OPENSSL,1,[ Define if you want support for SSL via OpenSSL. ]) diff -r 5c5848dfa4ea -r 4bcc3a12cc4d crypt-gpgme.c --- a/crypt-gpgme.c Tue Oct 04 11:13:24 2016 -0700 +++ b/crypt-gpgme.c Sat Oct 08 13:24:00 2016 -0700 @@ -869,14 +869,12 @@ { char p[STRING]; - setlocale (LC_TIME, ""); #ifdef HAVE_LANGINFO_D_T_FMT strftime (p, sizeof (p), nl_langinfo (D_T_FMT), localtime (&t)); #else strftime (p, sizeof (p), "%c", localtime (&t)); #endif - setlocale (LC_TIME, "C"); - state_attach_puts (p, s); + state_puts (p, s); } /* @@ -1141,7 +1139,7 @@ if ((sum & GPGME_SIGSUM_KEY_REVOKED)) { - state_attach_puts (_("Warning: One of the keys has been revoked\n"),s); + state_puts (_("Warning: One of the keys has been revoked\n"),s); severe = 1; } @@ -1150,13 +1148,13 @@ time_t at = key->subkeys->expires ? key->subkeys->expires : 0; if (at) { - state_attach_puts (_("Warning: The key used to create the " + state_puts (_("Warning: The key used to create the " "signature expired at: "), s); print_time (at , s); - state_attach_puts ("\n", s); + state_puts ("\n", s); } else - state_attach_puts (_("Warning: At least one certification key " + state_puts (_("Warning: At least one certification key " "has expired\n"), s); } @@ -1172,29 +1170,29 @@ sig = sig->next, i++) ; - state_attach_puts (_("Warning: The signature expired at: "), s); + state_puts (_("Warning: The signature expired at: "), s); print_time (sig ? sig->exp_timestamp : 0, s); - state_attach_puts ("\n", s); + state_puts ("\n", s); } if ((sum & GPGME_SIGSUM_KEY_MISSING)) - state_attach_puts (_("Can't verify due to a missing " + state_puts (_("Can't verify due to a missing " "key or certificate\n"), s); if ((sum & GPGME_SIGSUM_CRL_MISSING)) { - state_attach_puts (_("The CRL is not available\n"), s); + state_puts (_("The CRL is not available\n"), s); severe = 1; } if ((sum & GPGME_SIGSUM_CRL_TOO_OLD)) { - state_attach_puts (_("Available CRL is too old\n"), s); + state_puts (_("Available CRL is too old\n"), s); severe = 1; } if ((sum & GPGME_SIGSUM_BAD_POLICY)) - state_attach_puts (_("A policy requirement was not met\n"), s); + state_puts (_("A policy requirement was not met\n"), s); if ((sum & GPGME_SIGSUM_SYS_ERROR)) { @@ -1203,7 +1201,7 @@ gpgme_signature_t sig; unsigned int i; - state_attach_puts (_("A system error occurred"), s ); + state_puts (_("A system error occurred"), s ); /* Try to figure out some more detailed system error information. */ result = gpgme_op_verify_result (ctx); @@ -1218,17 +1216,17 @@ if (t0 || t1) { - state_attach_puts (": ", s); + state_puts (": ", s); if (t0) - state_attach_puts (t0, s); + state_puts (t0, s); if (t1 && !(t0 && !strcmp (t0, t1))) { if (t0) - state_attach_puts (",", s); - state_attach_puts (t1, s); + state_puts (",", s); + state_puts (t1, s); } } - state_attach_puts ("\n", s); + state_puts ("\n", s); } #ifdef HAVE_GPGME_PKA_TRUST @@ -1237,16 +1235,16 @@ { if (sig->pka_trust == 1 && sig->pka_address) { - state_attach_puts (_("WARNING: PKA entry does not match " + state_puts (_("WARNING: PKA entry does not match " "signer's address: "), s); - state_attach_puts (sig->pka_address, s); - state_attach_puts ("\n", s); + state_puts (sig->pka_address, s); + state_puts ("\n", s); } else if (sig->pka_trust == 2 && sig->pka_address) { - state_attach_puts (_("PKA verified signer's address is: "), s); - state_attach_puts (sig->pka_address, s); - state_attach_puts ("\n", s); + state_puts (_("PKA verified signer's address is: "), s); + state_puts (sig->pka_address, s); + state_puts ("\n", s); } } @@ -1303,7 +1301,7 @@ *p++ = *s; *p++ = '\n'; *p = 0; - state_attach_puts (buf, state); + state_puts (buf, state); FREE (&buf); } @@ -1341,7 +1339,7 @@ break; } if (txt) - state_attach_puts (txt, s); + state_puts (txt, s); } static void print_smime_keyinfo (const char* msg, gpgme_signature_t sig, @@ -1351,8 +1349,8 @@ gpgme_user_id_t uids = NULL; int i, aka = 0; - state_attach_puts (msg, s); - state_attach_puts (" ", s); + state_puts (msg, s); + state_puts (" ", s); /* key is NULL when not present in the user's keyring */ if (key) { @@ -1366,30 +1364,30 @@ * and "aka" translation length */ msglen = mutt_strlen (msg) - 4; for (i = 0; i < msglen; i++) - state_attach_puts(" ", s); - state_attach_puts(_("aka: "), s); + state_puts(" ", s); + state_puts(_("aka: "), s); } - state_attach_puts (uids->uid, s); - state_attach_puts ("\n", s); + state_puts (uids->uid, s); + state_puts ("\n", s); aka = 1; } } else { - state_attach_puts (_("KeyID "), s); - state_attach_puts (sig->fpr, s); - state_attach_puts ("\n", s); + state_puts (_("KeyID "), s); + state_puts (sig->fpr, s); + state_puts ("\n", s); } msglen = mutt_strlen (msg) - 8; /* TODO: need to account for msg wide characters * and "created" translation length */ for (i = 0; i < msglen; i++) - state_attach_puts(" ", s); - state_attach_puts (_("created: "), s); + state_puts(" ", s); + state_puts (_("created: "), s); print_time (sig->timestamp, s); - state_attach_puts ("\n", s); + state_puts ("\n", s); } /* Show information about one signature. This function is called with @@ -1461,7 +1459,7 @@ snprintf (buf, sizeof (buf), _("Error getting key information for KeyID %s: %s\n"), fpr, gpgme_strerror (err)); - state_attach_puts (buf, s); + state_puts (buf, s); anybad = 1; } else if ((sum & GPGME_SIGSUM_GREEN)) @@ -1496,9 +1494,9 @@ /* L10N: This is trying to match the width of the "Problem signature from:" translation just above. */ - state_attach_puts (_(" expires: "), s); + state_puts (_(" expires: "), s); print_time (sig->exp_timestamp, s); - state_attach_puts ("\n", s); + state_puts ("\n", s); } show_sig_summary (sum, ctx, key, idx, s, sig); anywarn = 1; @@ -1557,12 +1555,13 @@ snprintf (buf, sizeof(buf)-1, _("Error: verification failed: %s\n"), gpgme_strerror (err)); - state_attach_puts (buf, s); + state_puts (buf, s); } else { /* Verification succeeded, see what the result is. */ int res, idx; int anybad = 0; + gpgme_verify_result_t verify_result; if (signature_key) { @@ -1570,15 +1569,19 @@ signature_key = NULL; } - for(idx=0; (res = show_one_sig_status (ctx, idx, s)) != -1; idx++) + verify_result = gpgme_op_verify_result (ctx); + if (verify_result && verify_result->signatures) + { + for (idx=0; (res = show_one_sig_status (ctx, idx, s)) != -1; idx++) { if (res == 1) anybad = 1; else if (res == 2) anywarn = 2; } - if (!anybad) - badsig = 0; + if (!anybad) + badsig = 0; + } } if (!badsig) @@ -1606,7 +1609,7 @@ snprintf (buf, sizeof (buf), _("*** Begin Notation (signature by: %s) ***\n"), signature->fpr); - state_attach_puts (buf, s); + state_puts (buf, s); for (notation = signature->notations; notation; notation = notation->next) { @@ -1615,18 +1618,18 @@ if (notation->name) { - state_attach_puts (notation->name, s); - state_attach_puts ("=", s); + state_puts (notation->name, s); + state_puts ("=", s); } if (notation->value) { - state_attach_puts (notation->value, s); + state_puts (notation->value, s); if (!(*notation->value && (notation->value[strlen (notation->value)-1]=='\n'))) - state_attach_puts ("\n", s); + state_puts ("\n", s); } } - state_attach_puts (_("*** End Notation ***\n"), s); + state_puts (_("*** End Notation ***\n"), s); } } } @@ -2440,7 +2443,7 @@ snprintf (errbuf, sizeof(errbuf)-1, _("Error: decryption/verification failed: %s\n"), gpgme_strerror (err)); - state_attach_puts (errbuf, s); + state_puts (errbuf, s); } else { /* Decryption/Verification succeeded */ @@ -2483,7 +2486,7 @@ if (!tmpfname) { pgpout = NULL; - state_attach_puts (_("Error: copy data failed\n"), s); + state_puts (_("Error: copy data failed\n"), s); } else { @@ -2815,9 +2818,6 @@ } *p = 0; - if (do_locales && Locale) - setlocale (LC_TIME, Locale); - { time_t tt = 0; @@ -2826,11 +2826,13 @@ tm = localtime (&tt); } - strftime (buf2, sizeof (buf2), dest, tm); - - if (do_locales) - setlocale (LC_TIME, "C"); - + + if (!do_locales) + setlocale (LC_TIME, "C"); + strftime (buf2, sizeof (buf2), dest, tm); + if (!do_locales) + setlocale (LC_TIME, ""); + snprintf (fmt, sizeof (fmt), "%%%ss", prefix); snprintf (dest, destlen, fmt, buf2); if (len > 0) @@ -3371,9 +3373,6 @@ int i; gpgme_user_id_t uid = NULL; - if (Locale) - setlocale (LC_TIME, Locale); - is_pgp = key->protocol == GPGME_PROTOCOL_OpenPGP; for (idx = 0, uid = key->uids; uid; idx++, uid = uid->next) @@ -3613,9 +3612,6 @@ putc ('\n', fp); } } - - if (Locale) - setlocale (LC_TIME, "C"); } diff -r 5c5848dfa4ea -r 4bcc3a12cc4d crypt.c --- a/crypt.c Tue Oct 04 11:13:24 2016 -0700 +++ b/crypt.c Sat Oct 08 13:24:00 2016 -0700 @@ -64,9 +64,7 @@ if (option (OPTCRYPTTIMESTAMP)) { t = time(NULL); - setlocale (LC_TIME, ""); strftime (p, sizeof (p), _(" (current time: %c)"), localtime (&t)); - setlocale (LC_TIME, "C"); } else *p = '\0'; diff -r 5c5848dfa4ea -r 4bcc3a12cc4d curs_lib.c --- a/curs_lib.c Tue Oct 04 11:13:24 2016 -0700 +++ b/curs_lib.c Sat Oct 08 13:24:00 2016 -0700 @@ -125,9 +125,10 @@ return err; } - if(ch == ERR) + /* either timeout, a sigwinch (if timeout is set), or the terminal + * has been lost */ + if (ch == ERR) { - /* either timeout or the terminal has been lost */ if (!isatty (0)) { endwin (); diff -r 5c5848dfa4ea -r 4bcc3a12cc4d doc/manual.xml.head --- a/doc/manual.xml.head Tue Oct 04 11:13:24 2016 -0700 +++ b/doc/manual.xml.head Sat Oct 08 13:24:00 2016 -0700 @@ -3624,8 +3624,8 @@ <para> Another typical use for this command is to change the values of the <link linkend="attribution">$attribution</link>, <link -linkend="signature">$signature</link> and <link -linkend="locale">$locale</link> variables in order to change the +linkend="attribution-locale">$attribution_locale</link>, and <link +linkend="signature">$signature</link> variables in order to change the language of the attributions and signatures based upon the recipients. </para> @@ -8291,6 +8291,14 @@ <arg choice="opt" rep="repeat"> <replaceable class="parameter">mailbox</replaceable> </arg> + + <command>unsidebar_whitelist<anchor id="unsidebar-whitelist"/></command> + <arg choice="plain"> + <replaceable class="parameter">*</replaceable> + </arg> + <arg choice="plain" rep="repeat"> + <replaceable class="parameter">mailbox</replaceable> + </arg> </cmdsynopsis> <para> @@ -8299,6 +8307,12 @@ linkend="sidebar-new-mail-only">$sidebar_new_mail_only</link> is set and the mailbox does not contain new mail. </para> + + <para> + The <quote>unsidebar_whitelist</quote> command is used to remove a mailbox from + the list of whitelisted mailboxes. Use <quote>unsidebar_whitelist *</quote> + to remove all mailboxes. + </para> </sect2> <sect2 id="sidebar-colors"> @@ -9571,13 +9585,24 @@ <cmdsynopsis> <command><link linkend="sidebar-whitelist">sidebar_whitelist</link></command> <arg choice="plain"> -<replaceable class="parameter">item</replaceable> -</arg> -<arg choice="plain"> -<replaceable class="parameter">command</replaceable> -</arg> +<replaceable class="parameter">mailbox</replaceable> +</arg> +<arg choice="opt" rep="repeat"> +<replaceable class="parameter">mailbox</replaceable> +</arg> + +<command><link linkend="unsidebar-whitelist">unsidebar_whitelist</link></command> +<group choice="req"> +<arg choice="plain"> +<replaceable class="parameter">*</replaceable> +</arg> +<arg choice="plain" rep="repeat"> +<replaceable class="parameter">mailbox</replaceable> +</arg> +</group> </cmdsynopsis> </listitem> + <listitem> <cmdsynopsis> <command><link linkend="source">source</link></command> diff -r 5c5848dfa4ea -r 4bcc3a12cc4d edit.c --- a/edit.c Tue Oct 04 11:13:24 2016 -0700 +++ b/edit.c Sat Oct 08 13:24:00 2016 -0700 @@ -29,6 +29,7 @@ #include <stdio.h> #include <string.h> #include <stdlib.h> +#include <locale.h> #include <ctype.h> #include <sys/stat.h> #include <fcntl.h> @@ -160,7 +161,9 @@ /* add the attribution */ if (Attribution) { + setlocale (LC_TIME, NONULL (AttributionLocale)); mutt_make_string (tmp, sizeof (tmp) - 1, Attribution, Context, Context->hdrs[n]); + setlocale (LC_TIME, ""); strcat (tmp, "\n"); /* __STRCAT_CHECKED__ */ } diff -r 5c5848dfa4ea -r 4bcc3a12cc4d globals.h --- a/globals.h Tue Oct 04 11:13:24 2016 -0700 +++ b/globals.h Sat Oct 08 13:24:00 2016 -0700 @@ -36,6 +36,7 @@ WHERE char *AssumedCharset; WHERE char *AttachSep; WHERE char *Attribution; +WHERE char *AttributionLocale; WHERE char *AttachCharset; WHERE char *AttachFormat; WHERE char *Charset; @@ -66,7 +67,6 @@ #endif WHERE char *Inbox; WHERE char *Ispell; -WHERE char *Locale; WHERE char *MailcapPath; WHERE char *Maildir; #if defined(USE_IMAP) || defined(USE_POP) diff -r 5c5848dfa4ea -r 4bcc3a12cc4d hdrline.c --- a/hdrline.c Tue Oct 04 11:13:24 2016 -0700 +++ b/hdrline.c Sat Oct 08 13:24:00 2016 -0700 @@ -383,9 +383,6 @@ } *p = 0; - if (do_locales && Locale) - setlocale (LC_TIME, Locale); - if (op == '[' || op == 'D') tm = localtime (&hdr->date_sent); else if (op == '(') @@ -406,10 +403,11 @@ tm = gmtime (&T); } - strftime (buf2, sizeof (buf2), dest, tm); - - if (do_locales) - setlocale (LC_TIME, "C"); + if (!do_locales) + setlocale (LC_TIME, "C"); + strftime (buf2, sizeof (buf2), dest, tm); + if (!do_locales) + setlocale (LC_TIME, ""); mutt_format_s (dest, destlen, prefix, buf2); if (len > 0 && op != 'd' && op != 'D') /* Skip ending op */ diff -r 5c5848dfa4ea -r 4bcc3a12cc4d imap/imap.c --- a/imap/imap.c Tue Oct 04 11:13:24 2016 -0700 +++ b/imap/imap.c Sat Oct 08 13:24:00 2016 -0700 @@ -2116,6 +2116,14 @@ /* loop in case of TRYCREATE */ do { + rc = imap_exec_msgset (idata, "UID STORE", "+FLAGS.SILENT (\\Seen)", + MUTT_TRASH, 0, 0); + if (rc < 0) + { + dprint (1, (debugfile, "imap_fast_trash: Unable to mark messages as seen\n")); + goto out; + } + rc = imap_exec_msgset (idata, "UID COPY", mmbox, MUTT_TRASH, 0, 0); if (!rc) { diff -r 5c5848dfa4ea -r 4bcc3a12cc4d init.h --- a/init.h Tue Oct 04 11:13:24 2016 -0700 +++ b/init.h Sat Oct 08 13:24:00 2016 -0700 @@ -266,6 +266,18 @@ ** in a reply. For a full listing of defined \fCprintf(3)\fP-like sequences see ** the section on $$index_format. */ + { "attribution_locale", DT_STR, R_NONE, UL &AttributionLocale, UL "" }, + /* + ** .pp + ** The locale used by \fCstrftime(3)\fP to format dates in the + ** $attribution string. Legal values are the strings your system + ** accepts for the locale environment variable \fC$$$LC_TIME\fP. + ** .pp + ** This variable is to allow the attribution date format to be + ** customized by recipient or folder using hooks. By default, Mutt + ** will use your locale environment, so there is no need to set + ** this except to override that default. + */ { "auto_tag", DT_BOOL, R_NONE, OPTAUTOTAG, 0 }, /* ** .pp @@ -599,8 +611,8 @@ ** function to process the date, see the man page for the proper syntax. ** .pp ** Unless the first character in the string is a bang (``!''), the month - ** and week day names are expanded according to the locale specified in - ** the variable $$locale. If the first character in the string is a + ** and week day names are expanded according to the locale. + ** If the first character in the string is a ** bang, the bang is discarded, and the month and week day names in the ** rest of the string are expanded in the \fIC\fP locale (that is in US ** English). @@ -1395,12 +1407,6 @@ ** from your spool mailbox to your $$mbox mailbox, or as a result of ** a ``$mbox-hook'' command. */ - { "locale", DT_STR, R_BOTH, UL &Locale, UL "C" }, - /* - ** .pp - ** The locale used by \fCstrftime(3)\fP to format dates. Legal values are - ** the strings your system accepts for the locale environment variable \fC$$$LC_TIME\fP. - */ { "mail_check", DT_NUM, R_NONE, UL &BuffyTimeout, 5 }, /* ** .pp @@ -3928,6 +3934,7 @@ { "set", parse_set, 0 }, #ifdef USE_SIDEBAR { "sidebar_whitelist",parse_list, UL &SidebarWhitelist }, + { "unsidebar_whitelist",parse_unlist, UL &SidebarWhitelist }, #endif { "source", parse_source, 0 }, { "spam", parse_spam_list, MUTT_SPAM }, diff -r 5c5848dfa4ea -r 4bcc3a12cc4d keymap.c --- a/keymap.c Tue Oct 04 11:13:24 2016 -0700 +++ b/keymap.c Sat Oct 08 13:24:00 2016 -0700 @@ -461,13 +461,13 @@ tmp = mutt_getch(); timeout (-1); - /* hide timeouts from line editor */ +#ifdef USE_IMAP + gotkey: +#endif + /* hide timeouts and window resizes from line editor. */ if (menu == MENU_EDITOR && tmp.ch == -2) continue; -#ifdef USE_IMAP - gotkey: -#endif LastKey = tmp.ch; if (LastKey < 0) return -1; diff -r 5c5848dfa4ea -r 4bcc3a12cc4d main.c --- a/main.c Tue Oct 04 11:13:24 2016 -0700 +++ b/main.c Sat Oct 08 13:24:00 2016 -0700 @@ -597,15 +597,14 @@ exit(1); } + setlocale (LC_ALL, ""); + #ifdef ENABLE_NLS /* FIXME what about init.c:1439 ? */ - setlocale (LC_ALL, ""); bindtextdomain (PACKAGE, MUTTLOCALEDIR); textdomain (PACKAGE); #endif - setlocale (LC_CTYPE, ""); - mutt_error = mutt_nocurses_error; mutt_message = mutt_nocurses_error; SRAND (time (NULL)); diff -r 5c5848dfa4ea -r 4bcc3a12cc4d mbyte.c --- a/mbyte.c Tue Oct 04 11:13:24 2016 -0700 +++ b/mbyte.c Sat Oct 08 13:24:00 2016 -0700 @@ -530,6 +530,7 @@ if (wc == (wchar_t)0x200f || /* bidi markers: #3827 */ wc == (wchar_t)0x200e || wc == (wchar_t)0x00ad || /* soft hyphen: #3848 */ + wc == (wchar_t)0xfeff || /* zero width no-break space */ (wc >= (wchar_t)0x202a && /* misc directional markers: #3854 */ wc <= (wchar_t)0x202e)) return 1; diff -r 5c5848dfa4ea -r 4bcc3a12cc4d mutt_ssl.c --- a/mutt_ssl.c Tue Oct 04 11:13:24 2016 -0700 +++ b/mutt_ssl.c Sat Oct 08 13:24:00 2016 -0700 @@ -37,12 +37,6 @@ #include "mutt_ssl.h" #include "mutt_idna.h" -#if OPENSSL_VERSION_NUMBER >= 0x00904000L -#define READ_X509_KEY(fp, key) PEM_read_X509(fp, key, NULL, NULL) -#else -#define READ_X509_KEY(fp, key) PEM_read_X509(fp, key, NULL) -#endif - /* Just in case OpenSSL doesn't define DEVRANDOM */ #ifndef DEVRANDOM #define DEVRANDOM "/dev/urandom" @@ -406,11 +400,7 @@ int err; const char* errmsg; -#if OPENSSL_VERSION_NUMBER >= 0x00906000L - /* This only exists in 0.9.6 and above. Without it we may get interrupted - * reads or writes. Bummer. */ SSL_set_mode (ssldata->ssl, SSL_MODE_AUTO_RETRY); -#endif if ((err = SSL_connect (ssldata->ssl)) != 1) { @@ -631,7 +621,7 @@ static int check_certificate_by_signer (X509 *peercert) { - X509_STORE_CTX xsc; + X509_STORE_CTX *xsc; X509_STORE *ctx; int pass = 0, i; @@ -661,23 +651,25 @@ return 0; } - X509_STORE_CTX_init (&xsc, ctx, peercert, SslSessionCerts); + xsc = X509_STORE_CTX_new(); + if (xsc == NULL) return 0; + X509_STORE_CTX_init (xsc, ctx, peercert, SslSessionCerts);
