changeset: 6711:7ccd4417bd70 user: Kevin McCarthy <ke...@8t8.us> date: Wed Jul 06 10:40:26 2016 -0700 link: http://dev.mutt.org/hg/mutt/rev/7ccd4417bd70
automatic post-release commit for mutt-1.6.2 changeset: 6712:592270259a8e user: Kevin McCarthy <ke...@8t8.us> date: Wed Jul 06 10:40:35 2016 -0700 link: http://dev.mutt.org/hg/mutt/rev/592270259a8e Added tag mutt-1-6-2-rel for changeset 7ccd4417bd70 changeset: 6713:88030069f94d user: Kevin McCarthy <ke...@8t8.us> date: Wed Jul 06 10:41:54 2016 -0700 link: http://dev.mutt.org/hg/mutt/rev/88030069f94d mutt-1.6.2 signed changeset: 6714:88793198dfcb user: Kevin McCarthy <ke...@8t8.us> date: Wed Jul 06 10:43:56 2016 -0700 link: http://dev.mutt.org/hg/mutt/rev/88793198dfcb merge stable diffs (truncated from 25116 to 950 lines): diff -r 7e817890913c -r 88793198dfcb .hgsigs --- a/.hgsigs Fri Jul 01 13:33:20 2016 -0700 +++ b/.hgsigs Wed Jul 06 10:43:56 2016 -0700 @@ -10,3 +10,4 @@ 08e81162482fb7b1680efa20b1740f693a8a35de 0 iQIcBAABCgAGBQJV4zztAAoJEK3vdoSAMWva7nMP/046RRvjWEVcIIJjWBejsB6gpOW0ZaHD54F8GGzQLQVN6F4RCuU24cPxyWB04vS0SrQAmANLQ8lGwYjtotztyTs4CnfsvRSEXUFBtyBj5u2ZUHlsA4s/UTPRiuUmen4Dx4nRzXs8XQowTaPdUnncHGxfYLaVznkcUGgVMPhh9RpN8LcJgu11ntYvSdoDWdblF4dGEINlQ7K0u7kqeFNd1EhP0llpAMyCzRvY/zBriYRZn1Jfhn/tuHb4AuiNB7FPEhloBlz3J8PWqqMHannfIVtQYhz6B4b5d6Kd/CJytoExiaEbZI710hEkwjYJVtvnQCRiz50Fu/C4rXHrkRF77Y7wYHBSyEZ0KXkAO9cNvB7Tmypfxyj/kupFFtMTDyaie4kNV+FZxtfSA4Jh99sItcyUEvs0OacogCwz558F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gId84bOftCL8HXPXcphpczKikpAaefKnz8bKvam5FUBKaFMxY/yQ7NLMRtNsXU3r+IaR99I9J0grRz76KXHvS9fUGPRBU0g5/Ugfe0KgSES+wrBh5vUVNDsMaCox6Hqb/4vlRq5pu6sJTrdfzP1FI3TS+imrNXQyyEFZK/+qtdxNwG2VEgsRKO2PsdfLExty8NNjaflMxLzC+U+yOZhP4KkVDBYs9sygkKZWXQ/3IDIgBlGaIsv8VSs92mI/BjaZuMQ71HGZboCDYyWlnrXsEDc61awsu3nR+VqcP6Ba77NAPko8rE2QRCsE313iDEfITyO5B330rPFNQMIlG4zFp6qJyCNoH0KqtzK4/N2e diff -r 7e817890913c -r 88793198dfcb .hgtags --- a/.hgtags Fri Jul 01 13:33:20 2016 -0700 +++ b/.hgtags Wed Jul 06 10:43:56 2016 -0700 @@ -102,3 +102,4 @@ 08e81162482fb7b1680efa20b1740f693a8a35de mutt-1-5-24-rel be82a2fde82fdd9057641e39e4df853d7ae4d4f2 mutt-1-6-rel 1ef1e39a7218704ebd715ffc8d29079ae7f63061 mutt-1-6-1-rel +7ccd4417bd70373d873c5f9d38e4d22aa5df9afe mutt-1-6-2-rel diff -r 7e817890913c -r 88793198dfcb ChangeLog --- a/ChangeLog Fri Jul 01 13:33:20 2016 -0700 +++ b/ChangeLog Wed Jul 06 10:43:56 2016 -0700 @@ -1,3 +1,56 @@ +2016-07-01 13:33 -0700 Kevin McCarthy <ke...@8t8.us> (7e817890913c) + + * send.c: Check $pgp_autoinline and $pgp_replyinline if oppenc is set. + (closes #3846) + + The first oppenc call takes place after the initial checks of + $pgp_autoline and $pgp_replyinline, and doesn't go through the pgp + menu. + + Therefore, check for $pgp_autoline and $pgp_replyinline if oppenc is + set too, to avoid oppenc enabling encryption without INLINE being + set in those cases. + + a6a4d6ed0f19 previously cleaned things up so that it is safe to set + INLINE even if encryption isn't enabled. + +2016-05-24 12:08 -0700 Kevin McCarthy <ke...@8t8.us> (f1f1af650910) + + * keymap.c: Fix infinite loop when help is bound to a named key + combination. + + Commit a07e8215a0ef introduced a bug in km_error_key, which is + called when an unbound key is pressed. + + If help is bound to a sequence containing named keys (e.g. <esc>), + the raw (untokenized) string would be pushed back into the unget + buffer. This could lead to an infinite loop of unbound key presses + triggering more unbound keys being put into the unget buffer. + + Change km_error_key to tokenize the string before putting it in the + unget buffer. + + Much thanks to Jiri Bohac for his bug report, analysis, and initial + patch! + +2016-04-30 14:21 -0700 Kevin McCarthy <ke...@8t8.us> (1ef1e39a7218) + + * 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.6.1 + +2016-04-30 14:23 -0700 Kevin McCarthy <ke...@8t8.us> (2822cefa33d6) + + * .hgtags: Added tag mutt-1-6-1-rel for changeset 1ef1e39a7218 + +2016-04-30 14:25 -0700 Kevin McCarthy <ke...@8t8.us> (e3bc23cbe3d1) + + * .hgsigs: mutt-1.6.1 signed + 2016-04-27 13:08 -0700 Kevin McCarthy <ke...@8t8.us> (23334e967dd7) * Makefile.am, getdomain.c, mutt_sasl.c, mutt_socket.c, mutt_tunnel.c, diff -r 7e817890913c -r 88793198dfcb Makefile.am --- a/Makefile.am Fri Jul 01 13:33:20 2016 -0700 +++ b/Makefile.am Wed Jul 06 10:43:56 2016 -0700 @@ -56,7 +56,7 @@ mutt_idna.c mutt_sasl.c mutt_socket.c mutt_ssl.c mutt_ssl_gnutls.c \ mutt_tunnel.c pgp.c pgpinvoke.c pgpkey.c pgplib.c pgpmicalg.c \ pgppacket.c pop.c pop_auth.c pop_lib.c remailer.c resize.c sha1.c \ - smime.c smtp.c utf8.c wcwidth.c \ + sidebar.c smime.c smtp.c utf8.c wcwidth.c \ bcache.h browser.h hcache.h mbyte.h mutt_idna.h remailer.h url.h EXTRA_DIST = COPYRIGHT GPL OPS OPS.PGP OPS.CRYPT OPS.SMIME TODO UPDATING \ @@ -71,8 +71,8 @@ mbyte.h lib.h extlib.c pgpewrap.c smime_keys.pl pgplib.h \ README.SSL smime.h group.h \ muttbug pgppacket.h depcomp ascii.h BEWARE PATCHES patchlist.sh \ - ChangeLog mkchangelog.sh mutt_idna.h \ - snprintf.c regex.c crypt-gpgme.h hcachever.sh.in sys_socket.h \ + ChangeLog mkchangelog.sh mutt_idna.h sidebar.h OPS.SIDEBAR \ + snprintf.c regex.c crypt-gpgme.h hcachever.sh.in \ txt2c.c txt2c.sh version.sh check_sec.sh EXTRA_SCRIPTS = smime_keys @@ -129,9 +129,9 @@ keymap_defs.h: $(OPS) $(srcdir)/gen_defs $(srcdir)/gen_defs $(OPS) > keymap_defs.h -keymap_alldefs.h: $(srcdir)/OPS $(srcdir)/OPS.PGP $(srcdir)/OPS.MIX $(srcdir)/OPS.CRYPT $(srcdir)/OPS.SMIME $(srcdir)/gen_defs +keymap_alldefs.h: $(srcdir)/OPS $(srcdir)/OPS.SIDEBAR $(srcdir)/OPS.PGP $(srcdir)/OPS.MIX $(srcdir)/OPS.CRYPT $(srcdir)/OPS.SMIME $(srcdir)/gen_defs rm -f $@ - $(srcdir)/gen_defs $(srcdir)/OPS $(srcdir)/OPS.PGP \ + $(srcdir)/gen_defs $(srcdir)/OPS $(srcdir)/OPS.SIDEBAR $(srcdir)/OPS.PGP \ $(srcdir)/OPS.MIX $(srcdir)/OPS.CRYPT $(srcdir)/OPS.SMIME \ > keymap_alldefs.h diff -r 7e817890913c -r 88793198dfcb OPS.MIX --- a/OPS.MIX Fri Jul 01 13:33:20 2016 -0700 +++ b/OPS.MIX Wed Jul 06 10:43:56 2016 -0700 @@ -1,7 +1,7 @@ -OP_MIX_USE "Accept the chain constructed" -OP_MIX_APPEND "Append a remailer to the chain" -OP_MIX_INSERT "Insert a remailer into the chain" -OP_MIX_DELETE "Delete a remailer from the chain" -OP_MIX_CHAIN_PREV "Select the previous element of the chain" -OP_MIX_CHAIN_NEXT "Select the next element of the chain" +OP_MIX_USE "accept the chain constructed" +OP_MIX_APPEND "append a remailer to the chain" +OP_MIX_INSERT "insert a remailer into the chain" +OP_MIX_DELETE "delete a remailer from the chain" +OP_MIX_CHAIN_PREV "select the previous element of the chain" +OP_MIX_CHAIN_NEXT "select the next element of the chain" OP_COMPOSE_MIX "send the message through a mixmaster remailer chain" diff -r 7e817890913c -r 88793198dfcb OPS.SIDEBAR --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/OPS.SIDEBAR Wed Jul 06 10:43:56 2016 -0700 @@ -0,0 +1,8 @@ +OP_SIDEBAR_NEXT "move the highlight to next mailbox" +OP_SIDEBAR_NEXT_NEW "move the highlight to next mailbox with new mail" +OP_SIDEBAR_OPEN "open highlighted mailbox" +OP_SIDEBAR_PAGE_DOWN "scroll the sidebar down 1 page" +OP_SIDEBAR_PAGE_UP "scroll the sidebar up 1 page" +OP_SIDEBAR_PREV "move the highlight to previous mailbox" +OP_SIDEBAR_PREV_NEW "move the highlight to previous mailbox with new mail" +OP_SIDEBAR_TOGGLE_VISIBLE "make the sidebar (in)visible" diff -r 7e817890913c -r 88793198dfcb UPDATING --- a/UPDATING Fri Jul 01 13:33:20 2016 -0700 +++ b/UPDATING Wed Jul 06 10:43:56 2016 -0700 @@ -4,6 +4,10 @@ The keys used are: !: modified feature, -: deleted feature, +: new feature +1.6.2 (2016-07-06): + + ! Bug fix release. No features were modified or added. + 1.6.1 (2016-05-01): ! Bug fix release. No features were modified or added. diff -r 7e817890913c -r 88793198dfcb VERSION --- a/VERSION Fri Jul 01 13:33:20 2016 -0700 +++ b/VERSION Wed Jul 06 10:43:56 2016 -0700 @@ -1,1 +1,1 @@ -1.6.1 +1.6.2 diff -r 7e817890913c -r 88793198dfcb account.c --- a/account.c Fri Jul 01 13:33:20 2016 -0700 +++ b/account.c Wed Jul 06 10:43:56 2016 -0700 @@ -39,7 +39,7 @@ return 0; #ifdef USE_IMAP - if (a1->type == M_ACCT_TYPE_IMAP) + if (a1->type == MUTT_ACCT_TYPE_IMAP) { if (ImapUser) user = ImapUser; @@ -47,15 +47,15 @@ #endif #ifdef USE_POP - if (a1->type == M_ACCT_TYPE_POP && PopUser) + if (a1->type == MUTT_ACCT_TYPE_POP && PopUser) user = PopUser; #endif - if (a1->flags & a2->flags & M_ACCT_USER) + if (a1->flags & a2->flags & MUTT_ACCT_USER) return (!strcmp (a1->user, a2->user)); - if (a1->flags & M_ACCT_USER) + if (a1->flags & MUTT_ACCT_USER) return (!strcmp (a1->user, user)); - if (a2->flags & M_ACCT_USER) + if (a2->flags & MUTT_ACCT_USER) return (!strcmp (a2->user, user)); return 1; @@ -73,17 +73,17 @@ if (url->user) { strfcpy (account->user, url->user, sizeof (account->user)); - account->flags |= M_ACCT_USER; + account->flags |= MUTT_ACCT_USER; } if (url->pass) { strfcpy (account->pass, url->pass, sizeof (account->pass)); - account->flags |= M_ACCT_PASS; + account->flags |= MUTT_ACCT_PASS; } if (url->port) { account->port = url->port; - account->flags |= M_ACCT_PORT; + account->flags |= MUTT_ACCT_PORT; } return 0; @@ -101,9 +101,9 @@ url->port = 0; #ifdef USE_IMAP - if (account->type == M_ACCT_TYPE_IMAP) + if (account->type == MUTT_ACCT_TYPE_IMAP) { - if (account->flags & M_ACCT_SSL) + if (account->flags & MUTT_ACCT_SSL) url->scheme = U_IMAPS; else url->scheme = U_IMAP; @@ -111,9 +111,9 @@ #endif #ifdef USE_POP - if (account->type == M_ACCT_TYPE_POP) + if (account->type == MUTT_ACCT_TYPE_POP) { - if (account->flags & M_ACCT_SSL) + if (account->flags & MUTT_ACCT_SSL) url->scheme = U_POPS; else url->scheme = U_POP; @@ -121,9 +121,9 @@ #endif #ifdef USE_SMTP - if (account->type == M_ACCT_TYPE_SMTP) + if (account->type == MUTT_ACCT_TYPE_SMTP) { - if (account->flags & M_ACCT_SSL) + if (account->flags & MUTT_ACCT_SSL) url->scheme = U_SMTPS; else url->scheme = U_SMTP; @@ -131,11 +131,11 @@ #endif url->host = account->host; - if (account->flags & M_ACCT_PORT) + if (account->flags & MUTT_ACCT_PORT) url->port = account->port; - if (account->flags & M_ACCT_USER) + if (account->flags & MUTT_ACCT_USER) url->user = account->user; - if (account->flags & M_ACCT_PASS) + if (account->flags & MUTT_ACCT_PASS) url->pass = account->pass; } @@ -145,14 +145,14 @@ char prompt[SHORT_STRING]; /* already set */ - if (account->flags & M_ACCT_USER) + if (account->flags & MUTT_ACCT_USER) return 0; #ifdef USE_IMAP - else if ((account->type == M_ACCT_TYPE_IMAP) && ImapUser) + else if ((account->type == MUTT_ACCT_TYPE_IMAP) && ImapUser) strfcpy (account->user, ImapUser, sizeof (account->user)); #endif #ifdef USE_POP - else if ((account->type == M_ACCT_TYPE_POP) && PopUser) + else if ((account->type == MUTT_ACCT_TYPE_POP) && PopUser) strfcpy (account->user, PopUser, sizeof (account->user)); #endif else if (option (OPTNOCURSES)) @@ -166,7 +166,7 @@ return -1; } - account->flags |= M_ACCT_USER; + account->flags |= MUTT_ACCT_USER; return 0; } @@ -174,26 +174,26 @@ int mutt_account_getlogin (ACCOUNT* account) { /* already set */ - if (account->flags & M_ACCT_LOGIN) + if (account->flags & MUTT_ACCT_LOGIN) return 0; #ifdef USE_IMAP - else if (account->type == M_ACCT_TYPE_IMAP) + else if (account->type == MUTT_ACCT_TYPE_IMAP) { if (ImapLogin) { strfcpy (account->login, ImapLogin, sizeof (account->login)); - account->flags |= M_ACCT_LOGIN; + account->flags |= MUTT_ACCT_LOGIN; } } #endif - if (!(account->flags & M_ACCT_LOGIN)) + if (!(account->flags & MUTT_ACCT_LOGIN)) { mutt_account_getuser (account); strfcpy (account->login, account->user, sizeof (account->login)); } - account->flags |= M_ACCT_LOGIN; + account->flags |= MUTT_ACCT_LOGIN; return 0; } @@ -203,18 +203,18 @@ { char prompt[SHORT_STRING]; - if (account->flags & M_ACCT_PASS) + if (account->flags & MUTT_ACCT_PASS) return 0; #ifdef USE_IMAP - else if ((account->type == M_ACCT_TYPE_IMAP) && ImapPass) + else if ((account->type == MUTT_ACCT_TYPE_IMAP) && ImapPass) strfcpy (account->pass, ImapPass, sizeof (account->pass)); #endif #ifdef USE_POP - else if ((account->type == M_ACCT_TYPE_POP) && PopPass) + else if ((account->type == MUTT_ACCT_TYPE_POP) && PopPass) strfcpy (account->pass, PopPass, sizeof (account->pass)); #endif #ifdef USE_SMTP - else if ((account->type == M_ACCT_TYPE_SMTP) && SmtpPass) + else if ((account->type == MUTT_ACCT_TYPE_SMTP) && SmtpPass) strfcpy (account->pass, SmtpPass, sizeof (account->pass)); #endif else if (option (OPTNOCURSES)) @@ -222,19 +222,19 @@ else { snprintf (prompt, sizeof (prompt), _("Password for %s@%s: "), - account->flags & M_ACCT_LOGIN ? account->login : account->user, + account->flags & MUTT_ACCT_LOGIN ? account->login : account->user, account->host); account->pass[0] = '\0'; if (mutt_get_password (prompt, account->pass, sizeof (account->pass))) return -1; } - account->flags |= M_ACCT_PASS; + account->flags |= MUTT_ACCT_PASS; return 0; } void mutt_account_unsetpass (ACCOUNT* account) { - account->flags &= ~M_ACCT_PASS; + account->flags &= ~MUTT_ACCT_PASS; } diff -r 7e817890913c -r 88793198dfcb account.h --- a/account.h Fri Jul 01 13:33:20 2016 -0700 +++ b/account.h Wed Jul 06 10:43:56 2016 -0700 @@ -26,18 +26,18 @@ /* account types */ enum { - M_ACCT_TYPE_NONE = 0, - M_ACCT_TYPE_IMAP, - M_ACCT_TYPE_POP, - M_ACCT_TYPE_SMTP + MUTT_ACCT_TYPE_NONE = 0, + MUTT_ACCT_TYPE_IMAP, + MUTT_ACCT_TYPE_POP, + MUTT_ACCT_TYPE_SMTP }; /* account flags */ -#define M_ACCT_PORT (1<<0) -#define M_ACCT_USER (1<<1) -#define M_ACCT_LOGIN (1<<2) -#define M_ACCT_PASS (1<<3) -#define M_ACCT_SSL (1<<4) +#define MUTT_ACCT_PORT (1<<0) +#define MUTT_ACCT_USER (1<<1) +#define MUTT_ACCT_LOGIN (1<<2) +#define MUTT_ACCT_PASS (1<<3) +#define MUTT_ACCT_SSL (1<<4) typedef struct { diff -r 7e817890913c -r 88793198dfcb addrbook.c --- a/addrbook.c Fri Jul 01 13:33:20 2016 -0700 +++ b/addrbook.c Wed Jul 06 10:43:56 2016 -0700 @@ -43,7 +43,7 @@ }; static const char * -alias_format_str (char *dest, size_t destlen, size_t col, char op, const char *src, +alias_format_str (char *dest, size_t destlen, size_t col, int cols, char op, const char *src, const char *fmt, const char *ifstring, const char *elsestring, unsigned long data, format_flag flags) { @@ -80,7 +80,7 @@ static void alias_entry (char *s, size_t slen, MUTTMENU *m, int num) { - mutt_FormatString (s, slen, 0, NONULL (AliasFmt), alias_format_str, (unsigned long) ((ALIAS **) m->data)[num], M_FORMAT_ARROWCURSOR); + mutt_FormatString (s, slen, 0, MuttIndexWindow->cols, NONULL (AliasFmt), alias_format_str, (unsigned long) ((ALIAS **) m->data)[num], MUTT_FORMAT_ARROWCURSOR); } static int alias_tag (MUTTMENU *menu, int n, int m) diff -r 7e817890913c -r 88793198dfcb alias.c --- a/alias.c Fri Jul 01 13:33:20 2016 -0700 +++ b/alias.c Wed Jul 06 10:43:56 2016 -0700 @@ -269,9 +269,9 @@ if (mutt_check_alias_name (buf, fixed, sizeof (fixed))) { - switch (mutt_yesorno (_("Warning: This alias name may not work. Fix it?"), M_YES)) + switch (mutt_yesorno (_("Warning: This alias name may not work. Fix it?"), MUTT_YES)) { - case M_YES: + case MUTT_YES: strfcpy (buf, fixed, sizeof (buf)); goto retry_name; case -1: @@ -326,7 +326,7 @@ buf[0] = 0; rfc822_write_address (buf, sizeof (buf), new->addr, 1); snprintf (prompt, sizeof (prompt), _("[%s = %s] Accept?"), new->name, buf); - if (mutt_yesorno (prompt, M_YES) != M_YES) + if (mutt_yesorno (prompt, MUTT_YES) != MUTT_YES) { mutt_free_alias (&new); return; @@ -344,7 +344,7 @@ Aliases = new; strfcpy (buf, NONULL (AliasFile), sizeof (buf)); - if (mutt_get_field (_("Save to file: "), buf, sizeof (buf), M_FILE) != 0) + if (mutt_get_field (_("Save to file: "), buf, sizeof (buf), MUTT_FILE) != 0) return; mutt_expand_path (buf, sizeof (buf)); if ((rc = fopen (buf, "a+"))) @@ -423,6 +423,8 @@ { if (dry) return -1; + if (l == (size_t)(-1)) + memset (&mb, 0, sizeof (mbstate_t)); *dest++ = '_'; rv = -1; } diff -r 7e817890913c -r 88793198dfcb attach.c --- a/attach.c Fri Jul 01 13:33:20 2016 -0700 +++ b/attach.c Wed Jul 06 10:43:56 2016 -0700 @@ -94,7 +94,7 @@ int rc = 0; snprintf (type, sizeof (type), "%s/%s", TYPE (a), a->subtype); - if (rfc1524_mailcap_lookup (a, type, entry, M_COMPOSE)) + if (rfc1524_mailcap_lookup (a, type, entry, MUTT_COMPOSE)) { if (entry->composecommand || entry->composetypecommand) { @@ -110,7 +110,7 @@ a->filename, newfile)); if (safe_symlink (a->filename, newfile) == -1) { - if (mutt_yesorno (_("Can't match nametemplate, continue?"), M_YES) != M_YES) + if (mutt_yesorno (_("Can't match nametemplate, continue?"), MUTT_YES) != MUTT_YES) goto bailout; } else @@ -229,7 +229,7 @@ int rc = 0; snprintf (type, sizeof (type), "%s/%s", TYPE (a), a->subtype); - if (rfc1524_mailcap_lookup (a, type, entry, M_EDIT)) + if (rfc1524_mailcap_lookup (a, type, entry, MUTT_EDIT)) { if (entry->editcommand) { @@ -242,7 +242,7 @@ a->filename, newfile)); if (safe_symlink (a->filename, newfile) == -1) { - if (mutt_yesorno (_("Can't match nametemplate, continue?"), M_YES) != M_YES) + if (mutt_yesorno (_("Can't match nametemplate, continue?"), MUTT_YES) != MUTT_YES) goto bailout; } else @@ -350,8 +350,8 @@ if (WithCrypto && is_message && a->hdr && (a->hdr->security & ENCRYPT) && !crypt_valid_passphrase(a->hdr->security)) return (rc); - use_mailcap = (flag == M_MAILCAP || - (flag == M_REGULAR && mutt_needs_mailcap (a))); + use_mailcap = (flag == MUTT_MAILCAP || + (flag == MUTT_REGULAR && mutt_needs_mailcap (a))); snprintf (type, sizeof (type), "%s/%s", TYPE (a), a->subtype); if (use_mailcap) @@ -359,12 +359,12 @@ entry = rfc1524_new_entry (); if (!rfc1524_mailcap_lookup (a, type, entry, 0)) { - if (flag == M_REGULAR) + if (flag == MUTT_REGULAR) { /* fallback to view as text */ rfc1524_free_entry (&entry); mutt_error _("No matching mailcap entry found. Viewing as text."); - flag = M_AS_TEXT; + flag = MUTT_AS_TEXT; use_mailcap = 0; } else @@ -397,7 +397,7 @@ /* send case: the file is already there */ if (safe_symlink (a->filename, tempfile) == -1) { - if (mutt_yesorno (_("Can't match nametemplate, continue?"), M_YES) == M_YES) + if (mutt_yesorno (_("Can't match nametemplate, continue?"), MUTT_YES) == MUTT_YES) strfcpy (tempfile, a->filename, sizeof (tempfile)); else goto return_error; @@ -502,7 +502,7 @@ { /* Don't use mailcap; the attachment is viewed in the pager */ - if (flag == M_AS_TEXT) + if (flag == MUTT_AS_TEXT) { /* just let me see the raw data */ if (fp) @@ -524,7 +524,7 @@ goto return_error; } decode_state.fpin = fp; - decode_state.flags = M_CHARCONV; + decode_state.flags = MUTT_CHARCONV; mutt_decode_attachment(a, &decode_state); if (fclose(decode_state.fpout) == EOF) dprint(1, (debugfile, "mutt_view_attachment:%d fclose errno=%d %s\n", __LINE__, pagerfile, errno, strerror(errno))); @@ -544,7 +544,7 @@ /* Use built-in handler */ set_option (OPTVIEWATTACH); /* disable the "use 'v' to view this part" * message in case of error */ - if (mutt_decode_save_attachment (fp, a, pagerfile, M_DISPLAY, 0)) + if (mutt_decode_save_attachment (fp, a, pagerfile, MUTT_DISPLAY, 0)) { unset_option (OPTVIEWATTACH); goto return_error; @@ -576,7 +576,7 @@ info.hdr = hdr; rc = mutt_do_pager (descrip, pagerfile, - M_PAGER_ATTACHMENT | (is_message ? M_PAGER_MESSAGE : 0), &info); + MUTT_PAGER_ATTACHMENT | (is_message ? MUTT_PAGER_MESSAGE : 0), &info); *pagerfile = '\0'; } else @@ -691,9 +691,9 @@ static FILE * mutt_save_attachment_open (char *path, int flags) { - if (flags == M_SAVE_APPEND) + if (flags == MUTT_SAVE_APPEND) return fopen (path, "a"); - if (flags == M_SAVE_OVERWRITE) + if (flags == MUTT_SAVE_OVERWRITE) return fopen (path, "w"); /* __FOPEN_CHECKED__ */ return safe_fopen (path, "w"); @@ -729,23 +729,23 @@ fseeko (fp, m->offset, 0); if (fgets (buf, sizeof (buf), fp) == NULL) return -1; - if (mx_open_mailbox(path, M_APPEND | M_QUIET, &ctx) == NULL) + if (mx_open_mailbox(path, MUTT_APPEND | MUTT_QUIET, &ctx) == NULL) return -1; - if ((msg = mx_open_new_message (&ctx, hn, is_from (buf, NULL, 0, NULL) ? 0 : M_ADD_FROM)) == NULL) + if ((msg = mx_open_new_message (&ctx, hn, is_from (buf, NULL, 0, NULL) ? 0 : MUTT_ADD_FROM)) == NULL) { mx_close_mailbox(&ctx, NULL); return -1; } - if (ctx.magic == M_MBOX || ctx.magic == M_MMDF) + if (ctx.magic == MUTT_MBOX || ctx.magic == MUTT_MMDF) chflags = CH_FROM | CH_UPDATE_LEN; - chflags |= (ctx.magic == M_MAILDIR ? CH_NOSTATUS : CH_UPDATE); + chflags |= (ctx.magic == MUTT_MAILDIR ? CH_NOSTATUS : CH_UPDATE); if (_mutt_copy_message (msg->fp, fp, hn, hn->content, 0, chflags) == 0 && mx_commit_message (msg, &ctx) == 0) r = 0; else r = -1; - mx_close_message (&msg); + mx_close_message (&ctx, &msg); mx_close_mailbox (&ctx, NULL); return r; } @@ -818,9 +818,9 @@ memset (&s, 0, sizeof (s)); s.flags = displaying; - if (flags == M_SAVE_APPEND) + if (flags == MUTT_SAVE_APPEND) s.fpout = fopen (path, "a"); - else if (flags == M_SAVE_OVERWRITE) + else if (flags == MUTT_SAVE_OVERWRITE) s.fpout = fopen (path, "w"); /* __FOPEN_CHECKED__ */ else s.fpout = safe_fopen (path, "w"); @@ -861,12 +861,12 @@ mutt_parse_part (s.fpin, m); if (m->noconv || is_multipart (m)) - s.flags |= M_CHARCONV; + s.flags |= MUTT_CHARCONV; } else { s.fpin = fp; - s.flags |= M_CHARCONV; + s.flags |= MUTT_CHARCONV; } mutt_body_handler (m, &s); @@ -905,7 +905,7 @@ snprintf (type, sizeof (type), "%s/%s", TYPE (a), a->subtype); - if (rfc1524_mailcap_lookup (a, type, NULL, M_PRINT)) + if (rfc1524_mailcap_lookup (a, type, NULL, MUTT_PRINT)) { char command[_POSIX_PATH_MAX+STRING]; rfc1524_entry *entry; @@ -914,7 +914,7 @@ dprint (2, (debugfile, "Using mailcap...\n")); entry = rfc1524_new_entry (); - rfc1524_mailcap_lookup (a, type, entry, M_PRINT); + rfc1524_mailcap_lookup (a, type, entry, MUTT_PRINT); if (rfc1524_expand_filename (entry->nametemplate, a->filename, newfile, sizeof (newfile))) { @@ -922,7 +922,7 @@ { if (safe_symlink(a->filename, newfile) == -1) { - if (mutt_yesorno (_("Can't match nametemplate, continue?"), M_YES) != M_YES) + if (mutt_yesorno (_("Can't match nametemplate, continue?"), MUTT_YES) != MUTT_YES) { rfc1524_free_entry (&entry); return 0; @@ -996,7 +996,7 @@ fpout = NULL; mutt_mktemp (newfile, sizeof (newfile)); - if (mutt_decode_save_attachment (fp, a, newfile, M_PRINTING, 0) == 0) + if (mutt_decode_save_attachment (fp, a, newfile, MUTT_PRINTING, 0) == 0) { dprint (2, (debugfile, "successfully decoded %s type attachment to %s\n", diff -r 7e817890913c -r 88793198dfcb browser.c --- a/browser.c Fri Jul 01 13:33:20 2016 -0700 +++ b/browser.c Wed Jul 06 10:43:56 2016 -0700 @@ -68,7 +68,6 @@ { FREE (&((state->entry)[c].name)); FREE (&((state->entry)[c].desc)); - FREE (&((state->entry)[c].st)); } #ifdef USE_IMAP FREE (&state->folder); @@ -142,7 +141,7 @@ } static const char * -folder_format_str (char *dest, size_t destlen, size_t col, char op, const char *src, +folder_format_str (char *dest, size_t destlen, size_t col, int cols, char op, const char *src, const char *fmt, const char *ifstring, const char *elsestring, unsigned long data, format_flag flags) { @@ -152,7 +151,7 @@ FOLDER *folder = (FOLDER *) data; struct passwd *pw; struct group *gr; - int optional = (flags & M_FORMAT_OPTIONAL); + int optional = (flags & MUTT_FORMAT_OPTIONAL); switch (op) { @@ -163,7 +162,7 @@ case 'd': case 'D': - if (folder->ff->st != NULL) + if (folder->ff->local) { int do_locales = TRUE; @@ -175,13 +174,13 @@ } } else { tnow = time (NULL); - t_fmt = tnow - folder->ff->st->st_mtime < 31536000 ? "%b %d %H:%M" : "%b %d %Y"; + 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->st->st_mtime)); + strftime (date, sizeof (date), t_fmt, localtime (&folder->ff->mtime)); mutt_format_s (dest, destlen, fmt, date); } @@ -200,27 +199,27 @@ s = NONULL (folder->ff->name); snprintf (fn, sizeof (fn), "%s%s", s, - folder->ff->st ? (S_ISLNK (folder->ff->st->st_mode) ? "@" : - (S_ISDIR (folder->ff->st->st_mode) ? "/" : - ((folder->ff->st->st_mode & S_IXUSR) != 0 ? "*" : ""))) : ""); + folder->ff->local ? (S_ISLNK (folder->ff->mode) ? "@" : + (S_ISDIR (folder->ff->mode) ? "/" : + ((folder->ff->mode & S_IXUSR) != 0 ? "*" : ""))) : ""); mutt_format_s (dest, destlen, fmt, fn); break; } case 'F': - if (folder->ff->st != NULL) + if (folder->ff->local) { snprintf (permission, sizeof (permission), "%c%c%c%c%c%c%c%c%c%c", - S_ISDIR(folder->ff->st->st_mode) ? 'd' : (S_ISLNK(folder->ff->st->st_mode) ? 'l' : '-'), - (folder->ff->st->st_mode & S_IRUSR) != 0 ? 'r': '-', - (folder->ff->st->st_mode & S_IWUSR) != 0 ? 'w' : '-', - (folder->ff->st->st_mode & S_ISUID) != 0 ? 's' : (folder->ff->st->st_mode & S_IXUSR) != 0 ? 'x': '-', - (folder->ff->st->st_mode & S_IRGRP) != 0 ? 'r' : '-', - (folder->ff->st->st_mode & S_IWGRP) != 0 ? 'w' : '-', - (folder->ff->st->st_mode & S_ISGID) != 0 ? 's' : (folder->ff->st->st_mode & S_IXGRP) != 0 ? 'x': '-', - (folder->ff->st->st_mode & S_IROTH) != 0 ? 'r' : '-', - (folder->ff->st->st_mode & S_IWOTH) != 0 ? 'w' : '-', - (folder->ff->st->st_mode & S_ISVTX) != 0 ? 't' : (folder->ff->st->st_mode & S_IXOTH) != 0 ? 'x': '-'); + S_ISDIR(folder->ff->mode) ? 'd' : (S_ISLNK(folder->ff->mode) ? 'l' : '-'), + (folder->ff->mode & S_IRUSR) != 0 ? 'r': '-', + (folder->ff->mode & S_IWUSR) != 0 ? 'w' : '-', + (folder->ff->mode & S_ISUID) != 0 ? 's' : (folder->ff->mode & S_IXUSR) != 0 ? 'x': '-', + (folder->ff->mode & S_IRGRP) != 0 ? 'r' : '-', + (folder->ff->mode & S_IWGRP) != 0 ? 'w' : '-', + (folder->ff->mode & S_ISGID) != 0 ? 's' : (folder->ff->mode & S_IXGRP) != 0 ? 'x': '-', + (folder->ff->mode & S_IROTH) != 0 ? 'r' : '-', + (folder->ff->mode & S_IWOTH) != 0 ? 'w' : '-', + (folder->ff->mode & S_ISVTX) != 0 ? 't' : (folder->ff->mode & S_IXOTH) != 0 ? 'x': '-'); mutt_format_s (dest, destlen, fmt, permission); } #ifdef USE_IMAP @@ -237,14 +236,14 @@ break; case 'g': - if (folder->ff->st != NULL) + if (folder->ff->local) { - if ((gr = getgrgid (folder->ff->st->st_gid))) + if ((gr = getgrgid (folder->ff->gid))) mutt_format_s (dest, destlen, fmt, gr->gr_name); else { snprintf (tmp, sizeof (tmp), "%%%sld", fmt); - snprintf (dest, destlen, tmp, folder->ff->st->st_gid); + snprintf (dest, destlen, tmp, folder->ff->gid); } } else @@ -252,10 +251,10 @@ break; case 'l': - if (folder->ff->st != NULL) + if (folder->ff->local) { snprintf (tmp, sizeof (tmp), "%%%sd", fmt); - snprintf (dest, destlen, tmp, folder->ff->st->st_nlink); + snprintf (dest, destlen, tmp, folder->ff->nlink); } else mutt_format_s (dest, destlen, fmt, ""); @@ -280,9 +279,9 @@ break; case 's': - if (folder->ff->st != NULL) + if (folder->ff->local) { - mutt_pretty_size(fn, sizeof(fn), folder->ff->st->st_size); + mutt_pretty_size(fn, sizeof(fn), folder->ff->size); snprintf (tmp, sizeof (tmp), "%%%ss", fmt); snprintf (dest, destlen, tmp, fn); } @@ -296,14 +295,14 @@ break; case 'u': - if (folder->ff->st != NULL) + if (folder->ff->local) { - if ((pw = getpwuid (folder->ff->st->st_uid))) + if ((pw = getpwuid (folder->ff->uid))) mutt_format_s (dest, destlen, fmt, pw->pw_name); else { snprintf (tmp, sizeof (tmp), "%%%sld", fmt); - snprintf (dest, destlen, tmp, folder->ff->st->st_uid); + snprintf (dest, destlen, tmp, folder->ff->uid); } } else @@ -317,9 +316,9 @@ } if (optional) - mutt_FormatString (dest, destlen, col, ifstring, folder_format_str, data, 0); - else if (flags & M_FORMAT_OPTIONAL) - mutt_FormatString (dest, destlen, col, elsestring, folder_format_str, data, 0); + mutt_FormatString (dest, destlen, col, cols, ifstring, folder_format_str, data, 0); + else if (flags & MUTT_FORMAT_OPTIONAL) + mutt_FormatString (dest, destlen, col, cols, elsestring, folder_format_str, data, 0); return (src); } @@ -343,10 +342,14 @@ (state->entry)[state->entrylen].mode = s->st_mode; (state->entry)[state->entrylen].mtime = s->st_mtime; (state->entry)[state->entrylen].size = s->st_size; + (state->entry)[state->entrylen].gid = s->st_gid; + (state->entry)[state->entrylen].uid = s->st_uid; + (state->entry)[state->entrylen].nlink = s->st_nlink; - (state->entry)[state->entrylen].st = safe_malloc (sizeof (struct stat)); - memcpy ((state->entry)[state->entrylen].st, s, sizeof (struct stat)); + (state->entry)[state->entrylen].local = 1; } + else + (state->entry)[state->entrylen].local = 0; (state->entry)[state->entrylen].new = new; (state->entry)[state->entrylen].name = safe_strdup (name); @@ -515,8 +518,8 @@ folder.ff = &((struct folder_file *) menu->data)[num]; folder.num = num; - mutt_FormatString (s, slen, 0, NONULL(FolderFormat), folder_format_str, - (unsigned long) &folder, M_FORMAT_ARROWCURSOR); + mutt_FormatString (s, slen, 0, MuttIndexWindow->cols, NONULL(FolderFormat), folder_format_str, + (unsigned long) &folder, MUTT_FORMAT_ARROWCURSOR); } static void init_menu (struct browser_state *state, MUTTMENU *menu, char *title, @@ -579,9 +582,9 @@ MUTTMENU *menu; struct stat st; int i, killPrefix = 0; - int multiple = (flags & M_SEL_MULTI) ? 1 : 0; - int folder = (flags & M_SEL_FOLDER) ? 1 : 0; - int buffy = (flags & M_SEL_BUFFY) ? 1 : 0; + int multiple = (flags & MUTT_SEL_MULTI) ? 1 : 0; + int folder = (flags & MUTT_SEL_FOLDER) ? 1 : 0; + int buffy = (flags & MUTT_SEL_BUFFY) ? 1 : 0; buffy = buffy && folder; @@ -964,7 +967,7 @@ } snprintf (msg, sizeof (msg), _("Really delete mailbox \"%s\"?"), mx.mbox); - if (mutt_yesorno (msg, M_NO) == M_YES) + if (mutt_yesorno (msg, MUTT_NO) == MUTT_YES) { if (!imap_delete_mailbox (Context, mx)) { @@ -1001,7 +1004,7 @@ buf[len]='/'; } - if (mutt_get_field (_("Chdir to: "), buf, sizeof (buf), M_FILE) == 0 && + if (mutt_get_field (_("Chdir to: "), buf, sizeof (buf), MUTT_FILE) == 0 && buf[0]) { buffy = 0; @@ -1205,7 +1208,7 @@ case OP_BROWSER_NEW_FILE: snprintf (buf, sizeof (buf), "%s/", LastDir); - if (mutt_get_field (_("New file name: "), buf, sizeof (buf), M_FILE) == 0) + if (mutt_get_field (_("New file name: "), buf, sizeof (buf), MUTT_FILE) == 0) { strfcpy (f, buf, flen); destroy_state (&state); @@ -1248,7 +1251,7 @@ b = mutt_make_file_attach (buf); if (b != NULL) { - mutt_view_attachment (NULL, b, M_REGULAR, NULL, NULL, 0); + mutt_view_attachment (NULL, b, MUTT_REGULAR, NULL, NULL, 0); mutt_free_body (&b); menu->redraw = REDRAW_FULL; } diff -r 7e817890913c -r 88793198dfcb browser.h --- a/browser.h Fri Jul 01 13:33:20 2016 -0700 +++ b/browser.h Wed Jul 06 10:43:56 2016 -0700 @@ -24,7 +24,9 @@ mode_t mode; off_t size; time_t mtime; - struct stat *st; + uid_t uid; + gid_t gid; + nlink_t nlink; char *name; char *desc; @@ -37,6 +39,7 @@ unsigned selectable : 1; unsigned inferiors : 1; #endif + unsigned local : 1; /* folder is on local filesystem */ unsigned tagged : 1; }; diff -r 7e817890913c -r 88793198dfcb buffy.c --- a/buffy.c Fri Jul 01 13:33:20 2016 -0700 +++ b/buffy.c Wed Jul 06 10:43:56 2016 -0700 @@ -27,6 +27,10 @@