summaryrefslogtreecommitdiffstats
path: root/help.c
AgeCommit message (Collapse)Author
2021-07-28Improve generic menu type handling.Kevin McCarthy
Some of the menus are directly of MENU_GENERIC type. In a few places, Mutt handles those inefficiently or slightly incorrectly. Remove double "generic" lookups when Mutt is in a generic menu. Fix the help menu to not show unbound or "generic bindings" for a generic menu. For exec completion, always add generic functions to the possible completion list.
2021-07-28Break the menu OPS/funcs and keybindings into separate tables.Kevin McCarthy
Move the "extra" keybindings added manually inside km_init() into the keybinding tables instead. This allows the documentation in the manual to be generated correctly. It also corrects a small problem with duplicate OPS in the struct binding_t table. The exec completion and unbound list in the help menu iterated the active binding_t table and assumed each OP appears only once. When '\n' and '\r' were both added to the binding_t table, this broke the assumption and caused those to misbehave.
2020-08-10Improve clarity of help format_line() splitting.Kevin McCarthy
Thanks to Zero King for the initial patch. He says the original line confused some static analysis tools. I don't see anything wrong with the operator precedence, but as long as we are cleaning up the line, split assignment and conditional evaluation to make it even clearer.
2019-11-12Fix __attribute__((warn_unused_result)) issue in help.cDavid Champion
2019-10-05Convert mutt_help() to use buffer for tempfile.Kevin McCarthy
2019-10-04Fix built-in pager checks for help and attachments.Kevin McCarthy
Mutt uses the built-in pager when $pager is unset too. Fix a few checks to also handle that case.
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)))" \;
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-04-08Reset mbstate for other mbrtowc() calls returning -1Kevin McCarthy
Continue the cleanup started in changesets c8c76a6a1e61 and a3450fd50d11. In those changesets, a bug was occurring due to the mbstate not being reset when mbrtowc() returned -1. This patch fixes other callers of mbrtowc() to reset mbstate when it returns -1.
2015-07-23Fix compiler type warnings. (closes #3765)Kevin McCarthy
The output of mutt_local_tz() was being passed to abs(). Technically the return type is time_t, but it represents a small value: the timezone offset in seconds. Add a safe explicit cast to int. Change the txt parameter of mutt_make_help() to type const char *. Typically all calls run the txt parameter through _(), which accepts const char * and returns a char *. However, if NLS is not enabled, _() is a noop, simply returning the parameter itself. In mutt_compile_help(), items[i].name is const char *, so it will generate a warning when passed as the txt parameter of mutt_make_help(). On some systems, e.g. OS X, snprintf is defined as a macro. One call in hcache.c was embedding directives inside the snprintf call. This is apparently undefined behavior, so duplicate the call instead.
2015-01-26Corrected various spelling mistakes (most of them reported by codespell).Vincent Lefevre
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%.
2009-06-21Pass buffer size to mutt_mktemp()Rocco Rutte
2009-03-15Use safe_fclose() instead of fclose(), add fclose() to check_sec.shRocco Rutte
2009-01-27Update copyright yearsRocco Rutte
2009-01-27Fix help alignment for escape sequences at screen boundary. Closes #3146.Rocco Rutte
2007-09-05Teach pager how to ignore $wrap and use it for help (closes #2896).Rocco Rutte
2007-03-14Complete fix for #1503TAKIZAWA Takashi
2007-03-13Use strwidth instead of strlen when generating help strings.TAKIZAWA Takashi
This fixes word-wrap with multibyte strings (closes: #1503)
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-02-03Add config.h to the top of every C file that could possibly want it.Brendan Cully
Remove it from mutt.h
2002-12-11Fix Mike's and my e-mail addresses in copyright lines.Thomas Roessler
2000-10-07Display fixes from EGE.Thomas Roessler
2000-07-24Replace wctomb and mbtowc with wcrtomb and mbrtowc. From TAKIZAWAThomas Roessler
Takashi <taki@luna.email.ne.jp>, with small changes from Edmund Grimley Evans.
2000-05-12wide-character related patches. From Edmund Grimley Evans.Thomas Roessler
2000-05-09Edmund Grimley Evans' UTF-8 patch.Thomas Roessler
2000-03-03The FSF apparently has moved.Thomas Roessler
2000-01-06Update copyright notices for unstable.Thomas Roessler
1999-01-07Get rid of RCS ids in source files. They are getting in our wayThomas Roessler
when merging changes.
1998-12-08Help screen resizing nit. From Gero Treuner.Thomas Roessler
1998-11-14Type cast nit from Gero Treuner.Thomas Roessler
1998-11-10Introduce or rewrite mutt_{str*cmp,strlen} and use them all over theThomas Roessler
place. If there are still segmentation faults due to missing NONULLs over, they are gone now.
1998-11-09Fix the display of DEL in the pager.Thomas Roessler
1998-10-28Gero Treuner's help-wrap patch.Thomas Roessler
1998-10-15Change "static char rcsid[]" to "static const char rcsid[]" to makemutt-0-94-13-relThomas Roessler
gcc shut up about this.
1998-10-13Add RCS $Id$ strings to (hopefully) all source files.Thomas Roessler
1998-10-03Remove an unprotected gettext() call.Thomas Roessler
1998-10-01Translate help strigns.Thomas Roessler
1998-10-01Adding gettext support, based on the patch by Marco d'Itri.Thomas Roessler
1998-08-25CVS branch clean-up.Thomas Roessler
1998-06-08Initial revisionThomas Roessler