Rocco Rutte [Thu, 11 Oct 2007 10:10:49 +0000 (12:10 +0200)]
Document format string pipes.
This is roughly the commit message only. Add a line to UPDATING (mark
it as a change rather than a new feature as it may break setups).
Enlarge buffers for printing menu entries from STRING to LONG_STRING.
Now that multibyte padding works, we may too soon run into too short
buffers for common terminal widths in graphical terminals.
Use mutt_paddstr() to print compose menu's status line rather than printw().
All other menus use mutt_paddstr(): printw() prints only N bytes, not N columns.
Enlarge error buffer in mutt_enter_command() to not truncate option queries.
The error buffer gets passed down into parse_set() using it to report
option values. SHORT_STRING is too short to even print some defaults
(e.g. $status_format).
Let %*X padding share the same code of %>X padding
The current implementation of %*X was completely multibyte-unaware and
had buffer overflow issues with large terminals. Now we use the same
code as %>X has and optionally only truncate left content to make sure
the right content can be printed entirely.
Make mutt_FormatString() more multibyte-aware
As default cause, don't copy raw bytes but copy multibyte chars instead
to ensure column computation is correct (needed for padding).
Do so by checking columns and bytes individually to make sure we really
don't write past the end of allocated buffers. This patch fixes all my
crashes I saw with files attached to/with the settings for #2882 and #2900.
Michael Vrable [Thu, 16 Aug 2007 03:09:42 +0000 (20:09 -0700)]
Fix RFC 3676 (format=flowed text) handling.
The old code would consider a line containing "> " to be flowed, but
since this is a quoted and space-stuffed line containing no additional
text, by my reading of RFC 3676 it should be fixed.
Clean up the handling of format=flowed text. Fix the test to determine
whether a line is fixed--if a line ends in a space only because the last
character is a space from space-stuffing, consider the line to be a
fixed line. This makes the test for ((buf_len - buf_off) <= 0) later no
longer necessary.
Also simplify the code by removing checks for curline being non-null; it
is allocated at the start of the function and never reallocated to size
zero, so it should never be a null pointer.
prev_sb.st_size was initialized to zero if USE_FCNTL but not if
USE_FLOCK. Silence the gcc warning for both cases by zeroing the stat
structures on the stack.
Other minor cleanups:
- clean up some whitespace
- convert return (foo) to return foo
- return r at the bottom of the function instead of testing values and
returning them explicitly
- add vim modeline
David Champion [Mon, 9 Jul 2007 01:27:35 +0000 (18:27 -0700)]
This patch implements the "%* " notation, which is analogous to "%> "
but gives precedence to the right side instead of to the left when the
fill length is zero. The default $pager_format is updated to use it so
that %P is always available at the edge of the screen.
GPGME: Stop parsing message as soon as PGP header is found.
Use file_to_data_object to build data for inline signature
verification instead of doing it by hand. This fixes inline
verification for me.
TODO: crypt-gpgme helper functions seem to return lots of pointers off
the stack in very dubious ways.
Unknown [Tue, 5 Jun 2007 20:12:05 +0000 (13:12 -0700)]
Make sort by "To" stable (closes #2515).
compare_to() calls mutt_get_name(), which may return a static pointer
if it in turn calls mutt_addr_for_display(). If this static pointer is
used for a and b, the result is bad. The fix is to make a copy of the
first object.
Brendan Cully [Sun, 20 May 2007 07:29:19 +0000 (00:29 -0700)]
Forget SMTP password if authentication fails.
Thanks to Gregory Shapiro for the initial patch (I've moved the reset
from smtp_auth_sasl up to smtp_auth, and used the account API
instead of twiddling account bits by hand). Closes #2872.
contrib/smime.rc: $smime_verify_opaque_command fallback to -noverify
to get signed text despite a failed -verify (but send only this first
failure notice to stderr).
smime.c: fflush() before rewind().
Closes #2428. Helps Debian Bug 420014
Handle a missing or corrupted header cache entry (closes #2676)
If imap_hcache_get fails, stop parsing the header cache and simply
refetch from that point on.