diff options
author | Kevin McCarthy <kevin@8t8.us> | 2019-01-03 19:58:18 -0800 |
---|---|---|
committer | Kevin McCarthy <kevin@8t8.us> | 2019-01-04 13:59:27 -0800 |
commit | 248c2ee8ed7c0ff333ae076041107210c5acd641 (patch) | |
tree | f51f10f1f486e08c76e187c095e536620bebbbd0 /curs_lib.c | |
parent | 085a6f74b3b7cebabb75f4c99ea9d59649c7b03a (diff) |
Clean up code indentation.
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.
Diffstat (limited to 'curs_lib.c')
-rw-r--r-- | curs_lib.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -298,9 +298,9 @@ int mutt_yesorno (const char *msg, int def) answer[1] = 0; reyes_ok = (expr = nl_langinfo (YESEXPR)) && expr[0] == '^' && - !REGCOMP (&reyes, expr, REG_NOSUB); + !REGCOMP (&reyes, expr, REG_NOSUB); reno_ok = (expr = nl_langinfo (NOEXPR)) && expr[0] == '^' && - !REGCOMP (&reno, expr, REG_NOSUB); + !REGCOMP (&reno, expr, REG_NOSUB); #endif /* @@ -608,7 +608,7 @@ void mutt_progress_init (progress_t* progress, const char *msg, /* if timestamp is 0 no time-based suppression is done */ if (TimeInc) progress->timestamp = ((unsigned int) tv.tv_sec * 1000) - + (unsigned int) (tv.tv_usec / 1000); + + (unsigned int) (tv.tv_usec / 1000); mutt_progress_update (progress, 0, 0); } @@ -635,7 +635,7 @@ void mutt_progress_update (progress_t* progress, long pos, int percent) /* skip refresh if not enough time has passed */ if (update && progress->timestamp && !gettimeofday (&tv, NULL)) { now = ((unsigned int) tv.tv_sec * 1000) - + (unsigned int) (tv.tv_usec / 1000); + + (unsigned int) (tv.tv_usec / 1000); if (now && now - progress->timestamp < TimeInc) update = 0; } @@ -664,7 +664,7 @@ void mutt_progress_update (progress_t* progress, long pos, int percent) { mutt_message ("%s %s/%s (%d%%)", progress->msg, posstr, progress->sizestr, percent > 0 ? percent : - (int) (100.0 * (double) progress->pos / progress->size)); + (int) (100.0 * (double) progress->pos / progress->size)); } else { @@ -891,7 +891,7 @@ void mutt_perror (const char *s) char *p = strerror (errno); dprint (1, (debugfile, "%s: %s (errno = %d)\n", s, - p ? p : "unknown error", errno)); + p ? p : "unknown error", errno)); mutt_error ("%s: %s (errno = %d)", s, p ? p : _("unknown error"), errno); } @@ -1228,8 +1228,8 @@ void mutt_format_string (char *dest, size_t destlen, wc = ' '; else #endif - if (!IsWPrint (wc)) - wc = '?'; + if (!IsWPrint (wc)) + wc = '?'; w = wcwidth (wc); } if (w >= 0) |