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 came up in the comp.mail.mutt newsgroup where a user wasn't
satisfied with the SHORT_MAX seconds ~9 hours limit on passphrase
timeouts.
For the first time made it necessary for the options parser to be
able to parse numbers as long values. Also, introduced
mutt_add_timeout() to detect possible overflow before adding a
timeout to a time_t value and truncate to TIME_T_MAX instead.
|
|
Large year values, even those less than INT_MAX, apparently can cause
gmtime() and localtime() to return NULL. Mutt needs larger changes
checking and handling those errors, but this will prevent the
immediately triggerable issue.
|
|
When TM_YEAR_MAX > INT_MAX, clang complains the comparison is always false.
Note that this is really a compiler bug, which was fixed by gcc 9 years ago.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=12963
Thanks to Vincent Lefèvre for the suggested fix and the gcc bug reference.
|
|
Check to make sure the year passed in isn't bigger than can be
represented using time_t on the platform.
Also add a (time_t) cast to an intermediate "years * 365" calculation
to prevent an overflow there.
Thanks to TAKAHASHI Tamotsu for his patch, and to Vincent Lefèvre for
his improvement. I merely took their code and commited it.
|
|
|
|
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%.
|
|
|
|
|
|
Remove it from mutt.h
|
|
|
|
|
|
|
|
|
|
when merging changes.
|
|
patch, translation updates.
|
|
gcc shut up about this.
|
|
|
|
|
|
|
|
|