Age | Commit message (Collapse) | Author |
|
These are mostly the result of making the formatting changes commit
after the indent changes commit.
|
|
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)))" \;
|
|
Converting a return to a rc assignment accidentally left an extra
parenthesis.
|
|
|
|
|
|
|
|
|
|
|
|
When viewing attachments externally with a (non-copiousoutput) mailcap
entry missing %s, the command is invoked as a filter, with the
attachment piped into stdin. However, unlike a filter, the user
interacts with the command, instead of just displaying the output in
the pager.
Just as with the mutt_system() command, Mutt needs to send imap
keepalives to keep those connections from closing during the
potentially extended invocation.
Thanks to John Hawkinson for the bug report, and his suggested patch,
which this commit is based upon.
|
|
The virtual index is modeled after the CONTEXT. Add a CURATTACH
helper to reduce code verbosity. Store the actx as menu->data.
Simplify and consolidate the recvattach and compose menu update code
inside a function.
Because compose and recvattach share so much code, change compose to
use the virtual index even though it has no collapse/expand
functionality.
|
|
* Add a FP and BODY array to the actx. These are used to allow proper
cleanup.
* Add HEADER and root_fp entries, to allow for index regeneration.
* Separate out the compose and recvattach index generation functions.
* Change the recvattach index generator to decrypt as encrypted parts
are found.
|
|
Use the helper in compose update_idx(), to consolidate the resize
logic and simplify the code.
Separate out the actx "free" routine from a routine to empty out the
idx. The index regeneration routines should flush and rebuild the
index without having to renerate the actx structure.
|
|
Change the pager, compose, recvattach and recvcmd to pass the actx
instead of the individual idx and idxlen parameters.
Separate out the compose menu exit logic to first free the BODY data
and then call the shared actx free function at the bottom.
|
|
Move the idx and idxlen into ATTACH_CONTEXT. In subsequence patches,
this structure will hold more useful items, such as the virtual index.
The swap out is straightforward, except for:
* update_idx() in compose.c, which post-increments the idxlen in the
call and again in the function.
* mutt_gen_attach_list() which doesn't need to returns the new values.
|
|
(see #3886)
When piping a text attachment, there is no reliable way to know the
charset used.
Vincent Lefèvre says:
It was decided in the past that when there is no information on the
charset in a transmission to an external command (e.g. as for mail
composing), texts are expected to be transmitted in the local
charset.
Add a MUTT_CHARSET flag to enable charset conversion on text
attachments for both when $attach_split is set and unset.
|
|
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.
|
|
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.
|
|
The segfault was introduced in changeset b9f9e3147eb4. Since decoding
and charset conversion aren't needed for attachments when composing a
message, this patch reverts to just using mutt_save_attachment() to view
"raw data" for text attachments in the compose/send case.
This patch is based on Michael Elkins' patch at
http://dev.mutt.org/trac/attachment/ticket/3644/view_attach_compose_segfault
with just a missing return value check added.
|
|
closes #3293
see #3234
|
|
perform charset conversion
this change is meant to replace [392e945dfba7]
see #3234
see #3293
|
|
mailcap entry and either $implicit_autoview is set or the MIME type matches the user's auto_view list.
closes #3496
closes #3426
|
|
|
|
|
|
#3234.
|
|
|
|
|
|
We really need code for dynamic buffers which would solve a few other
bugs, too. Closes #2205.
|
|
|
|
I went through the logs of each file with a copyright header and
updated the years for the authors in the headers for any non-comment
changes they introduced. What a pain!
|
|
|
|
|
|
init.c could really use some refactoring.
|
|
|
|
|
|
|
|
|
|
to abort an unmodified file. Closes: #2051.
|
|
non-plain text. Also don't clobber $content_type when parsing it.
Closes: #2038.
|
|
from the global headers. A small step towards sane dependency tracking
and code cleanliness.
|
|
Remove it from mutt.h
|
|
embarassingly long ago by Jarno Huuskonen <Jarno.Huuskonen@uku.fi>.
|
|
|
|
broken anyways.)
|
|
- Support gpg-agent by not asking for a passphrase
- autconf cleanups.
This is just a start and probably we need a couple of other things to
do. One drawback is that the help menu does always list all crypto
realted stuff even when configured for no crypto at all. Same goes
for the configure options but I consider thsi a feature: It allows to
use the same .muttrc for different versions of mutt - at least during
development, this is an advantage. This all might be fixed but
requires some changes to the configuration system.
Note, the use of the WithCrypto macro - it enables the compiler to do
dead-code-elimination depending on the configured backend. This is
better readable than all the nested ifdefs. I did some short tests
and it seems to work, althoug mutt's size does not change largely when
compiled w/o crypto.
cryptglue.c is new as a warpper to all crypto calls; some are still in
crypt.c but they should eventually also be wrapped. We don't use
function pointers to keep a path to use dlopen or runtime configured
backends. crypt.h is also new and replaces pgp.h and smime.h in most
files (except for the backend).
2003-01-06 Werner Koch <wk@gnupg.org>
* crypt.c (crypt_valid_passphrase): Detect gpg-agent and don't ask
for the passphrase.
* pgp.c (pgp_decrypt_part, pgp_application_pgp_handler)
(pgp_sign_message, pgp_encrypt_message)
(pgp_traditional_encryptsign): Make sure that we never ever send
the passphrase if the gpg-agent has been detected. Likewise.
* acconfig.h: Removed all remaining stuff as AC_TEMPLATEs to
configure.in. BTW, we should consider to rename configure.in to
configure.ac.
2003-01-04 Werner Koch <wk@gnupg.org>
Replaced the use of HAVE_PGP and HAVE_SMIME by a more readable
and extendable solution.
* pgplib.h: Moved enum pgp_ring and KEYFLAGS_* to
* crypt.h: here.
* smime.c (mutt_is_application_smime): Moved to
* crypt.c (mutt_is_application_smime): here.
* pgp.c (mutt_is_application_pgp): Moved to
* crypt.c (mutt_is_application_pgp): here.
* pgp.c (pgp_is_multipart_encrypted): Removed. Merged code with
* crypt.c (mutt_is_multipart_encrypted): this.
* mutt.h: Protect against double inclusion.
* pgplib.h (struct pgp_keyinfo): Remove the typedef to pgp_key_t.
* crypt.h (pgp_key_t): Declare the typedef here. NOTE: This is
now a pointer. Changed all usages accordingly.
* configure.in: Replace HAVE_PGP and HAVE_SMIME by the new
CRYPT_BACKEND macros. Always include all OPS.*.
(LIBOBJ): Replaced by AC_LIBOBJ as required by newer autoconfs.
* Makefile.am (EXTRA_mutt_SOURCES): Move crypt.c to mutt_SOURCES.
(mutt_SOURCES): Add cryptglue.c
(EXTRA_DIST): Add crypt.h
* pgp.h, pgplib.h, smime.h: Use the header only when the
approriate backend has been configured.
* pgp.c, pgpkey.c, smime.c: Build only if the approriate
CRYPT_BACKEND_ macro is defined.
* pgp.h, smime.h, global.h: Moved all variable declarations to
global.h because they are now always defined.
* sort.h: Always define PgpSortKey, although it does not belong to
here.
* keymap.h: Unconditionally include all PGP and SMIME stuff.
* mutt.h: Ditto.
* protos.h: Ditto.
* init.h (HAVE_SMIME): Unconditionally include all crypto related
definitions. Mark the doc entries with "(Crypto/PGP/SMIME only)".
* globals.h: Replace gpg.h and smime.h by crypt.h.
* functions.h: Always include all crypto commands.
* copy.h: Unconditionally define the crypto related M_CM_
* pgplib.h: Move APPLICATION_PGP and PGP* to crypt.h and include
it.
* smime.h: Move APPLICATION_SMIME and SMIME* to crypt.h and
include it.
* mutt_crypt.h (ENCRYPT,SIGN,GOODSIGN, BADSIGN): Move to crypt.h.
* crypt.c: Replaced pgp.h and smime.h header by crypt.h. Always
include all functions but shortcut them depending on WITHCRYPTO.
All over the place use WITHCRYPTO instead of ifdefs. Replaced all
direct calls of the backend fucntions by twrapper functions
defined in cryptglue.c
(crypt_get_keys): Removed prototypes.
* pgp.h (pgp_findKeys): New prototype.
* smime.h (smime_findKeys): New prototype.
* cryptglue.c: New.
* crypt.h: New.
* mutt_crypt.h: Moved all crypt_* prototypes to gcrypt.h.
Unconditionally use this file.
* init.c: Replaced pgp.h and smime.h header by crypt.h.
(parse_set): Use WITHCRYPTO instead of ifdefs.
(mutt_var_value_complete): Ditto.
* sendlib.c: Replaced pgp.h and smime.h header by crypt.h.
(write_as_text_part): Now one macro using WITHCRYPTO.
(mutt_write_mime_body): Use WITHCRYPTO instead of ifdefs.
(mutt_make_message_attach): Ditto.
(mutt_write_fcc): Ditto.
* send.c: Replaced pgp.h and smime.h header by crypt.h.
(include_forward): Use WITHCRYPTO and validate passphrases for pgp
and smime.
(include_reply): Ditto.
(generate_body): Use WITHCRYPTO instead of ifdefs.
(ci_send_message): Ditto.
* recvattach.c: Replaced pgp.h and smime.h header by crypt.h.
(mutt_gen_attach_list): Use WITHCRYPTO instead of ifdefs.
(mutt_attach_display_loop): Ditto
(mutt_view_attachments): Ditto.
* postpone.c: Replaced pgp.h and smime.h header by crypt.h.
(mutt_get_postponed): Use WITHCRYPTO instead of ifdefs.
(mutt_parse_crypt_hdr): Always include and use WITHCRYPTO instead
of ifdefs.
(mutt_prepare_template): Use WITHCRYPTO instead of ifdefs.
* pop.c: Removed pgp.h and smime.h.
(pop_fetch_message): Use WITHCRYPTO instead of ifdefs.
* pattern.c: Replaced pgp.h and smime.h header by crypt.h.
(Flags): Always include the crypto flags.
(msg_search): Use WITHCRYPTO instead of ifdefs.
(mutt_pattern_exec): Ditto.
* parse.c: Removed pgp.h and smime.h.
(mutt_parse_mime_message): Use WITHCRYPTO instead of ifdefs.
* pager.c: Replaced pgp.h and smime.h header by crypt.h.
(mutt_pager): Use WITHCRYPTO instead of ifdefs.
* mx.c: Removed smime.h and pgp.h.
(mx_update_context): Use WITHCRYPTO instead of ifdefs.
* muttlib.c: Replaced pgp.h and smime.h header by crypt.h.
(mutt_needs_mailcap): Use WITHCRYPTO. Note, that there used to be
an error when PGP was not configured so that TYPEAPPLICATION was
not recognized for SMIME.
(mutt_is_text_part): Use WITHCRYPTO instead of ifdefs.
* main.c: Include crypt.h.
(show_version): Remove HAVE_PGP and HAVE_SMIME. Add
CRYPT_BACKEND_CLASSIC_PGP, CRYPT_BACKEND_CLASSIC_SMIME.
* keymap.c: Include crypt.h so that we can test WITHCRYPTO.
(Menus): Always include pgp and smime.
(km_init): Create smime and pgp bindings depending on WITHCRYPTO.
(km_get_table): Return OpPgp depending on WITHCRYPTO.
* hook.c (mutt_parse_hook): Use WITHCRYPTO instead of ifdefs.
(mutt_crypt_hook): Always include.
* headers.c: Replaced pgp.h and smime.h header by crypt.h.
(mutt_edit_headers): Use WITHCRYPTO instead of ifdefs
* hdrline.c: Replaced pgp.h and smime.h header by crypt.h.
(hdr_format_str): Use WITHCRYPTO.
* handler.c: Replaced pgp.h and smime.h header by crypt.h.
(mutt_can_decode): Use WITHCRYPTO instead of ifdefs.
(mutt_can_decode): Application/smime is now also checked when PGP
support is not configured.
(mutt_body_handler): Use WITHCRYPTO
* curs_main.c: Replaced pgp.h and smime.h header by crypt.h.
(mutt_index_menu): Shortcut crypto only operations depending on
WITHCRYPTO.
* copy.c: Replaced pgp.h and smime.h header by crypt.h.
(_mutt_copy_message):
* compose.c: Replaced pgp.h and smime.h header by crypt.h.
(enum): Always include HDR_CRYPT and HDR_CRYPTINFO.
(redraw_crypt_lines): Always include this fnc but shortcut it
depending on WITHCRYPT. Draw lines depending on the configured
crypto support.
(pgp_send_menu): Always include this one. Call wrapper functions.
(smime_send_menu): Likewise.
(draw_envelope): Use WITHCRYPTO instead of ifdefs.
(mutt_compose_menu): Allow pgp/smime commands only when configured.
* commands.c: Replaced pgp.h and smime.h header by crypt.h.
(mutt_display_message,pipe_msg, _mutt_pipe_message)
(set_copy_flags, mutt_save_message, mutt_edit_content_type)
(_mutt_check_traditional_pgp): Use pgp wrapper.
* attach.c (mutt_view_attachment): Removed HAVE_GPG and HAVE_SMIME
and replaced by global variable WITHCRYPTO. Replaced pgp and
smime header by crypt.h.x
|
|
the M_YES and M_NO constants. Fixes a couple of cases in which C-g
would be mis-interpreted.
|
|
|
|
|