Age | Commit message (Collapse) | Author |
|
This is a part two, made in master, to the stable branch commit
11b18027. These are mostly length adjustments to use LOFF_T, matching the
BODY->length type.
An argument could be made for size_t instead, and a few places in Mutt
do assign between those types. I've used LOFF_T because off_t is a
signed integer. Some changes in this commit affect loops that
decrement a length pointer while > 0. Switching to a size_t could
create a wraparound infinite loop bug.
This also changes the Content-Length header parser to use atoll()
intead of atol(). I noticed from the man page that atol() doesn't
seem to return -1 on error. But I've kept the check anyway.
|
|
This will allow some operations to retrieve only headers, such as ~h
pattern matching or the new list menu.
Modify the IMAP and POP3 implementation to retrieve only headers when
the parameter is set.
Headers-only will use the message cache if one exists, but will not
populate the message cache (since the body of the message is not
downloaded.)
|
|
Remove the "Date: " prefix and the trailing newline, and convert
callers to add those.
This will be needed for protected headers Date support, where we will
have to generate and store the date inside mutt_protect().
|
|
|
|
When displaying a message, display a mutt_error() to warn of
incomplete rendering.
Fix mutt_copy_message() to check for ferror and feof errors on partial
decode too.
Clean up _mutt_append_message() to not pass a partial-decode along as
a success.
Modify the crypt handlers to return 1 if any kind of state message is
displayed. There is some fuzzyness about what a "fatal" error is, but
for now just consider a handler error that notifies by
state_attach_puts() as "non-fatal".
|
|
Add spaces after if, else, while, for, switch.
Unify the brace placement style. The vast majority of the code uses
Allman style so convert the relatively few K&R braces over.
|
|
These are mostly automated changes corresponding to the emacs
settings:
(c-set-style "linux")
(setq c-basic-offset 2)
(c-set-offset 'case-label '+)
Most of the code follows the convention:
(add-to-list 'c-cleanup-list 'space-before-funcall)
but this is not enforced by this indentation cleanup.
Also, I personally dislike tabs, so I have:
(setq-default indent-tabs-mode nil)
in my own configuration. However I have no desire to change every line
just for that effect. So this cleanup does nothing about the mix issue.
Some of the secondary files (e.g. regex.c) have been skipped.
I've also skipped crypt-gpgme.c, because I need to think about that
file. Werner Koch and the GnuPG team contributed most it, and it
follows the Gnu indentation settings. It should probably be made
uniform with Mutt, but I don't want to discourage future GnuPG
contribution to the file.
I manually reverted a few unsightly cleanups, and added a few tweeks
when I saw things that could be improved.
|
|
The result of
find . -name "*.[ch]" -exec emacs -batch {} \
--eval="(progn (delete-trailing-whitespace) (and (buffer-modified-p) (save-buffer)))" \;
|
|
Most of these have been "#if 0" out for 10-20 years. Any utility in
keeping them around is miniscule at this point.
There are a few other "#if 0" in the code, but I've kept them for now.
Some are utility functions that are not used, but I think still may
have some documentation value.
|
|
Setting this option will save the protected header back into the
clear-text message headers. This improves
usability (searching/limiting/replying) when reopening a mailbox
without header cache. However, it is a security trade-off, so
defaults off and strongly warns about what it is doing in the documentation.
|
|
Handle like In-Reply-To and References editing. Change the flag
setting to be inside mutt_copy_header().
The resetting of the changed flag occurs explicitly in the imap and
maildir/mh sync_mailbox code. It occurs for mbox in the
mx_update_tables() call in mx_sync_mailbox().
|
|
In subsequent commits, we're going to add the x-label and subject
headers changed flags into the envelope. To avoid the list of checks
exploding everywhere, just use a single field to check and reset those
values.
Several places in the code are checking for a null header->env. I
wasn't aware this was possible, so I've added todo notes to track down
when this occurs.
|
|
This isn't actually a bug. Context->label_hash strdups the keys, so
we are safe from dangling references. However, the subj_hash uses
direct references, so to keep things consistent and safe, make a copy
and encode that.
|
|
The cherry pick accidentally obliterated the reset. That flag is now
located in hdr->env->changed in the branch and is reset properly
elsewhere. Keep it in place in the stable branch.
|
|
Also, add a missing "skip" in mutt_copy_hdr() for the non-simple case.
These fixes were backported from the kevin/mutt_protected_header branch.
|
|
The x-label comparison was outside the "beginning of header" block.
This meant that it could theoretically match a continuation line.
Additionally, the continuation lines of x-labels would not be
stripped, because the comparison was after the ignore variable was
reset.
Move the comparison inside the block and before the ignore reset.
|
|
Add L10N comment to sort menu. Mark a couple strings for localization.
Use ascii_strncasecmp() for the X-Label header comparison.
Simplify label_message() using mutt library routines.
Bind label editing to "Y" instead of "y". "y" is already used in the
default sample muttrc to display mailboxes.
|
|
|
|
The mx_close_message is one of the few mx_* functions that don't have a
context as parameter. To make them more consistent, pass the context.
|
|
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.
|
|
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.
|
|
This patch only updates existing copyright notices in the source
files, using commit dates since the last copyright update in commits
e3af935cdb1a and f8fd60d8d3f2.
Add a notice to the COPYRIGHT file to refer to our mercurial
repository for the full commit history.
Add myself to the COPYRIGHT file and smime_keys.pl file.
|
|
expansion.
|
|
|
|
|
|
|
|
|
|
We now distinct between sending and display case. For display,
we always use tabs for folding for readability; for sending we
now correctly fold using whitespace found in the header.
Closes #2995. Closes #3080.
|
|
|
|
|
|
1. mutt_copy_header incorrectly tests CH_UPDATE to determine whether to write
the In-Reply-To and References headers. CH_UPDATE refers only to Status: and
X-Status:
2. mutt_copy_header ignores CH_NOSTATUS which is supposed to indicate that the
mailbox type doesn't use those headers.
3. mutt_copy_header tests h->env->irt_changed and h->env->refs_changed when it
should be testing CH_UPDATE_IRT and CH_UPDATE_REFS, respectively. Early in
the function this happens:
if (h->env)
flags |= (h->env->irt_changed ? CH_UPDATE_IRT : 0)
| (h->env->refs_changed ? CH_UPDATE_REFS : 0);
This means that for most callers, the result is the same, but
mutt_copy_header should be testing the flags because the caller might have
set them explicitly without setting irt_changed/refs_changed.
Signed-off-by: Aron Griffis <agriffis@n01se.net>
|
|
|
|
copy.c and sendlib.c have independent and different implementations of writing
references to a file. Choose the one in sendlib since it's conservative with
mallocs and supports trimming the list.
Signed-off-by: Aron Griffis <agriffis@n01se.net>
|
|
mutt_copy_header unnecessarily tests the result of each fputc/fputs (well, most
of them anyway, it's not consistent). This obfuscates the code and hides bugs.
Remove these extraneous checks since ferror/feof are checked at the bottom of
the function, and get rid of all the early returns.
Signed-off-by: Aron Griffis <agriffis@n01se.net>
|
|
This closes #2684, but handling of mixed crypto in a single message
needs more investigation.
|
|
Closes #3085.
|
|
Non-fatal errors should prevent moving messages, since they indicate
data loss. But mutt should still attempt to display them, since being
able to see some attachments is better than nothing.
Also stop printing out non-PGP material in application/pgp
attachments. Closes #2545, #2912.
|
|
|
|
|
|
|
|
When set to a positive number, wrap at that column. When set to a
negative number, keep that many characters empty on the right.
|
|
purposes and sent messages.
|
|
|
|
|
|
avoid mail-losing Content-Length: 0 (bug introduced by large file patch a couple
of days ago). Closes: #2096.
|
|
|
|
|
|
|
|
decode-save. Closes: #1919.
|
|
instead of safe_free, since that seems to be the convention. I personally
don't see the point.
|