summaryrefslogtreecommitdiffstats
path: root/keymap.c
AgeCommit message (Collapse)Author
2020-12-06abstract some List-* header processingdgc
List-Post parsing is inline in the List-Post header handler. This moves it to some separate functions so that we can use it for other purposes.
2020-11-30Fix a few mutt_extract_token() callers dest parameters.Kevin McCarthy
Some callers performed a mutt_buffer_init(), called mutt_extract_token() and then assumed that the buffer->data would never be NULL. Prior to the "fix" in commit f420be68, this was not true, even if MoreArgs() returns true, because the argument could be just ''. The parse_keymap() change fixed a possible segv. Don't use the buffer pool, because it returns buf->data to the caller. I don't believe the other two would segv, but they did still rely on the old behavior where the the buffer would have a '\0' appended always. So, change them to use the buffer pool to be cleaner.
2020-07-19Add first version of MuttLisp.Kevin McCarthy
This is somewhat simple enhancement to muttrc processing, not a full-blown embedded scripting language. There are no variables, functions, types, or abilities that compete with macros. MuttLisp can be invoked using the "run" command. If $muttlisp_inline_eval is set, it can also be invoked with a bare parenthesis expression as a command argument. $muttlisp_inline_eval defaults unset, to avoid breaking existing configurations, which might have bare parenthesis arguments for regexps.
2019-08-03Basic autocrypt account menu.Kevin McCarthy
Provide ability to create, delete, and toggle the prefer-encrypt and enabled flag for an account. Hook into the index via 'A' <autocrypt-acct-menu>.
2019-07-28Add a comment to the OPTIGNOREMACROEVENTS km_dokey() change.Kevin McCarthy
The option was added in commit 53900afa, and its actual purpose was to separate out an "unget" event buffer from the "macro" buffer, to solve a problem with certificate prompts. The safest approach in a low-level function like km_dokey() was to return an error if new macros were generated when the option is set. However, this results in an unbuffered username/password prompt being aborted. Currently the only users of unbuffered input are the SSL certificate prompts, which use menu->dialog mode (and thus mutt_getch() directly) and username/password prompts. So the only affected cases are editor-menu prompts, and returning the pressed keys is likely less surprising than aborting the prompt. If other unbuffered menus are created in the future, we may want to add a check for which menu mode is being used.
2019-07-26Change OPTIGNOREMACROEVENTS to actuallly ignore macros instead of throwing ↵Oneric
errors on macros
2019-06-26Convert Commands to use the union pointer_long_t too.Kevin McCarthy
As with MuttVars, Commands was using an unsigned long to hold pointers as well as enums. Convert to use the same union type of MuttVars. Adjust command functions data parameter type to the union. Since these are used outside init.c, relocate the union definition to mutt.h. Although the number of functions affected was long, most of them did not need much adjustment. Many of them made no use of the parameter. Those that did were easily cast into an added "data" variable at the top.
2019-01-04Clean up formatting.Kevin McCarthy
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.
2019-01-04Clean up code indentation.Kevin McCarthy
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.
2018-12-31Remove trailing whitespace.Kevin McCarthy
The result of find . -name "*.[ch]" -exec emacs -batch {} \ --eval="(progn (delete-trailing-whitespace) (and (buffer-modified-p) (save-buffer)))" \;
2018-06-03Add new timeout functions to work with inotify monitors.Kevin McCarthy
The ncurses timeout() function doesn't affect the new poll inside mutt_monitor_poll(). This meant that $imap_keepalive and $timeout were not being respected when the monitor was used. Create mutt_getch_timeout(), which delegates to timeout() and sets a timeout value mutt_monitor_poll() uses too.
2018-06-03add feature file monitoring with Linux inotifyGT
2017-06-01Change km_dokey() to return -2 on a timeout/sigwinch.Kevin McCarthy
In some cases, such as tag-prefix or _mutt_enter_string(), it is desirable to be able to distinguish between a timeout/sigwinch event and an input error/abort/ctrl-g.
2017-04-27merge stableKevin McCarthy
2017-04-27Fix km_error_key() infinite loop and unget buffer pollution.Kevin McCarthy
'bind pager \Ch help' produces an infinite loop when an unbound key is pressed in the pager. The reason is because km_error_key() tries to verify that the key sequence is really bound to the OP_HELP operation. It does this by using km_expand_key(), tokenize_unget_string() on the resulting buffer, then checking if the next km_dokey() returns OP_HELP. The problem is that km_expand_key() does not always produce a string that is properly reparsed by tokenize_unget_string(). Control-h sequences are expanded to ^H. tokenize_unget_string() recognizes this as two characters '^' and 'H'. km_error_key() checks the OP returned, which is OP_PAGER_TOP for the '^'. This is not OP_HELP, so it prints a generic error and returns. This leaves the 'H' in the input buffer! Since 'H' (by default) is unbound in the pager, it retriggers km_error_key(), resulting in an infinite loop. The same issues can occur without control sequences: bind generic ? noop bind generic dq help In the index, hitting an unbound key will end up leaving 'q' in the unget buffer, because 'd' is bound in the index menu and will be read by km_dokey(). A simple approach to fix this would be to just use the same code as in mutt_make_help(), which has no double-check. This would be no worse than the help menu, but can generate an inaccurate error message (e.g if '?' were bound to noop) This patch instead uses OP_END_COND as a barrier in the unget buffer. It directly inserts the keys in the OP_HELP keymap, instead of using km_expand_key() + tokenize_unget_string(). After calling km_dokey() it flushes the unget buffer to the OP_END_COND barrier. Thanks to Walter Alejandro Iglesias for reporting the bug.
2017-04-05Change km_dokey() to pass SigWinch on for the MENU_EDITOR. (see #3877)Kevin McCarthy
Change _mutt_enter_string() to pass the SigWinch through for _mutt_get_field() or mutt_enter_string() to handle. Add a call to mutt_current_menu() in _mutt_get_field() to properly redisplay the screen in that case.
2016-09-22Don't abort the menu editor on sigwinch. (closes #3875)Kevin McCarthy
getch() will return ERR on sigwinch when timeout() is called with a positive value. mutt_getch() will therefore return ch==-2 for both a timeout and a sigwinch in this case. The imap code in km_dokey() exits out of the ImapKeepalive loop for a SigWinch, and was skipping past the check for MENU_EDITOR and tmp.ch==-2. Move this check below the gotkey: label so the ImapKeepalive loop behaves the same as the Timeout code. Thanks to nicop for reporting the problem and for the initial patch!
2016-06-04Sidebar clean up: building and drawing logic.Kevin McCarthy
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.
2016-06-04Add neomutt version of sidebar patch. (closes #3829)Richard Russon
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.
2016-05-24merge stableKevin McCarthy
2016-05-24Fix infinite loop when help is bound to a named key combination.Kevin McCarthy
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!
2016-05-09Change M_* symbols to MUTT_*Derek Martin
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.
2016-04-27Fix remaining direct usages of COLS/LINES to use mutt window functions.Kevin McCarthy
Most of these were just message update/clearing.
2016-01-01Convert copyright years to all use 4 digit years.Kevin McCarthy
Vincent Lefèvre pointed out the common shortcut, e.g 1996-9, is actually not allowed for copyright years. Convert all the copyright years (for mutt files) to use 4 digits.
2016-01-01Update copyright notices.Kevin McCarthy
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.
2015-10-04Create a separate macro/push/exec event buffer. (closes #3779)Kevin McCarthy
Currently, the SSL and TLS certficate prompts turn on OPTUNBUFFEREDINPUT, (to prevent macros and such from running right through the dialog). Unfortunately, the menu dialog processing in menu_dialog_dokey() is using mutt_ungetch() to forward non-dialog keys on to standard menu processing. With OPTUNBUFFEREDINPUT set, those keys never make it to the menu and are buffered until after the menu dialog. This patch creates a new event buffer, separate from the standard "unget" buffer, for use by macros, exec, and push events. These events can be temporarily ignored by setting OPTIGNOREMACROEVENTS (renamed from OPTUNBUFFEREDINPUT), while continuing to allow unget events to be processed. Since the "push" and "unget" functions now go to different buffers, function names were slightly renamed, to make it less easy to unintentionally use the wrong function at the wrong time.
2015-07-22Fix a few small compiler warnings. (See #3638)Kevin McCarthy
In certain configurations, unused variables and labels were causing warnings. Add a missing "#include <netinet/in.h>" to pop_lib.c.
2013-10-05Consistently use mutt_buffer_init functionAaron Schrab
Despite the existence of the mutt_buffer_init function, most initializations were instead done with memset. Use the specific function instead to make it easier if later changes are made to how the initialization should be done.
2013-07-23fix typos in commentsOndřej Bílka
2011-12-03Declare many structures const (closes #3552)Dan Fandrich
Many structs used in mutt are actually constant but are defined without the 'const' keyword. This can slow initialization (slightly) in some environments due to extra copying and increases the amount of writable RAM required at run-time, which can be significant on non-MMU systems. Using const can also increase the opportunities for compiler optimization. The attached patch marks many such structures as const. On my test x86 build, this reduces the size of .data by over 50%.
2011-05-22Fix some minor warningsBrendan Cully
2011-03-30fix bug where SIGWICH is ignored when $imap_keepalive < $timeoutMichael Elkins
closes #3507
2010-09-11support for ncurses extension allowing binding to function keys with modifiersMichael Elkins
2010-09-11allow octal codes with more than three digitsMichael Elkins
2009-07-22Use CRYPT_BACKEND_GPGME instead of non-existent HAVE_GPGMEFabian Groffen
2008-11-22Make what-key function available in pager-based menus, tooRocco Rutte
2008-09-11Fix IMAP keepalive if $imap_keepalive >= $timeoutRocco Rutte
2008-08-30Rework timeout handling to support keepalive in the line editor.Brendan Cully
Also allow keepalives of less than $timeout without returning before $timeout, so people who don't want to be notified of new mail don't have to be.
2008-08-29Make curses timeout the minimum of $timeout and $imap_keepalive.Rado Smiljanic
Do keepalive in km_dokey instead of directly in menu. Closes #2747.
2005-09-17Gah, forgot the zip code when updating the FSF address...Brendan Cully
2005-09-17Update FSF address (via sed, I hope nothing got mangled). Closes: #2071.Brendan Cully
2005-09-04Teach keymap.c about KEY_NEXT. Closes: #1588.Zardoz
2005-09-02Allow non-ascii characters in push arguments. Closes: #2023.Alain Bench
2005-02-03Add config.h to the top of every C file that could possibly want it.Brendan Cully
Remove it from mutt.h
2004-06-17This is the sequel to the crypto modularization changes I did onMoritz Schulte
2003-01-21. Moritz added another abstraction layer which cleans up the code and allows the crypto modules to use their own option menu. Everything should work as it used to but is now in a really good shape for part III, the Return of the GnuPG Easy Makers. -wk * crypt-mod-pgp-classic.c, crypt-mod-smime-classic.c, crypt-mod.c, crypt-mod.h: New files. * smime.c (smime_valid_passphrase, smime_send_menu): New functions. * smime.h: Removed macro: smime_valid_passphrase. Declared: smime_valid_passphrase, smime_send_menu. * pgp.c: Include "mutt_menu.h". (pgp_valid_passphrase, pgp_send_menu): New functions. * pgp.h: Removed macro: pgp_valid_passphrase. Declared: pgp_valid_passphrase, pgp_send_menu. * mutt_curses.h: Declare: mutt_need_hard_redraw. * mutt_crypt.h: Declare: crypt_pgp_valid_passphrase, crypt_pgp_send_menu, crypt_smime_valid_passphrase, crypt_smime_send_menu, crypt_init. Adjust WithCrypto definition since the GPGME backend does not exclude anymore the other `classic' backends. (KEYFLAG_ISX509): New symbol. * mutt.h (enum): New symbol: OPTCRYPTUSEGPGME. (struct body): New member: is_signed_data, warnsig. * main.c (main): Call crypt_init. * keymap.c (km_get_table): Support for MENU_KEY_SELECT_PGP and MENU_KEY_SELECT_SMIME. (Menus): Added entries fuer MENU_KEY_SELECT_PGP and MENU_KEY_SELECT_SMIME. (km_init): Create bindings for MENU_KEY_SELECT_PGP and MENU_KEY_SELECT_SMIME. * keymap.h (enum): New enum symbols: MENU_KEY_SELECT_PGP, MENU_KEY_SELECT_SMIME. * init.h: New configuration variable: crypt_use_gpgme. * compose.c (pgp_send_menu, smime_send_menu): Removed functions, they are now contained in the crypto backend modules. (mutt_compose_menu): Use crypt_pgp_send_menu and crypt_smime_send_menu instead pgp_send_menu and smime_send_menu. * cryptglue.c: Slightly rewritten in order to make use of the module mechanism used to access crypto backends. * curs_lib.c (mutt_need_hard_redraw): New function. * crypt.c (crypt_forget_passphrase): Adjust for new crypto backend interface. (crypt_valid_passphrase): Stripped, use calls to crypt_pgp_valid_passphrase and crypt_smime_valid_passphrase.
2004-04-12#1550: bind for multiple menus.Aaron Lehmann
2003-07-24Some functions/macros like isspace take an int and require theVincent Lefevre
argument to have the value of an unsigned char (or EOF). Under Solaris, gcc complains when the argument is a char (as this is a possible bug, on platforms where char is signed, like Solaris). The attached patch fixes such problems (well, perhaps I've changed more than necessary, but this doesn't hurt).
2003-07-16This patch redoes yesterday's unbuffered input patch. Now it uses aBrendan Cully
pseudo-option, which means less mess to carry down the call stack. It also made it much easier to have the SSL certificate menu be unbuffered, which it is now. So push commands won't annoy you when entering passwords or accepting certificates.
2003-07-14The attached patch prevents mutt from reading the push buffer whenBrendan Cully
asking for passwords. This is a proper fix for bug 1312. I think it's uncontroversial.
2003-01-21- To cleanup the pgp/smime code and prepare for other backends.Werner Koch
- 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