Kevin McCarthy [Wed, 8 Jun 2016 21:43:35 +0000 (14:43 -0700)]
Change the default for sidebar_format to use %n.
The next series of patches is going to create a new option,
$mail_check_stats defaulting off. When off, the extended buffy which
calculates total/new/flagged messages won't be run. To help reduce
"sidebar is broken" bug reports, this changes the default format to
something not requiring extended buffy.
The previous default is documented in the option and preserved in the
sample sidebar muttrc in contrib.
Kevin McCarthy [Wed, 8 Jun 2016 20:16:45 +0000 (13:16 -0700)]
Add sidebar_format flag '%n' to display 'N' on new mail.
Vincent Lefevre [Sat, 11 Jun 2016 15:59:37 +0000 (17:59 +0200)]
Updated French translation.
Richard Russon [Thu, 9 Jun 2016 19:06:10 +0000 (12:06 -0700)]
Fix alignment in the compose menu.
Several of the compose-panel labels didn't use the TITLE_FMT to align
themselves. This causes formatting problems when the width is changed,
e.g. by the NNTP patch.
Vincent Lefevre [Wed, 8 Jun 2016 11:28:54 +0000 (13:28 +0200)]
Corrected OPS.SIDEBAR filename in EXTRA_DIST.
Richard Russon [Tue, 7 Jun 2016 20:40:04 +0000 (13:40 -0700)]
Setting $sidebar_width to more than 128 would cause bad things to happen.
First, give the users more than enough space.
Second, don't pad out short strings beyond the buffer
---
sidebar.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
Kevin McCarthy [Tue, 7 Jun 2016 20:27:45 +0000 (13:27 -0700)]
Fix columns used for $status_format and $pager_format in the pager.
The code was hardcoding use of MuttIndexWindow->cols in
mutt_make_string_info() and MuttStatusWindow->cols in
menu_status_line().
Add a parameter to mutt_make_info_string(). Change menu_status_line()
to use menu->statuswin->cols, falling back to MuttStatusWindow if no
menu is passed in.
Set menu->statuswin appropriately inside pager.c.
Thanks to Richard Russon for tracking down this problem, and for the initial patch.
Kevin McCarthy [Mon, 6 Jun 2016 01:30:37 +0000 (18:30 -0700)]
Add warning in makedoc for unexpected prefices. (see #3845)
In case other types get renamed again in the future, add a warning
message to makedoc.c.
Kevin McCarthy [Mon, 6 Jun 2016 01:05:41 +0000 (18:05 -0700)]
Fix sidebar buffy stats updating on mailbox close.
Move the mutt_sb_set_buffystats() call from mx_fastclose_mailbox() to
the bottom of mx_close_mailbox(). Append-only mailboxes don't have
msgcount set, so fastclose was the wrong place to be doing these
updates.
Kevin McCarthy [Sat, 4 Jun 2016 18:32:12 +0000 (11:32 -0700)]
Start to fix sidebar buffy modifications.
The extended buffy for mh had incorrect placement of the loop
brackets. The counters weren't being incremented in the loop.
Fix extended buffy for maildir to count a maildir message as new if it
doesn't have the info delimeter.
Remove shortcircuits added to the basic buffy stating there is new
mail when (msg_unread > 0). This is not necessarily true, depending
on $mail_check_recent.
Note: the extended buffy still needs more fixes, which will be done
when it is refactored into its own option.
Kevin McCarthy [Sat, 4 Jun 2016 18:32:09 +0000 (11:32 -0700)]
Various fixes to the sidebar logic.
Use strfcpy instead of strncpy. The current logic could write past
the end of the buffer.
Don't mess with BUFFY next pointers during removal. The
mutt_parse_mailboxes() is fine, but this is still not something that
should be done inside sidebar.c.
On removal, set next->prev since we can.
Fix unmailboxes logic:
* only fix the prev pointers once.
* if we unmailbox the open mailbox, set it to NULL.
Lastly, flag a redraw on mailboxes/unmailboxes.
Kevin McCarthy [Sat, 4 Jun 2016 18:32:08 +0000 (11:32 -0700)]
Add "mutt_" prefix to global sidebar functions.
Also, remove unused sb_init declaration.
Kevin McCarthy [Sat, 4 Jun 2016 18:32:07 +0000 (11:32 -0700)]
Clean up the sidebar manual.
Remove the introduction section. It's a nice effort, but reads more
like a tutorial than something that belongs in section 2. Will
probably put in on the website instead.
Remove references to a "patch", neomutt, and the history.
Remove the sample muttrc from the manual.
Fix validation errors for the documentation.
Kevin McCarthy [Sat, 4 Jun 2016 18:32:06 +0000 (11:32 -0700)]
Re-indent and style sidebar.c.
Kevin McCarthy [Sat, 4 Jun 2016 18:32:04 +0000 (11:32 -0700)]
Fix sidebar check_sec.sh warnings.
Use safe_malloc, FREE, and the safe_strcat functions.
Kevin McCarthy [Sat, 4 Jun 2016 18:32:03 +0000 (11:32 -0700)]
Sidebar clean up: building and drawing logic.
Fix the autoconf/makefile.am changes to be consistent.
Create a global SidebarNeedsRedraw to indicate a redraw is needed,
instead of putting sb_draw() everywhere in the code.
Create a menu_redraw_sidebar() function and use the REDRAW_SIDEBAR
flag instead of piggy-backing it inside the index loop.
Fix curs_main.c and pager.c to be a bit cleaner by using the global and
REDRAW_SIDEBAR.
Start to clean up some of the buffy code, but this needs to refactored
and fixed.
Richard Russon [Sat, 4 Jun 2016 18:31:56 +0000 (11:31 -0700)]
Add neomutt version of sidebar patch. (closes #3829)
This is the patch from neomutt; branch 'devel/win-sidebar'; commit
c796fa85f9cacefb69b8f7d8545fc9ba71674180 with the following changes:
- move the sample muttrc and vimrc to contrib.
- remove the README.sidebar.
- empty out the PATCHES file.
Kevin McCarthy [Tue, 31 May 2016 20:20:28 +0000 (13:20 -0700)]
Fix documentation for DT_MAGIC types. (closes #3845)
With the rename of M_ to MUTT_, the documentation generator in
makedoc.c needed to be adjusted for the new prefix size.
Thanks to Damien Riegel for the suggested fix.
Kevin McCarthy [Thu, 26 May 2016 21:45:02 +0000 (14:45 -0700)]
Fix header file indentation after M_ prefix renaming.
The use of tabs caused misalignment of various macro definitions.
Damien Riegel [Thu, 26 May 2016 21:05:42 +0000 (14:05 -0700)]
add check operation to struct mx_ops
In mx_check_mailbox switch case, we simply call
<mailbox>_check_mailbox, so this operation can be move into the mx_ops
structure pretty easily.
This commit adds a mandatory "check" operation to struct mx_ops and
change all mailboxes to use it. Check functions are made static as they
are only used in their respective source files now.
Damien Riegel [Thu, 26 May 2016 21:05:39 +0000 (14:05 -0700)]
mx_check_mailbox: remove lock argument in function call
This function is only called in one place with lock = 0. Basically, all
code under if (lock) is dead code, so we can remove it, making the
function simpler to factorize.
Damien Riegel [Thu, 26 May 2016 21:05:36 +0000 (14:05 -0700)]
add function imap_check_mailbox_reopen
In mx_check_mailbox, imap mailbox is the only function with a different
prototype: it has an extra force argument.
In order to move the check operation to the mx_ops structure, we need
that all mailboxes have the same prototype. To do so, a new function
imap_check_mailbox_reopen is added.
Kevin McCarthy [Wed, 25 May 2016 22:58:04 +0000 (15:58 -0700)]
Add a TODO to mx_open_new_message() to use mx_ops in the future.
We can't use it until mx_open_mailbox_append() is converted to
set mx_ops.
Damien Riegel [Wed, 25 May 2016 22:53:07 +0000 (15:53 -0700)]
add open_new_msg operation to struct mx_ops
The code was already using a function pointer to do this operation. This
commit moves this function pointer to the mx_ops structure and the
open_new_message functions to their respective source files if it needs
to.
Kevin McCarthy [Tue, 24 May 2016 19:45:21 +0000 (12:45 -0700)]
merge stable
Kevin McCarthy [Tue, 24 May 2016 19:08:46 +0000 (12:08 -0700)]
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!
Damien Riegel [Thu, 12 May 2016 19:41:25 +0000 (12:41 -0700)]
Start decoupling mailbox operations.
Introduce a dedicated structure for mailbox operations: struct mx_ops.
Move the open and close operations into that structure.
Assign this structure to the context in mx_open_mailbox. This is
currently based on the "magic" for the mailbox type, but may be
refactored in the future.
Add a stub mbox_close_mailbox function. This function does nothing,
the main purpose is to introduce a mx_ops structure for mbox, so its
usage is similar to mh/imap/pop. We reuse the name that was made
available by the previous commmit. Note that the actual closing of
the descriptor is done in mx.c.
To be more consistent with other mailboxes, introduce functions
mh_open_mailbox and maildir_open_mailbox, and create a dedicated
structure for mmdf.
Damien Riegel [Thu, 12 May 2016 19:41:01 +0000 (12:41 -0700)]
rename mbox_close_mailbox to mx_close_mailbox_append and move it
mbox_close_mailbox was used as the counterpart of
mx_open_mailbox_append. To make things clearer, rename it
mx_close_mailbox_append.
As it is only used in mx.c, move it there and make it static.
Kevin McCarthy [Tue, 10 May 2016 16:42:27 +0000 (09:42 -0700)]
Set COLUMNS to MuttIndexWindow->cols in mutt_create_filter_fd. (closes #3837)
This allows filters to automatically (or via a command line argument)
adjust to the width of the pager/index. This is even more important
with the sidebar, since the width of the pager is smaller than the
terminal width.
Thanks to Vincent Lefèvre for his helpful information and suggestions,
and to Richard Russon for the initial patches.
Kevin McCarthy [Mon, 9 May 2016 21:06:59 +0000 (14:06 -0700)]
Back out wrapper sys_socket.h workaround (
23334e967dd7)
After renaming all internal macros from M_* to MUTT_*, the
sys_socket.h workaround is no longer necessary.
Derek Martin [Mon, 9 May 2016 21:06:54 +0000 (14:06 -0700)]
Change M_* symbols to MUTT_*
Changeset
23334e967dd7 created a workaround for a namespace conflict
with Solaris and derivatives. After some discussion, the team decided
it would be best to move away from using the "M_" prefix for macros.
This patch was automatically generated by running:
perl -wpi -e 's/\bM_(\w+)\b/MUTT_$1/g' `find . -name '*.[ch]' -print`
with the exception that sys_socket.h was exempted. (That file will
be backed out subsequent to this commit.)
Thanks to Andras Salamon for supplying the perl script used to make
this change.
Kevin McCarthy [Tue, 3 May 2016 20:21:41 +0000 (13:21 -0700)]
Skip bidi markers in the pager and index. (closes #3827)
Curses and slang don't support them, so there's little point in
showing them or attempting to somehow deal with them.
This patch adds filtering in the pager, and changes the filtering
added in
6e0aca94cdb0 for the index to completely skip the marker.
Kevin McCarthy [Tue, 3 May 2016 16:46:51 +0000 (09:46 -0700)]
Change mutt_window_getyx() to accept NULL *y/*x params.
Thanks to Vincent Lefèvre for suggesting this nice cleanup.
Previously, _mutt_get_field() was employing an ugly hack to avoid an
unused var warning.
Kevin McCarthy [Sat, 30 Apr 2016 21:39:19 +0000 (14:39 -0700)]
merge stable
Kevin McCarthy [Sat, 30 Apr 2016 21:25:49 +0000 (14:25 -0700)]
mutt-1.6.1 signed
Kevin McCarthy [Sat, 30 Apr 2016 21:23:32 +0000 (14:23 -0700)]
Added tag mutt-1-6-1-rel for changeset
1ef1e39a7218
Kevin McCarthy [Sat, 30 Apr 2016 21:21:44 +0000 (14:21 -0700)]
automatic post-release commit for mutt-1.6.1
Kevin McCarthy [Sat, 30 Apr 2016 20:05:43 +0000 (13:05 -0700)]
Fix pager mini-index drawing when $pager_index_lines = 1 and $status_on_top.
When $pager_index_lines is 1, there is room for the index status line,
but not for any actual index entries. The index redraw part was
always calling menu_redraw_current() which doesn't actually check if
there is room for the current row.
This bug only shows up with $status_on_top, due to the order things
are redrawn.
Kevin McCarthy [Sat, 30 Apr 2016 17:50:43 +0000 (10:50 -0700)]
Fix pager layout when $status_on_top with no mini-index. (closes #3836)
The pager_window->row_offset should only be adjusted when we have a
mini-index.
Pull common window initialization above, and adjust only when the
mini-index is enabled. The pager_window rows and row_offset code
could be further consolidated (since the status line is always a
height of one), but I think the code reads a bit more clearly when the
adjustments are explicitly stated.
Kevin McCarthy [Sat, 30 Apr 2016 01:00:10 +0000 (18:00 -0700)]
Remove newline insertion from pager. (closes #3835)
The window patches commited now manually move to the next line, so
there is no need to insert newlines for that purpose.
The newlines also goof windows placed to the right of the pager, as is
the case for the (currently external) sidebar-on-the-right
functionality.
Thanks to Richard Russon for the original patch and help testing the
revised patch.
Kevin McCarthy [Thu, 28 Apr 2016 00:56:59 +0000 (17:56 -0700)]
Add cols parameter to mutt_FormatString()
Continuing with the conversion to using windows for screen drawing,
mutt_FormatString() was directly using COLS for right justification
and similar formatting. Instead pass in a parameter, cols.
This change involved seeding the parameter through callback functions
too, as many of them call mutt_FormatString() back.
Kevin McCarthy [Thu, 28 Apr 2016 00:56:58 +0000 (17:56 -0700)]
Fix remaining direct usages of COLS/LINES to use mutt window functions.
Most of these were just message update/clearing.
Kevin McCarthy [Thu, 28 Apr 2016 00:56:57 +0000 (17:56 -0700)]
Change remailer to use mutt windows.
Kevin McCarthy [Thu, 28 Apr 2016 00:56:56 +0000 (17:56 -0700)]
Modify the built-in editor to use windows.
This only involved changing to use the MuttMessageWindow.
Kevin McCarthy [Thu, 28 Apr 2016 00:56:56 +0000 (17:56 -0700)]
Modify the compose screen to use windows.
The header field positions enum is now started at 0: the windows
compute the relative positioning as needed. A small improvement from
this is that the headers now align with the top: there isn't a gap if
$help is turned off.
Kevin McCarthy [Thu, 28 Apr 2016 00:56:55 +0000 (17:56 -0700)]
Modify the pager to use windows.
The pager view is somewhat complex, due to the "mini-index" and the
positioning of the index_status vs pager_status changes depending on
$status_on_top as well as $pager_index_lines and $help.
To make things simpler, it creates four "pager windows":
index_status_window, index_window, pager_status_window, pager_window.
mutt_term_width() is renamed to mutt_window_wrap_cols() and a
mutt_window_t parameter passed in.
Also, the pager drawing loop calling display_line() has a
mutt_window_move() added to move to the beginning of the next line
each time. This is in case the pager_window isn't flush with the left
side of the terminal.
Kevin McCarthy [Thu, 28 Apr 2016 00:56:54 +0000 (17:56 -0700)]
Modify the index to use windows.
Change the index screen to use MuttIndexWindow and MuttStatusWindow.
Kevin McCarthy [Thu, 28 Apr 2016 00:56:53 +0000 (17:56 -0700)]
Modify enter.c routines to use windows.
This modifies the mutt_enter_string() functions to use MuttMessageWindow.
Thanks to Richard Russon for pointing out slang doesn't support getcurx.
Kevin McCarthy [Thu, 28 Apr 2016 00:56:52 +0000 (17:56 -0700)]
Modify the curs_lib.c to use windows.
This changes some of the "prompting" routines to use the MuttMessageWindow.
Kevin McCarthy [Thu, 28 Apr 2016 00:56:51 +0000 (17:56 -0700)]
Modify the menu code to use windows.
Change menu.c to use the mutt_window_t structures and functions. The
index/stats/help/message window pointers are stored inside the menu_t.
This is useful for the pager, where the "index" we want to use is a
mini-index.
Kevin McCarthy [Thu, 28 Apr 2016 00:56:49 +0000 (17:56 -0700)]
Add window structures to use for screen layout.
This is a series of 11 patches, centralizing Mutt screen drawing
inside windows (mutt_window_t structures).
Currently, the screen drawing and cursor positioning logic is
distributed all over the code, resulting in many files having the same
logic of where the help, status, message windows are. Additionally,
the code directly uses move and mvadd*/mvprint* functions, which means
if the layouts are changed, the row/column computation logic needs to
be changed all over the place.
The patch creates a (very simple) mutt_window_t structure and
functions for moving, addch/str/printw, along with clearing the line.
The windows keep track of where they are on the screen, allowing the
Mutt code to simply position elements relative to the window.
During curses initalization, and when the window is resized, the
window sizes and positions and recomputed. Also, a new option flags,
R_REFLOW is added for options that need to force a reflow when they are changed.
Thanks to Richard Russon for pointing out the slang compilation issue.
Kevin McCarthy [Wed, 27 Apr 2016 20:21:15 +0000 (13:21 -0700)]
merge stable
Kevin McCarthy [Wed, 27 Apr 2016 20:08:52 +0000 (13:08 -0700)]
Create a wrapper sys_socket.h to work around Solaris namespace issues. (closes #3833)
Solaris includes "sys/stream.h" inside their "sys/socket.h". This
include file adds many non-reserved macros to Mutt's namespace, two of
which conflict with existing Mutt macros.
The simplest fix would be to rename those macros in Mutt, however this
will cause difficulty with out-of-tree patches. This fix creates a
wrapper include file that preserves those existing macros and prevents
the Solaris values from entering Mutt's namespace.
Kevin McCarthy [Thu, 14 Apr 2016 19:35:57 +0000 (12:35 -0700)]
Fix soft-padding available columns computation.
If arrow_cursor is set, it's possible that COLS < offset. Compute
avail_cols, floored at 0, and use that instead.
Kevin McCarthy [Thu, 14 Apr 2016 19:35:53 +0000 (12:35 -0700)]
Fix right justify buffer-truncated pad calculation in mutt_FormatString()
Vincent Lefèvre noted that the computation had implementation defined
behavior and was potentially incorrect.
Change to make sure the subtraction won't lead to a wrap-around, and
set pad to 0 in that case.
Kevin McCarthy [Thu, 14 Apr 2016 19:35:50 +0000 (12:35 -0700)]
Pre-space softfill multi-column padding.
Similar to the previous patch, this deals with multi-column padding
characters and soft-fill. This will add spacing so the padding and
content after padding aligns with the right side.
You can see the effect by setting
set index_format="%s %*我[ooooo]"
and resizing the terminal. The right hand side will be jagged without
the patch.
Kevin McCarthy [Thu, 14 Apr 2016 19:35:48 +0000 (12:35 -0700)]
Add spacing to truncated multi-column characters when using soft-fill.
First, fix the left-hand side column truncation calculation:
"col + pad*pw -offset"
pad = (COLS - col - wid) / pw, so this becomes
"col + COLS - col - wid - offset" =>
"COLS - wid - offset"
The problem is that pad was calculated *before* the right side was
mutt_wstr_trunc() truncated, which may adjust wid! We want that
calculation, with correct values, so instead just use the final
reduction directly. (Note, the reduction ignores integer truncation,
but pad shouldn't be used here in any case, because it's negative:
there is no padding occuring).
Second, when the left-hand side is truncated, multi-column characters
may get chopped in the middle. Truncated characters are not included
in the wlen and col values returned. Add spaces until the number of
columns lines up (checking to make sure we don't run out of space
too).
Kevin McCarthy [Mon, 11 Apr 2016 19:45:25 +0000 (12:45 -0700)]
Add null-terminator to BIO_get_mem_data() output.
It turns out the output isn't necessarily null-terminated.
Vincent Lefevre [Mon, 11 Apr 2016 19:17:51 +0000 (21:17 +0200)]
Updated French translation.
Kevin McCarthy [Mon, 11 Apr 2016 18:55:50 +0000 (11:55 -0700)]
Add an error message and debugging if SSL_CTX_new() fails. (closes #3831)
Generate a mutt_error(). Add a debugging function
ssl_dprint_err_stack() to dprint the ssl error stack.
Vincent Lefevre [Mon, 11 Apr 2016 09:28:22 +0000 (11:28 +0200)]
Updated French translation.
Kevin McCarthy [Mon, 11 Apr 2016 02:10:17 +0000 (19:10 -0700)]
Check for SSL_CTX_new returning NULL in ssl_sock_open(). (closes #3831)
Thanks to Yuan Kang and the security researchers at Columbia
University and the University of Virginia for reporting the bug.
Kevin McCarthy [Mon, 11 Apr 2016 01:30:21 +0000 (18:30 -0700)]
merge stable
Kevin McCarthy [Sun, 10 Apr 2016 23:02:06 +0000 (16:02 -0700)]
Fix mutt_protect() when INLINE is set. (closes #3828)
The oppenc changes allow security bits to be set even when not
encrypting or signing (for instance, OPPENCRYPT and INLINE).
mutt_protect() assumed that if INLINE is set, then either ENCRYPT or
SIGN must also be set. Specifically, it would end up inline-signing
the message even though neither was set.
Ensure mutt_protect() is a noop if neither SIGN or ENCRYPT are set.
In ci_send_message(), check for sign or encrypt before calling the
crypt_get_keys() / mutt_protect() block, and also in the fcc section
(since clear_content would be NULL if not).
The second change to the fcc part is somewhat redundant, but better to
be explicit and avoid the case where the subtype is somehow
"encrypted" or "signed" even though msg->security wasn't set thus.
Kevin McCarthy [Sun, 10 Apr 2016 21:14:10 +0000 (14:14 -0700)]
Add error message string for imap_mailbox_rename() on root folder.
This was fixed just before 1.6.0, but due to the string freeze, could
not add an error message.
Kevin McCarthy [Sat, 9 Apr 2016 01:38:27 +0000 (18:38 -0700)]
Fix potential memory leak in rfc2047_encode. (closes #3825)
If convert_string() has nonreversible characters, the allocated output
buffer would be overwritten (and not freed) in rfc2047_encode().
Thanks to Richard Russon for the bug report and initial patch, and to
TAKAHASHI Tamotsu for the analysis and revised fix suggestion.
Kevin McCarthy [Fri, 8 Apr 2016 22:27:17 +0000 (15:27 -0700)]
Fix pager.c format_line() to use size_t for mbrtowc() retvals.
While fixing up the error checking for mbrtowc(), I noticed the uses
in pager.c format_line() were assigning the retval to an int.
The cleanup for this was a little tricky, because it was making use of
possible negative values for (k1 - k). The backspace detection loop
condition was a bit heavy, so this patch first pulled the
initialization and first call above, and put the second call inside
the loop.
Note that k1 previously included k, but this patch changes it to be
just the retval of mbrtowc. This means the second mbrtowc() arguments
are changed to include k, as is the ch increment at the bottom of the
loop.
Kevin McCarthy [Fri, 8 Apr 2016 22:20:53 +0000 (15:20 -0700)]
Reset mbstate for other mbrtowc() calls returning -1
Continue the cleanup started in changesets
c8c76a6a1e61 and
a3450fd50d11. In those changesets, a bug was occurring due to the
mbstate not being reset when mbrtowc() returned -1.
This patch fixes other callers of mbrtowc() to reset mbstate when it
returns -1.
Kevin McCarthy [Wed, 6 Apr 2016 16:58:06 +0000 (09:58 -0700)]
merge stable
Kevin McCarthy [Tue, 5 Apr 2016 21:31:36 +0000 (14:31 -0700)]
Fix IDNA functions for systems without iconv.
The IDNA changes for SMTPUTF8 support introduced a bug for systems
without iconv. For those systems, the local<->intl functions would
return an error due to the charset conversion failing.
Change mutt_idna.c back to being conditionally compiled, but this time
based on HAVE_ICONV. If there is no iconv, stub out the functions in
mutt_idna.h.
Kevin McCarthy [Sat, 2 Apr 2016 20:04:04 +0000 (13:04 -0700)]
merge default into stable
Kevin McCarthy [Sat, 2 Apr 2016 18:55:45 +0000 (11:55 -0700)]
mutt-1.6.0 signed
Kevin McCarthy [Sat, 2 Apr 2016 18:18:54 +0000 (11:18 -0700)]
Added tag mutt-1-6-rel for changeset
be82a2fde82f
Kevin McCarthy [Sat, 2 Apr 2016 18:18:27 +0000 (11:18 -0700)]
automatic post-release commit for mutt-1.6.0
Kevin McCarthy [Fri, 1 Apr 2016 16:38:47 +0000 (09:38 -0700)]
Fix hcversion.h generation error when using included gettext.
When configuring mutt with --enable-hcache and
--with-included-gettext, there is an automake ordering issue:
BUILT_SOURCES are processed before SUBDIRS. Therefore, the
'hcversion.h' target is run before the included gettext (intl) is
built.
The hcversion.h target runs the cpp over config.h and mutt.h,
but mutt.h includes lib.h which tries to #include <libintl.h>.
Unfortunately, libintl.h (in this configuration) is generated by the
intl subdir build and so doesn't exist yet.
While the build doesn't completely fail, the resulting hcversion.h is
incorrect: it's just the md5sum of the initial value of BASEVERSION.
This fix is somewhat of a hack but is cleaner than trying to change
automake's behavior. It inserts a '#undef ENABLE_NLS' in between the
config.h and mutt.h sent to the cpp. Since hcachever.sh is just
scanning the data structures used by mutt, this shouldn't affect the
hash generated.
Thanks to Will Yardley for reporting this issue.
Kevin McCarthy [Wed, 30 Mar 2016 20:16:20 +0000 (13:16 -0700)]
Filter out bidi marks in rfc2047 and rfc2231 encoding. (see #3827)
Filter out U+200F RIGHT-TO-LEFT MARK and U+200E LEFT-TO-RIGHT MARK in
rfc2047 and 2231 encoded fields. GNU Screen has a bug that corrupts
the display, and can cause the wrong email to appear to be selected in
the index. Until screen fixes the issue, filter it out in mutt.
Kevin McCarthy [Tue, 29 Mar 2016 21:07:51 +0000 (14:07 -0700)]
Fix documentation: mime_lookup (not mime-lookup).
Vincent Lefevre [Tue, 29 Mar 2016 13:06:52 +0000 (15:06 +0200)]
Fix typo.
Kevin McCarthy [Sat, 26 Mar 2016 22:45:18 +0000 (15:45 -0700)]
Fix error handling in sync_helper() and imap_sync_mailbox(). (closes #3817)
This patch is based on the one Richard Russon found in the Fedora package.
If an error occurs during one of the imap_exec() calls in
imap_sync_mailbox(), the mailbox could end up being closed. This
would cause idata->ctx to be NULL. Add a check in sync_helper() for
the case where idata->ctx == NULL.
In imap_sync_mailbox(), check the return value of sync_helper(). To
keep the code simple, change rc from being the sum of the calls to the
bitwise-OR of the calls. (We only need to know if a single flag needs
to be updated, and bitwise-OR will detect negatives.)
Below the calls to sync_helper(), if the call to imap_exec() fails,
make sure rc is set to -1.
TAKAHASHI Tamotsu [Sat, 26 Mar 2016 20:30:16 +0000 (13:30 -0700)]
Updated Japanese translation.
Benno Schulenberg [Thu, 24 Mar 2016 19:07:38 +0000 (12:07 -0700)]
Updated Esperanto translation.
Kevin McCarthy [Wed, 23 Mar 2016 22:28:25 +0000 (15:28 -0700)]
Prevent renaming root folder in imap.
The root folder results in mx.mbox being NULL, which causes a
segfault. This can be triggered by entering a subfolder and trying to
rename the ".." entry.
Due to the translation string freeze, no visible error message is
displayed. Add a TODO note about this for post-1.6 release.
Kevin McCarthy [Wed, 23 Mar 2016 21:20:43 +0000 (14:20 -0700)]
Fix uninitialized prompt buffer in imap_mailbox_rename(). (closes #3819)
This is a patch from OpenBSD to initialize the newname buffer in
imap_mailbox_rename(). Previously it would generate random garbage in
the prompt.
This version of the patch initializes the prompt to the old mailbox name.
Thanks to TAKAHASHI Tamotsu for finding this patch.
Kevin McCarthy [Wed, 23 Mar 2016 20:17:55 +0000 (13:17 -0700)]
Add "-d" command-line option to manual. (closes #3816)
Thanks to Richard Russon for finding this patch in the Fedora package.
Ivan Vilata i Balaguer [Wed, 23 Mar 2016 20:06:15 +0000 (13:06 -0700)]
Updated Catalan translation.
Kevin McCarthy [Wed, 23 Mar 2016 01:00:13 +0000 (18:00 -0700)]
Clean up mutt_wstr_trunc() some more.
* Change return type to size_t.
The return value is the cumulation of values from mbrtowc(), which
returns size_t. All callers already assign the return value to a
size_t, requiring no external changes.
* Change the local variables n, w, l, and cl to size_t.
n is the strlen of the src parameter. l and cl are used for the
return value. w is assigned to the *width parameter, which is
size_t.
cw is kept as an int, because wcwidth returns type int.
* Change error handling of mbrtowc to be the same as other functions
in mutt: only reset mbstate when the retval==-1. When retvat==-2,
set cl=n to break out of the loop. Also, set wc to replacement_char
and allow the logic below to determine the width instead of
hardcoding to 1.
Karel Zak [Mon, 21 Mar 2016 00:06:16 +0000 (17:06 -0700)]
Improve error handling in mutt_wstr_trunc().
This is Karel Zak's patch to fix handling of (illegal) multi-byte chars.
* mutt_wstr_trunc():
Reset mbstate after error in mbrtowc().
Set wc=0 if wcwidth returns < 0.
Addresses: https://github.com/karelzak/mutt-kz/issues/58
Thanks to Richard Russon for bringing this patch to our attention.
Benno Schulenberg [Tue, 22 Mar 2016 19:35:54 +0000 (12:35 -0700)]
Updated Dutch translation.
Vincent Lefevre [Mon, 21 Mar 2016 00:31:06 +0000 (01:31 +0100)]
Updated French translation.
Vsevolod Volkov [Sun, 20 Mar 2016 22:38:38 +0000 (15:38 -0700)]
Updated Russian translation.
Vsevolod Volkov [Sun, 20 Mar 2016 22:36:34 +0000 (15:36 -0700)]
Updated Ukrainian translation.
Morten Bo Johansen [Sun, 20 Mar 2016 22:30:06 +0000 (15:30 -0700)]
Updated Danish translation.
Kevin McCarthy [Sun, 20 Mar 2016 00:25:10 +0000 (17:25 -0700)]
Turn off asserts in sendlib.c.
The Doctor reported triggering an assertion in convert_file_to(), due
to an unexpected errno from iconv(). According to the comments, the
assertions were only enabled for debugging and should have been turned
off. We certainly don't want to abort mutt for this case, so just
disable them as the comment indicates.
Petr Pisar [Sat, 19 Mar 2016 23:19:41 +0000 (16:19 -0700)]
Updated Czech translation.
Kevin McCarthy [Sat, 19 Mar 2016 13:08:08 +0000 (06:08 -0700)]
Fix a few typos in translation messages.
Thanks to Moritz Barsnick for reporting these.
Vincent Lefevre [Fri, 18 Mar 2016 11:12:05 +0000 (12:12 +0100)]
Updated French translation.
Vincent Lefevre [Fri, 18 Mar 2016 09:15:16 +0000 (10:15 +0100)]
Fix typo in debug message.
Richard Russon [Fri, 18 Mar 2016 00:33:09 +0000 (17:33 -0700)]
Fix typo picked up by Debian's QA.
This was allegedly fixed 5 years ago (see #3493).
Richard Russon [Fri, 18 Mar 2016 00:22:12 +0000 (17:22 -0700)]
Use '$(PACKAGE).pot' instead of 'mutt.pot' in Makefile.am
Richard Russon [Fri, 18 Mar 2016 00:12:10 +0000 (17:12 -0700)]
Fix three build warnings when DEBUG isn't defined.