Age | Commit message (Collapse) | Author |
|
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)))" \;
|
|
This will be used when reading protected headers, to store the
encrypted subject in the header cache so it can be searched with.
|
|
Mbox pads with a 1 byte, while mmdf pads with 10. Because compress
depends on the child type, we create a mx_ops, which allows compress.c
to delegate to the child ops.
|
|
Change the "Error executing" to "Error running", which is used in
multiple places elsewhere in mutt. This also removes the
unnecessary newline.
Remove the leading space in the "Error compressing" message, and
change it to match the error message in editmsg.c.
|
|
If an append hook isn't defined, then mutt has to decompress the
mailbox. In that case, we can check the type of the decompressed
mailbox instead of defaulting to DefaultMagic.
|
|
The format strings are placed in single quotes. mutt_system() invokes
sh, so escape the single quotes using bourne-shell syntax: '\''
|
|
Change check_mailbox to delegate to the child_ops->check_mailbox if
the compressed mailbox has changed. This allows the mailbox to
properly recover if both the decompressed mailbox and compressed file
have changed.
Change sync_mailbox to call check_mailbox before attempting to sync.
This will prevent overwriting external changes to the compressed
mailbox.
|
|
Change compress.sync_mailbox() to lock the compressed mailbox around
both the tempfile sync and compress operations. This will prevent
changes made inbetween the two syncs from being overwritten.
Thanks to Damien Riegel for his original patch refactoring
mx_ops.sync, which this patch is partially based upon.
|
|
Some operations, such as open_append and sync, need an exclusive lock
across a longer period than a single compress/decompress. Remove it
from the execute_command and pull into the outer callers. Store lock
information inside compress_info.
Sync and check_mailbox need more fixes, which will be addressed in
subsequent patches.
|
|
|
|
The open_append and close were partially duplicating mbox open_append
and close operations internally. Change it to call the actual
delegate functions instead.
Inline the open_read() function inside open_mailbox(). Having it
split improved nothing and just complicated the code (i.e. added
error-handling checks in open_mailbox() that in reality could not
fail).
|
|
setup_paths leaks memory: realpath is already set in mx_open_mailbox()
restore_paths is unneeded. mx_fastclose_mailbox() will free stuff,
and nothing is looking at the path once we are closing or aborting.
Make a copy of the hooks. Otherwise 'unhook *' will leave dangling
pointers.
Add compress_info freeing inside mx_fastclose_mailbox(). Only free
inside compress.c when we want to prevent close() from doing anything.
close_mailbox() didn't preserve ctx->path on error.
execute_command() didn't return an error if the mutt_system() command
failed.
mx_open_mailbox_append() should check mutt_comp_can_append() only for
the case that the mailbox doesn't exist. When it exists,
mx_get_magic() has already looked at the file contents before checking
for matching open_hooks.
In open_append_mailbox() if no append hook is defined, it should't
call ci->open() if the mailbox doesn't exist. It should act just like
append and create a temporary file.
check_mailbox() needs more work. For now, at least have it properly
close the mailbox on error.
|
|
Also, include compress.h in compress.c so the mx_comp_ops doesn't need
to be redeclared.
|
|
With the following changes:
- po/de.po changes trimmed to just the compress additions.
- Move the sample muttrc to contrib, and add it to the Makefile.am so it is
distributed. Remove the sample vimrc.
- Remove extra fluff from manual.
Thanks to Roland Rosenfeld for the original patch, and to the NeoMutt
team for their work cleaning up the patch.
|