Richard Russon [Thu, 30 Mar 2017 22:25:56 +0000 (23:25 +0100)]
merge: Tidy the code - Part 3
* fix: typo in browser_compare_count{_new}
* build: remove generated files from repo
* tidy: comments
* build: look for translations in all files
* fix: arguments to printf-style functions
* tidy: license text
* tidy: unify include-guards
* build: tidy makefiles
* tidy: initialise pointers
* tidy: make strcmp-like functions clearer
* tidy: unify sizeof usage
* build: remove forward declarations
* tidy: remove ()s from return
Richard Russon [Sun, 26 Mar 2017 01:19:36 +0000 (02:19 +0100)]
tidy: remove ()s from return
The 'return' operator doesn't require its argument to the ()'d.
This has lead to some very inconsistent code.
This commit removes the ()s from return where the argument is a single
token, e.g.
return 42;
return fn(x);
There are ~480 occurrences.
Richard Russon [Sat, 25 Mar 2017 16:20:01 +0000 (16:20 +0000)]
build: remove forward declarations
Richard Russon [Sat, 25 Mar 2017 15:57:40 +0000 (15:57 +0000)]
tidy: unify sizeof usage
The sizeof operator doesn't always require the argument to be ()'d.
However it wasn't used consistently. Add ()s to all uses of sizeof.
Richard Russon [Thu, 23 Mar 2017 02:28:31 +0000 (02:28 +0000)]
tidy: make strcmp-like functions clearer
There are ~600 uses of strcmp-like functions:
- ascii_strcasecmp
- ascii_strcmp
- ascii_strncasecmp
- ascii_strncmp
- imap_mxcmp
- imap_wordcasecmp
- mutt_inbox_cmp
- mutt_strcasecmp
- mutt_strcmp
- mutt_strncasecmp
- mutt_strncmp
- strcasecmp
- strcmp
- strncasecmp
- strncmp
- wcscasecmp
Because strcmp returns 0 on a successful match, conditionals can easily
be misread:
if (strcmp(s, "hello"))
{
/* code if string 's' DOES NOT match */
}
These have been changed to explicitly mention the return value:
if (strcmp(s, "hello") != 0)
{
/* code if string 's' DOES NOT match */
}
Richard Russon [Wed, 22 Mar 2017 22:16:16 +0000 (22:16 +0000)]
tidy: initialise pointers
Initialise ~1000 pointer declarations to NULL.
This incurs a very tiny cost at runtime.
This command was used to create a vim location-list:
grep -ni "^[ ^I]\+\<[a-z_0-9]\+ *\* *[a-z_0-9]\+;"
Richard Russon [Mon, 20 Mar 2017 19:12:32 +0000 (19:12 +0000)]
build: tidy makefiles
- sort out subdirs
- remove unnecessary HAVE_CONFIG_H define
- tidy source lists
- drop NLS config reference
- drop unused make targets
Richard Russon [Thu, 16 Mar 2017 23:19:36 +0000 (23:19 +0000)]
tidy: unify include-guards
- add missing include-guards
- unify existing include-guards
- unnecessary conditionals around whole source
Richard Russon [Thu, 16 Mar 2017 18:30:31 +0000 (18:30 +0000)]
tidy: license text
- add missing license text
- tidy existing license text
Richard Russon [Tue, 21 Mar 2017 23:35:25 +0000 (23:35 +0000)]
fix: arguments to printf-style functions
By adding an attribute to printf-style functions, the compiler can spot
errors in the arguments.
Because the attributes aren't portable, they haven't been committed.
__attribute__((format (printf, 1, 2)))
Richard Russon [Tue, 21 Mar 2017 02:20:30 +0000 (02:20 +0000)]
build: look for translations in all files
List ALL of the source files to the passed to the translations.
Richard Russon [Tue, 21 Mar 2017 03:03:18 +0000 (03:03 +0000)]
tidy: comments
- drop CVS marker: $Id$
- convert // comments
- delete blank line between comment and function
Richard Russon [Mon, 20 Mar 2017 22:57:58 +0000 (22:57 +0000)]
build: remove generated files from repo
Build temporary:
po/stamp-po
Copied in by autoreconf
po/boldquot.sed
po/en@boldquot.header
po/en@quot.header
po/insert-header.sin
po/quot.sed
po/remove-potcdate.sin
Richard Russon [Fri, 24 Mar 2017 21:48:24 +0000 (21:48 +0000)]
fix: typo in browser_compare_count{_new}
A typo meant that sorting by "count" or "count new" could not be done in
reverse.
Richard Russon [Thu, 30 Mar 2017 20:20:31 +0000 (21:20 +0100)]
add mailmap entries
This covers all committers since the start of NeoMutt.
Tobias Angele [Thu, 30 Mar 2017 15:23:07 +0000 (17:23 +0200)]
doc: use neomutt mailinglist (#483)
Closes neomutt/neomutt.github.io#30
Website page updated too.
Kevin McCarthy [Mon, 27 Mar 2017 18:39:42 +0000 (11:39 -0700)]
Fix (un)sidebar_whitelist to expand paths.
Thanks to Arturo for reporting the issue.
Closes #485
Pietro Cerutti [Tue, 28 Mar 2017 13:23:28 +0000 (14:23 +0100)]
Fix inbox-first functionality when using mutt_pretty_mailbox (#490)
Fix inbox-first functionality when using mutt_pretty_mailbox
Fixes #489
Richard Russon [Wed, 22 Mar 2017 16:44:02 +0000 (16:44 +0000)]
merge: Tidy the code - Part 2
* build: force OPS to be rebuild after a reconfigure
* build: fix minor code warnings / style
* tidy: be specific about void functions
* build: expand a few more alloc macros
* tidy: add argument names to function prototypes
* build: drop local copy of regex code
* tidy: indent the docbook manual
* tidy: rearrange code to avoid forward declarations
* tidy: limit the scope of some functions
* build: give the compress functions a unique name
* tidy: use snake_case for function names
* build: add missing newlines to mutt_debug
Richard Russon [Thu, 16 Mar 2017 14:26:59 +0000 (14:26 +0000)]
build: add missing newlines to mutt_debug
Richard Russon [Thu, 16 Mar 2017 03:22:47 +0000 (03:22 +0000)]
tidy: use snake_case for function names
e.g.
- getDate -> get_date
- mutt_menuDestroy -> mutt_menu_destroy
Richard Russon [Thu, 16 Mar 2017 02:35:05 +0000 (02:35 +0000)]
build: give the compress functions a unique name
The compressed mailbox functions are passed as pointers to mutt.
Their names, e.g. "open_mailbox" are OK for compilation, but they are
ambiguous when debugging.
- prefix exported function names with "comp_"
Richard Russon [Wed, 15 Mar 2017 01:22:26 +0000 (01:22 +0000)]
tidy: limit the scope of some functions
Functions that are only used in one file (compilation unit), should be
declared "static". Also, they shouldn't have the prefix "mutt_".
- make two functions static (only used in one place)
- remove "mutt_" prefix
- add missing "static" declaration
Richard Russon [Wed, 15 Mar 2017 03:50:02 +0000 (03:50 +0000)]
tidy: rearrange code to avoid forward declarations
This change, though huge, is quite simple.
It simply rearranges functions, within files, to remove the need to
forward-declare them. There were ~90 such declarations.
Forward declarations are rarely *needed* and just add to the cruft that
needs to be maintained.
Richard Russon [Wed, 15 Mar 2017 00:05:56 +0000 (00:05 +0000)]
tidy: indent the docbook manual
Indent the xml of the docbook manual.
Put a blank line before <chapter>, <sect*> or <table>
This doesn't change the manual functionally, but it makes it easier to
navigate.
Richard Russon [Mon, 13 Mar 2017 14:33:20 +0000 (14:33 +0000)]
build: drop local copy of regex code
The regular expression (regex) is now a standard part of the C libraries.
Use that, rather than our 18 year old version.
Richard Russon [Tue, 14 Mar 2017 14:19:23 +0000 (14:19 +0000)]
tidy: add argument names to function prototypes
This isn't very useful:
int function (int, int);
This is clearer
int function (int row, int col);
Richard Russon [Wed, 15 Mar 2017 00:55:49 +0000 (00:55 +0000)]
build: expand a few more alloc macros
Following some early work, expand some more macros to functions:
- pgp_new_keyinfo()
- new_pattern()
- rfc822_new_address()
Richard Russon [Wed, 15 Mar 2017 00:55:24 +0000 (00:55 +0000)]
tidy: be specific about void functions
Some functions have been declared with "()" when they should be "(void)".
Richard Russon [Wed, 15 Mar 2017 00:24:02 +0000 (00:24 +0000)]
build: fix minor code warnings / style
- remove an unnecessary backslash
- put variable in same preprocessor scope
- move prototype to where it's needed
Richard Russon [Wed, 15 Mar 2017 18:39:10 +0000 (18:39 +0000)]
build: force OPS to be rebuild after a reconfigure
A common problem is getting build errors after running ./configure for
the second time, e.g.
./configure [FEW OPTIONS]; make
./configure [MANY OPTIONS]; make
This commit forces keymap_defs.h to be rebuilt after a configure.
Richard Russon [Fri, 17 Mar 2017 16:30:13 +0000 (16:30 +0000)]
build: don't look for lua libs unless asked for
fixes: #478
Richard Russon [Tue, 21 Mar 2017 16:12:39 +0000 (16:12 +0000)]
merge: upstream fixes (mutt/default)
* Add SNI support for OpenSSL. (see #3923)
* Add SNI support for GnuTLS. (closes #3923)
* Add shortcuts for IMAP and POP mailboxes in the file browser
* Change OpenSSL to use SHA-256 for cert comparison. (closes #3924)
* Fix conststrings type mismatches. (closes #3926)
* Pass envlist to filter children too. (closes #3922)
* Fix mutt_envlist_set() for the case that envlist is null. (see #3922)
* Fix setenv overwriting to not truncate the envlist. (see #3922)
Kevin McCarthy [Mon, 20 Mar 2017 17:16:03 +0000 (10:16 -0700)]
Fix setenv overwriting to not truncate the envlist. (see #3922)
The refactor in
2b9c40f13e13 exposed a bug I hadn't noticed. The
match loop performed a FREE() on the slot. Then, below, it was
checking if (*envp) to see whether it was overwriting or creating a
new slot. However, FREE() nulls out *envp. This would end up
truncating the envlist just after the set slot!
Move the free down, using a mutt_str_replace(), when overwriting the
slot.
Kevin McCarthy [Sat, 18 Mar 2017 21:39:12 +0000 (14:39 -0700)]
Fix mutt_envlist_set() for the case that envlist is null. (see #3922)
Kevin McCarthy [Sat, 18 Mar 2017 20:48:02 +0000 (13:48 -0700)]
Pass envlist to filter children too. (closes #3922)
The new setenv patch neglected to pass the envlist for filters too.
Unfortunately, the filter code was already set up to pass COLUMNS to
children, so it needed to be changed to add this to the envlist
instead.
Factor out mutt_envlist_set() from the parse_setenv() function, which
the filter code can then use to set COLUMNS after forking.
Kevin McCarthy [Sat, 18 Mar 2017 20:38:20 +0000 (13:38 -0700)]
Fix conststrings type mismatches. (closes #3926)
The generation programs for conststrings.c: txt2c.c and txt2c.sh,
specified the resultant types as "unsigned char[]" while version.c
declared them as "const char[]".
txt2.c generates 0xXX hex codes for each individual character, thus
the "unsigned" definition. With link-time optimization, some versions
of gcc notice the mismatch and emit a warning.
Change the declarations to match the definitions and cast to char[]
when they are used.
Kevin McCarthy [Tue, 14 Mar 2017 01:38:23 +0000 (18:38 -0700)]
Change OpenSSL to use SHA-256 for cert comparison. (closes #3924)
Note the GnuTLS code compares the certs directly to check if they are
in the certfile.
Dmitri Vereshchagin [Sun, 12 Mar 2017 17:54:58 +0000 (10:54 -0700)]
Add shortcuts for IMAP and POP mailboxes in the file browser
Mailbox list may not be properly displayed in a standard 80-column
terminal window if the $folder variable contains a long URL. In such
a case only left part of each entry name can be visible with the default
value of $folder_format. What's worse, this visible part may not be
enough to distinguish between the entries.
Thus in this case mutt_pretty_mailbox() will be just as useful as for
local mailboxes.
Kevin McCarthy [Thu, 9 Mar 2017 21:38:30 +0000 (13:38 -0800)]
Add SNI support for GnuTLS. (closes #3923)
Kevin McCarthy [Thu, 9 Mar 2017 21:00:10 +0000 (13:00 -0800)]
Add SNI support for OpenSSL. (see #3923)
The original patch for this is by Phil Pennock at:
https://people.spodhuis.org/phil.pennock/software/mutt-patches/
I have removed the OpenSSL version check and defined(OPENSSL_NO_TLSEXT)
check because:
* SSL_set_tlsext_host_name() was added in 0.9.8f [11 Oct 2007]
* OpenSSL 1.1 no longer has the OPENSSL_NO_TLSEXT compilation option
* https://rt.openssl.org/Ticket/Display.html?id=2788&user=guest&pass=guest
shows that the no-tlsext compilation option has been broken for some time.
* Going forward, I'd like to minimize and start removing cruft required
to support ancient/insecure versions of libraries.
Pietro Cerutti [Fri, 17 Mar 2017 14:40:08 +0000 (14:40 +0000)]
build: drop two more obsolete m4 scripts (#477)
Kevin Decherf [Fri, 17 Mar 2017 02:34:20 +0000 (03:34 +0100)]
index_format: add support of %K (#452)
Unlike %B, %K will remain empty if there is no list detected for the
message.
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
Pietro Cerutti [Wed, 15 Mar 2017 19:34:58 +0000 (19:34 +0000)]
Make iconv mandatory (no more --disable-iconv)
Issue: #460
Pietro Cerutti [Wed, 8 Mar 2017 21:47:50 +0000 (21:47 +0000)]
Switch to using an external gettext runtime
Issue: #460
Richard Russon [Fri, 17 Mar 2017 00:01:33 +0000 (00:01 +0000)]
merge: Tidy the code - Part 1
* drop control characters from the source
* drop vim modelines
* delete trailing whitespace
* mark all local functions as static
* delete unused functions
* replace FOREVER with while (true)
* drop #if HAVE_CONFIG_H
* use #ifdef for potentially missing symbols
* remove #if 0 code blocks
* drop commented out source
* IMAP auth functions are stored by pointer cannot be static
Pietro Cerutti [Mon, 13 Mar 2017 11:41:30 +0000 (11:41 +0000)]
IMAP auth functions are stored by pointer cannot be static
See the imap_authenticators array in imap/auth.c. This is exposed by
building without SASL.
Richard Russon [Mon, 13 Mar 2017 03:59:20 +0000 (03:59 +0000)]
drop commented out source
This source has been commented out for over 6 months
(and much of it for more than 10 years).
Richard Russon [Sun, 12 Mar 2017 17:27:50 +0000 (17:27 +0000)]
remove #if 0 code blocks
This code has been commented out for over 6 months
(and much of it for more than 10 years).
Richard Russon [Mon, 13 Mar 2017 02:08:05 +0000 (02:08 +0000)]
use #ifdef for potentially missing symbols
Some preprocessor symbols might not exist
They should be tested with #ifdef, not #if
Richard Russon [Sun, 12 Mar 2017 18:48:35 +0000 (18:48 +0000)]
drop #if HAVE_CONFIG_H
config.h is a compulsory part of the project.
The preprocessor conditional doesn't make sense.
Richard Russon [Sun, 12 Mar 2017 16:17:03 +0000 (16:17 +0000)]
replace FOREVER with while (true)
Replace a macro with some simple C.
Richard Russon [Sun, 12 Mar 2017 15:37:12 +0000 (15:37 +0000)]
delete unused functions
These functions have been commented out for over 6 months
(and many for more than 10 years).
Richard Russon [Sun, 12 Mar 2017 13:25:25 +0000 (13:25 +0000)]
mark all local functions as static
Local functions don't need to be prototyped in a header file.
Richard Russon [Sun, 12 Mar 2017 02:09:10 +0000 (02:09 +0000)]
delete trailing whitespace
Richard Russon [Sun, 12 Mar 2017 01:27:21 +0000 (01:27 +0000)]
drop vim modelines
We now favour .editorconfig which is controlled at the project level.
Richard Russon [Sun, 12 Mar 2017 01:15:02 +0000 (01:15 +0000)]
drop control characters from the source
Specifically, drop ^L (form feed)
Richard Russon [Mon, 13 Mar 2017 09:31:20 +0000 (09:31 +0000)]
build: drop #pragma include guard
Richard Russon [Sun, 12 Mar 2017 14:01:38 +0000 (14:01 +0000)]
docs: fix validation for lua
Richard Russon [Thu, 9 Mar 2017 14:55:16 +0000 (14:55 +0000)]
build: reorder use of OPS
"keymap_defs.h" is generated from the OPS files that are included in the
build.
"keymap_alldefs.h" is generated from ALL the OPS files.
(it's used by "make -C po update-po")
Change the build to ensure they include the OPS files in the same order.
Richard Russon [Thu, 9 Mar 2017 14:54:34 +0000 (14:54 +0000)]
fix: build warning
This was introduced by the buffer.c refactor.
Richard Russon [Wed, 8 Mar 2017 02:06:11 +0000 (02:06 +0000)]
fix typos and grammar in the comments
Richard Russon [Sat, 11 Mar 2017 23:38:00 +0000 (23:38 +0000)]
merge: upstream fixes (mutt/default)
* Add $ssl_verify_partial_chains option for OpenSSL. (closes #3916)
* Move the OpenSSL partial chain support check inside configure.ac. (see #3916)
* Don't allow storing duplicate certs for OpenSSL interactive prompt. (closes #3914)
* Prevent skipped certs from showing a second time. (see #3916)
* OpenSSL: Don't offer (a)ccept always choice for hostname mismatches. (closes #3914)
closes #429
closes #459
Kevin McCarthy [Thu, 9 Mar 2017 19:59:31 +0000 (11:59 -0800)]
OpenSSL: Don't offer (a)ccept always choice for hostname mismatches. (closes #3914)
On a hostname mismatch, saving the certificate is pointless because
mutt will ask the user no matter if the certificate is saved or not.
The only invocation allowing "accept always" is guarded by a call to
check_certificate_digest(), which means the check_certificate_file()
check is redundant. Therefore remove that check and add a comment
noting why.
Thanks to Matthias Andree for the original version of this patch.
Kevin McCarthy [Thu, 9 Mar 2017 18:56:21 +0000 (10:56 -0800)]
Prevent skipped certs from showing a second time. (see #3916)
OpenSSL sometimes passes a skipped certificate to
ssl_verify_callback() a second time, with preverify_ok=1. From
OpenSSL's viewpoint there is nothing wrong with this, but mutt will
end up showing the certificate in the interactive prompt again.
Cache the last cert and position, and compare with the latest when
skip_mode and preverify_ok are both set.
Kevin McCarthy [Wed, 8 Mar 2017 02:26:07 +0000 (18:26 -0800)]
Don't allow storing duplicate certs for OpenSSL interactive prompt. (closes #3914)
Check to make sure the certificate is not already in the
$certificate_file before offering the (a)ccept always option.
To allow a cert with a new validity timespan to be added to the file,
check the expiration dates when comparing certificates in the
certficate file.
Kevin McCarthy [Wed, 8 Mar 2017 02:26:06 +0000 (18:26 -0800)]
Move the OpenSSL partial chain support check inside configure.ac. (see #3916)
Instead of directly checking whether X509_V_FLAG_PARTIAL_CHAIN is
defined everywhere, do it once inside configure. This will allow
better support in the future if the test needs to change.
Matthias Andree [Wed, 8 Mar 2017 02:26:04 +0000 (18:26 -0800)]
Add $ssl_verify_partial_chains option for OpenSSL. (closes #3916)
The reworked OpenSSL certificate validation took away a "feature" of
the previous implementation: the ability to reject a node in the chain
and yet continue to the next node.
If this new option is set to 'yes', enables OpenSSL's
X509_V_FLAG_PARTIAL_CHAIN flag to reinstate the functionality and permit
to use a non-root certificate as the trust anchor.
This option is only available if OpenSSL offers the
X509_V_FLAG_PARTIAL_CHAIN macro, which should be the case as of 1.0.2b
or later.
Code written by Kevin McCarthy and Matthias Andree.
Richard Russon [Sat, 11 Mar 2017 19:11:12 +0000 (19:11 +0000)]
merge: add lua scripting
* lua: add basic working example
* Adding basic Lua scripting basics to mutt
* Refactor of the regex parsing code into its own function
* Added new headers mutt_commands.h and mutt_options.h
* Added -B option for batch mode. exiting before any mail sending feature
* Lua API for Mutt's config and commandline
Guyzmo [Sun, 15 Jan 2017 02:29:23 +0000 (03:29 +0100)]
Lua API for Mutt's config and commandline
* adds the following to Mutt's API:
* `:lua` to execute a line of Lua
* `:lua-source` to load and run a Lua source file
* exposes the following Mutt API in Lua:
* `mutt.message()` To write a message on Mutt's command line
* `mutt.error()` To write an error message on Mutt's command line
* `mutt.enter()` run an arbitrary Mutt command, like with `:enter-command`
* `mutt.get()` get a variable from Mutt
* `mutt.set()` sets a variable from Mutt (with type enforcement)
* `mutt.call()` calls a command available in mutt, with arguments
* `mutt.command.*` exposes all the commands from within Mutt
* For some technical details:
* proper error handling of the Lua interpreter
* exposed mutt_option_set and mutt_option_get from init
fixes: #153
Signed-off-by: Guyzmo <guyzmo+github+pub@m0g.net>
Guyzmo [Mon, 16 Jan 2017 21:29:34 +0000 (22:29 +0100)]
Added -B option for batch mode. exiting before any mail sending feature
Guyzmo [Mon, 16 Jan 2017 13:27:31 +0000 (14:27 +0100)]
Added new headers mutt_commands.h and mutt_options.h
they export data types originally in init.h
Signed-off-by: Guyzmo <guyzmo+github+pub@m0g.net>
Guyzmo [Mon, 16 Jan 2017 12:53:52 +0000 (13:53 +0100)]
Refactor of the regex parsing code into its own function
Signed-off-by: Guyzmo <guyzmo+github+pub@m0g.net>
Guyzmo [Sat, 14 Jan 2017 12:31:58 +0000 (13:31 +0100)]
Adding basic Lua scripting basics to mutt
* adding two commands:
- lua: to parse a line of lua code
- lua-source: to load and parse a lua file
* binding two mutt functions in lua:
- mutt_message and
- mutt_error
cf #153
Signed-off-by: Guyzmo <guyzmo+github+pub@m0g.net>
Richard Russon [Tue, 30 Aug 2016 15:00:51 +0000 (16:00 +0100)]
lua: add basic working example
- add lua code template
- add mutt variable
- add mutt function
- set/get lua variables
- call c function from lua
- add lua build deps
Richard Russon [Sat, 11 Mar 2017 18:46:00 +0000 (18:46 +0000)]
fix: Garbage in chdir prompt due to unescaped string
I upgraded one of my stable systems to stretch and noticed that when
changing the directory with 'c', there was some garbage at the end of
the string in the prompt. I've not noticed that before on my main
amd64 system, but this stable system is i386, so different alignment
and word size that can affect this kind of thing.
I tracked it down to an unescaped string handling.
Debian BTS#857433
Ian Zimmerman [Tue, 7 Mar 2017 12:19:12 +0000 (04:19 -0800)]
refactor: Split out BUFFER-handling functions (#443)
Richard Russon [Tue, 7 Mar 2017 12:09:48 +0000 (12:09 +0000)]
merge: mx cleanups
* mx: remove `#ifdef USE_COMPRESSED` in mx_fastclose_mailbox
* mx: don't make MUTT_NNTP and MUTT_COMPRESSED conditional
* mx: remove an `#ifdef USE_NNTP` block
Closes #426
Damien Riegel [Wed, 22 Feb 2017 23:44:12 +0000 (18:44 -0500)]
mx: remove an `#ifdef USE_NNTP` block
The `MUTT_NNTP` symbol now exists unconditionally, the corresponding
ifdef block is not necessary anymore.
Damien Riegel [Sat, 18 Feb 2017 19:19:58 +0000 (14:19 -0500)]
mx: don't make MUTT_NNTP and MUTT_COMPRESSED conditional
Other symbols like MUTT_IMAP and MUTT_POP don't depend on their
respective configuration flags to be defined, keep the same logic for
MUTT_NNTP and MUTT_COMPRESSED. That makes it easier to remove some
ifdef.
Damien Riegel [Sat, 18 Feb 2017 18:41:19 +0000 (13:41 -0500)]
mx: remove `#ifdef USE_COMPRESSED` in mx_fastclose_mailbox
Some code to cleanup compressed mailbox on close depends on an #ifdef
block in mx_fastclose_mailbox, but this mailbox specific code should be
implemented in the mx_ops' close function.
This commit moves the call to `mutt_free_compress_info` in the mailbox
close function, allowing us to mark it static and to remove the ifdef.
Mehdi ABAAKOUK [Tue, 7 Mar 2017 12:05:15 +0000 (13:05 +0100)]
Fix uncollapse_new in pager (#447)
In pager, the index refresher uses the current count as oldcount.
This change fixes that.
Closes #305
Mehdi ABAAKOUK [Tue, 7 Mar 2017 12:02:43 +0000 (13:02 +0100)]
attachment/pager: Use mailcap for test/* except plain (#449)
* attachment: Use mailcap for test/* except plain
This change makes attachment view using mailcap for everything
not text/plain.
* pager: Don't assume all text/* are plaintext
This change removes the assumption that all text/* are humain readable
plaintext.
Closes #430
Richard Russon [Mon, 6 Mar 2017 20:53:09 +0000 (20:53 +0000)]
docs: updates for 1.8.0
Richard Russon [Mon, 6 Mar 2017 15:06:13 +0000 (15:06 +0000)]
NeoMutt 2017-03-06 (1.8.0)
Pietro Cerutti [Mon, 6 Mar 2017 14:16:04 +0000 (14:16 +0000)]
Get the correct buffer size under fmemopen/torify (#441)
* Get the correct buffer size under fmemopen/torify
* Flush only if needed, avoid memory leak
* Initialize variables for eye sanity
Richard Russon [Mon, 6 Mar 2017 13:51:27 +0000 (13:51 +0000)]
merge: sync to mutt/default
Pietro Cerutti [Mon, 6 Mar 2017 11:07:06 +0000 (11:07 +0000)]
Use static inlines to make gcc 4.2.1 happy
Closes: #432
Mehdi Abaakouk [Sun, 5 Mar 2017 20:01:48 +0000 (21:01 +0100)]
getdnsdomainname: cancel getaddrinfo_a if needed
if getaddrinfo_a() is not finish on time we must call
gai_cancel() and wait getaddrinfo_a() to finish.
Closes #453
Richard Russon [Mon, 6 Mar 2017 12:45:01 +0000 (12:45 +0000)]
merge: upstream fixes (mutt/default)
* Clear out extraneous errors before SSL_connect() (see #3916)
* SSL: Fix memory leak in subject alternative name code. (closes #3920)
* Increase ACCOUNT.pass field size. (closes #3921)
Kevin McCarthy [Sun, 5 Mar 2017 23:24:45 +0000 (15:24 -0800)]
Increase ACCOUNT.pass field size. (closes #3921)
#3921 reported his password token used for Google XOAUTH2 is size 129.
The ACCOUNT structure currently uses a size 128 buffer. Who knew a
password field would ever be bigger than that?
Since the ACCOUNT structure has no allocation/dellocation routines,
the easiest fix is to increase the size. Bump the size up to 256.
Kevin McCarthy [Sun, 5 Mar 2017 23:26:03 +0000 (15:26 -0800)]
merge stable
Kevin McCarthy [Sun, 5 Mar 2017 23:24:45 +0000 (15:24 -0800)]
Increase ACCOUNT.pass field size. (closes #3921)
#3921 reported his password token used for Google XOAUTH2 is size 129.
The ACCOUNT structure currently uses a size 128 buffer. Who knew a
password field would ever be bigger than that?
Since the ACCOUNT structure has no allocation/dellocation routines,
the easiest fix is to increase the size. Bump the size up to 256.
Matthias Andree [Thu, 2 Mar 2017 23:53:27 +0000 (15:53 -0800)]
SSL: Fix memory leak in subject alternative name code. (closes #3920)
Kevin McCarthy [Thu, 2 Mar 2017 21:11:52 +0000 (13:11 -0800)]
Clear out extraneous errors before SSL_connect() (see #3916)
Call ERR_clear_error() just before the call to SSL_connect() to make
sure the error queue doesn't have any old errors in it.
PEM_read_X509() sets an error PEM_R_NO_START_LINE on end-of-file.
Clear that out so it doesn't show up as the SSL_connect() error
message.
Kevin McCarthy [Thu, 2 Mar 2017 23:54:19 +0000 (15:54 -0800)]
merge stable
Matthias Andree [Thu, 2 Mar 2017 23:53:27 +0000 (15:53 -0800)]
SSL: Fix memory leak in subject alternative name code. (closes #3920)
Kevin McCarthy [Thu, 2 Mar 2017 22:58:27 +0000 (14:58 -0800)]
merge stable
Kevin McCarthy [Thu, 2 Mar 2017 22:53:20 +0000 (14:53 -0800)]
Prevent segv if open-appending to an mbox fails. (closes #3918)
If mbox_open_mailbox_append() fails, ctx->fp will be null. Add a
check in mbox_close_mailbox(), to prevent a segv from passing null to
fileno().
Kevin McCarthy [Thu, 2 Mar 2017 21:17:50 +0000 (13:17 -0800)]
merge stable