Age | Commit message (Collapse) | Author |
|
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.
|
|
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.
|
|
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.
|
|
|
|
|
|
Mutt uses the built-in pager when $pager is unset too. Fix a few
checks to also handle that case.
|
|
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)))" \;
|
|
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.
|
|
Most of these were just message update/clearing.
|
|
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.
|
|
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.
|
|
|
|
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%.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This fixes word-wrap with multibyte strings (closes: #1503)
|
|
|
|
|
|
Remove it from mutt.h
|
|
|
|
|
|
Takashi <taki@luna.email.ne.jp>, with small changes from Edmund
Grimley Evans.
|
|
|
|
|
|
|
|
|
|
when merging changes.
|
|
|
|
|
|
place. If there are still segmentation faults due to missing
NONULLs over, they are gone now.
|
|
|
|
|
|
gcc shut up about this.
|
|
|
|
|
|
|
|
|
|
|
|
|