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 /commands.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 'commands.c')
-rw-r--r-- | commands.c | 85 |
1 files changed, 43 insertions, 42 deletions
@@ -223,7 +223,8 @@ int mutt_display_message (HEADER *cur) } res = mutt_copy_message (fpout, Context, cur, cmflags, - (option (OPTWEED) ? (CH_WEED | CH_REORDER) : 0) | CH_DECODE | CH_FROM | CH_DISPLAY); + (option (OPTWEED) ? (CH_WEED | CH_REORDER) : 0) | + CH_DECODE | CH_FROM | CH_DISPLAY); if ((safe_fclose (&fpout) != 0 && errno != EPIPE) || res < 0) { mutt_error (_("Could not copy message")); @@ -326,8 +327,8 @@ void ci_bounce_message (HEADER *h) char *err = NULL; int rc; - /* RfC 5322 mandates a From: header, so warn before bouncing - * messages without one */ + /* RfC 5322 mandates a From: header, so warn before bouncing + * messages without one */ if (h) { if (!h->env->from) @@ -379,7 +380,7 @@ void ci_bounce_message (HEADER *h) #define extra_space (15 + 7 + 2) snprintf (scratch, sizeof (scratch), - (h ? _("Bounce message to %s") : _("Bounce messages to %s")), buf); + (h ? _("Bounce message to %s") : _("Bounce messages to %s")), buf); if (mutt_strwidth (prompt) > MuttMessageWindow->cols - extra_space) { @@ -591,7 +592,7 @@ void mutt_print_message (HEADER *h) if (query_quadoption (OPT_PRINT, h ? _("Print message?") : _("Print tagged messages?")) - != MUTT_YES) + != MUTT_YES) return; if (_mutt_pipe_message (h, PrintCmd, @@ -620,52 +621,52 @@ int mutt_select_sort (int reverse) _("Sort Date/Frm/Recv/Subj/tO/Thread/Unsort/siZe/sCore/sPam/Label?: "), _("dfrsotuzcpl"))) { - case -1: /* abort - don't resort */ - return -1; + case -1: /* abort - don't resort */ + return -1; - case 1: /* (d)ate */ - Sort = SORT_DATE; - break; + case 1: /* (d)ate */ + Sort = SORT_DATE; + break; - case 2: /* (f)rm */ - Sort = SORT_FROM; - break; + case 2: /* (f)rm */ + Sort = SORT_FROM; + break; - case 3: /* (r)ecv */ - Sort = SORT_RECEIVED; - break; + case 3: /* (r)ecv */ + Sort = SORT_RECEIVED; + break; - case 4: /* (s)ubj */ - Sort = SORT_SUBJECT; - break; + case 4: /* (s)ubj */ + Sort = SORT_SUBJECT; + break; - case 5: /* t(o) */ - Sort = SORT_TO; - break; + case 5: /* t(o) */ + Sort = SORT_TO; + break; - case 6: /* (t)hread */ - Sort = SORT_THREADS; - break; + case 6: /* (t)hread */ + Sort = SORT_THREADS; + break; - case 7: /* (u)nsort */ - Sort = SORT_ORDER; - break; + case 7: /* (u)nsort */ + Sort = SORT_ORDER; + break; - case 8: /* si(z)e */ - Sort = SORT_SIZE; - break; + case 8: /* si(z)e */ + Sort = SORT_SIZE; + break; - case 9: /* s(c)ore */ - Sort = SORT_SCORE; - break; + case 9: /* s(c)ore */ + Sort = SORT_SCORE; + break; - case 10: /* s(p)am */ - Sort = SORT_SPAM; - break; + case 10: /* s(p)am */ + Sort = SORT_SPAM; + break; - case 11: /* (l)abel */ - Sort = SORT_LABEL; - break; + case 11: /* (l)abel */ + Sort = SORT_LABEL; + break; } if (reverse) Sort |= SORT_REVERSE; @@ -760,7 +761,7 @@ static void set_copy_flags (HEADER *hdr, int decode, int decrypt, int *cmflags, *cmflags = MUTT_CM_DECODE_PGP; } else if ((WithCrypto & APPLICATION_PGP) - && mutt_is_application_pgp (hdr->content) & ENCRYPT) + && mutt_is_application_pgp (hdr->content) & ENCRYPT) decode = 1; else if ((WithCrypto & APPLICATION_SMIME) && mutt_is_application_smime(hdr->content) & ENCRYPT) @@ -928,7 +929,7 @@ int mutt_save_message (HEADER *h, int delete, int decode, int decrypt) { mutt_message_hook (Context, Context->hdrs[Context->v2r[i]], MUTT_MESSAGEHOOK); if (_mutt_save_message(Context->hdrs[Context->v2r[i]], - &ctx, delete, decode, decrypt) != 0) + &ctx, delete, decode, decrypt) != 0) { mx_close_mailbox (&ctx, NULL); return -1; |