]> granicus.if.org Git - neomutt/commitdiff
clang-format
authorRichard Russon <rich@flatcap.org>
Mon, 26 Nov 2018 11:00:28 +0000 (11:00 +0000)
committerRichard Russon <rich@flatcap.org>
Mon, 26 Nov 2018 11:01:05 +0000 (11:01 +0000)
17 files changed:
commands.c
compose.c
copy.c
editmsg.c
hook.c
imap/command.c
imap/imap.c
imap/message.c
index.c
maildir/mh.c
menu.c
mutt/file.c
ncrypt/crypt.c
pattern.c
recvcmd.c
send.c
sendlib.c

index 096fa4833a18879cdb3a0b1be6923e7b37d6f3a8..98463376ba90c8a5b2a0af73b86d888104aadd9f 100644 (file)
@@ -1038,7 +1038,8 @@ int mutt_save_message(struct Email *e, bool delete, bool decode, bool decrypt)
           continue;
 
         mutt_message_hook(Context, Context->mailbox->hdrs[i], MUTT_MESSAGE_HOOK);
-        rc = mutt_save_message_ctx(Context->mailbox->hdrs[i], delete, decode, decrypt, savectx->mailbox);
+        rc = mutt_save_message_ctx(Context->mailbox->hdrs[i], delete, decode,
+                                   decrypt, savectx->mailbox);
         if (rc != 0)
           break;
 #ifdef USE_COMPRESSED
index 40ab2e452e0635c77b610c26468a8e4315bf50db..020df6658d192ae5ada25bcd9909f3b8fba9fa26 100644 (file)
--- a/compose.c
+++ b/compose.c
@@ -1487,8 +1487,8 @@ int mutt_compose_menu(struct Email *msg, char *fcc, size_t fcclen, struct Email
             continue;
 
           new = mutt_mem_calloc(1, sizeof(struct AttachPtr));
-          new->content =
-              mutt_make_message_attach(Context->mailbox, Context->mailbox->hdrs[i], true);
+          new->content = mutt_make_message_attach(Context->mailbox,
+                                                  Context->mailbox->hdrs[i], true);
           if (new->content)
             update_idx(menu, actx, new);
           else
diff --git a/copy.c b/copy.c
index 419750893f939278de0c5539e4a8e74e71fc40dc..4f8e2ff18c90f05e669de7fb4ab136ef213a35a4 100644 (file)
--- a/copy.c
+++ b/copy.c
@@ -841,8 +841,7 @@ static int append_message(struct Mailbox *dest, FILE *fpin, struct Mailbox *src,
     r = -1;
 
 #ifdef USE_NOTMUCH
-  if (msg->committed_path && dest->magic == MUTT_MAILDIR &&
-      src->magic == MUTT_NOTMUCH)
+  if (msg->committed_path && dest->magic == MUTT_MAILDIR && src->magic == MUTT_NOTMUCH)
     nm_update_filename(src, NULL, msg->committed_path, e);
 #endif
 
index 6b9b820ac3f1ae8335f97bdee8616fc7c90200dd..cebcb9cdd0142f82ffef035ea440d8a4e1af9ce8 100644 (file)
--- a/editmsg.c
+++ b/editmsg.c
@@ -94,8 +94,7 @@ static int edit_or_view_one_message(bool edit, struct Mailbox *m, struct Email *
   }
 
   const int chflags =
-      CH_NOLEN |
-      ((m->magic == MUTT_MBOX || m->magic == MUTT_MMDF) ? 0 : CH_NOSTATUS);
+      CH_NOLEN | ((m->magic == MUTT_MBOX || m->magic == MUTT_MMDF) ? 0 : CH_NOSTATUS);
   rc = mutt_append_message(tmpctx->mailbox, m, cur, 0, chflags);
   oerrno = errno;
 
diff --git a/hook.c b/hook.c
index 666c25ea43c5435c914fda942e38e4ffb95d3e48..b6030192090f0db456dc31c27a0cbc8ede892d66 100644 (file)
--- a/hook.c
+++ b/hook.c
 #include <unistd.h>
 #include "mutt/mutt.h"
 #include "email/lib.h"
-#include "context.h"
 #include "mutt.h"
 #include "hook.h"
 #include "alias.h"
+#include "context.h"
 #include "globals.h"
 #include "hdrline.h"
 #include "mutt_attach.h"
index cde309179612ad938de163aae7b805a3a9fa6c62..603570fd17eb97cef10438254bad51d7c38eff6c 100644 (file)
@@ -1332,7 +1332,8 @@ void imap_cmd_finish(struct ImapAccountData *adata)
       mdata->check_status = IMAP_EXPUNGE_PENDING;
 
     if (mdata->reopen & IMAP_EXPUNGE_PENDING)
-      mdata->reopen &= ~(IMAP_EXPUNGE_PENDING | IMAP_NEWMAIL_PENDING | IMAP_EXPUNGE_EXPECTED);
+      mdata->reopen &=
+          ~(IMAP_EXPUNGE_PENDING | IMAP_NEWMAIL_PENDING | IMAP_EXPUNGE_EXPECTED);
   }
 
   adata->status = 0;
index 1231bd0081c49dedaea453a633e4dc2cfd79f8b2..75d564380a85092f87ac0014e1705e8802b78e3d 100644 (file)
@@ -308,8 +308,7 @@ static int sync_helper(struct ImapAccountData *adata, int right, int flag, const
   if (!mutt_bit_isset(adata->mailbox->rights, right))
     return 0;
 
-  if (right == MUTT_ACL_WRITE &&
-      !imap_has_flag(&imap_mdata_get(adata->mailbox)->flags, name))
+  if (right == MUTT_ACL_WRITE && !imap_has_flag(&imap_mdata_get(adata->mailbox)->flags, name))
     return 0;
 
   snprintf(buf, sizeof(buf), "+FLAGS.SILENT (%s)", name);
@@ -1191,8 +1190,8 @@ int imap_sync_message_for_copy(struct ImapAccountData *adata, struct Email *e,
 
   /* after all this it's still possible to have no flags, if you
    * have no ACL rights */
-  if (*flags && (imap_exec(adata, cmd->data, 0) != IMAP_EXEC_SUCCESS) && err_continue &&
-      (*err_continue != MUTT_YES))
+  if (*flags && (imap_exec(adata, cmd->data, 0) != IMAP_EXEC_SUCCESS) &&
+      err_continue && (*err_continue != MUTT_YES))
   {
     *err_continue = imap_continue("imap_sync_message: STORE failed", adata->buf);
     if (*err_continue != MUTT_YES)
@@ -1330,7 +1329,7 @@ static int imap_status(struct ImapAccountData *adata, struct ImapMboxData *mdata
            mdata->munge_name, uid_validity_flag);
 
   int rc = imap_exec(adata, command, queue ? IMAP_CMD_QUEUE : 0 | IMAP_CMD_POLL);
-  if (rc < 0 )
+  if (rc < 0)
   {
     mutt_debug(1, "Error queueing command\n");
     return rc;
@@ -2037,8 +2036,8 @@ static int imap_mbox_open(struct Context *ctx)
   /* pipeline the postponed count if possible */
   struct Mailbox *postponed_m = mx_mbox_find2(Postponed);
   struct ImapAccountData *postponed_adata = imap_adata_get(postponed_m);
-  if (postponed_adata && mutt_account_match(&postponed_adata->conn_account,
-                                            &adata->conn_account))
+  if (postponed_adata &&
+      mutt_account_match(&postponed_adata->conn_account, &adata->conn_account))
     imap_mailbox_status(postponed_m, true);
 
   if (ImapCheckSubscribed)
index 7bb97c1c9d1c7cd3d13eb568e4767e85fbace6aa..68a7381cc81306dd7d3443f28e2fc73d961d6a26 100644 (file)
@@ -1787,8 +1787,8 @@ char *imap_set_flags(struct ImapAccountData *adata, struct Email *e, char *s, in
   /* This is redundant with the following two checks. Removing:
    * mutt_set_flag (adata->ctx, e, MUTT_NEW, !(edata->read || edata->old));
    */
-  set_changed_flag(m, e, local_changes, server_changes, MUTT_OLD,
-                   old_edata.old, edata->old, e->old);
+  set_changed_flag(m, e, local_changes, server_changes, MUTT_OLD, old_edata.old,
+                   edata->old, e->old);
   set_changed_flag(m, e, local_changes, server_changes, MUTT_READ,
                    old_edata.read, edata->read, e->read);
   set_changed_flag(m, e, local_changes, server_changes, MUTT_DELETE,
diff --git a/index.c b/index.c
index ba2a65ea20b28d65ab795ee5f110dd0d38c9a5e0..1e13b7496c06ba094ab5becb39d63f47ff924562 100644 (file)
--- a/index.c
+++ b/index.c
@@ -470,8 +470,8 @@ static void update_index_unthreaded(struct Context *ctx, int check, int oldcount
         ctx->vsize = 0;
       }
 
-      if (mutt_pattern_exec(ctx->limit_pattern, MUTT_MATCH_FULL_ADDRESS, ctx->mailbox,
-                            ctx->mailbox->hdrs[i], NULL))
+      if (mutt_pattern_exec(ctx->limit_pattern, MUTT_MATCH_FULL_ADDRESS,
+                            ctx->mailbox, ctx->mailbox->hdrs[i], NULL))
       {
         assert(ctx->mailbox->vcount < ctx->mailbox->msg_count);
         ctx->mailbox->hdrs[i]->virtual = ctx->mailbox->vcount;
@@ -1991,7 +1991,8 @@ int mutt_index_menu(void)
           {
             char msgbuf[STRING];
             snprintf(msgbuf, sizeof(msgbuf), _("Update tags..."));
-            mutt_progress_init(&progress, msgbuf, MUTT_PROGRESS_MSG, 1, Context->mailbox->msg_tagged);
+            mutt_progress_init(&progress, msgbuf, MUTT_PROGRESS_MSG, 1,
+                               Context->mailbox->msg_tagged);
           }
 
 #ifdef USE_NOTMUCH
@@ -2104,7 +2105,7 @@ int mutt_index_menu(void)
         break;
 
       case OP_MAIN_WINDOWED_VFOLDER_FORWARD:
-      CHECK_IN_MAILBOX;
+        CHECK_IN_MAILBOX;
         if (NmQueryWindowDuration <= 0)
         {
           mutt_message(_("Windowed queries disabled"));
@@ -2669,8 +2670,8 @@ int mutt_index_menu(void)
           {
             if (message_is_tagged(Context, j))
             {
-              mutt_set_flag(Context->mailbox, Context->mailbox->hdrs[j], MUTT_FLAG,
-                            !Context->mailbox->hdrs[j]->flagged);
+              mutt_set_flag(Context->mailbox, Context->mailbox->hdrs[j],
+                            MUTT_FLAG, !Context->mailbox->hdrs[j]->flagged);
             }
           }
 
index 2a50b0dcfb2853da6d628a47db43e5b6382760f6..98910f1fff4b6f9185c5a345c69ff51820cf020a 100644 (file)
@@ -745,7 +745,7 @@ static int mh_msg_open(struct Mailbox *m, struct Message *msg, int msgno)
  */
 static int mh_msg_open_new(struct Mailbox *m, struct Message *msg, struct Email *e)
 {
-  if (!m|| !msg)
+  if (!m || !msg)
     return -1;
   return mh_mkstemp(m, &msg->fp, &msg->path);
 }
diff --git a/menu.c b/menu.c
index 825a0611ccd94c1f9ab29b098d4549ca8f7f77f6..681a187006ee7cee66ede8e4d63cdbfe2defe874 100644 (file)
--- a/menu.c
+++ b/menu.c
@@ -112,7 +112,8 @@ static int get_color(int index, unsigned char *s)
 
   STAILQ_FOREACH(np, color, entries)
   {
-    if (mutt_pattern_exec(np->color_pattern, MUTT_MATCH_FULL_ADDRESS, Context->mailbox, e, NULL))
+    if (mutt_pattern_exec(np->color_pattern, MUTT_MATCH_FULL_ADDRESS,
+                          Context->mailbox, e, NULL))
       return np->pair;
   }
 
index 757ea581aed98c59c3df5a2a1d5e72aa3e4f7f92..a5373ead941c0139f4be9e894950b6458ac16ae0 100644 (file)
@@ -1467,7 +1467,8 @@ void mutt_file_get_stat_timespec(struct timespec *dest, struct stat *sb, enum Mu
  * @retval  0 a and b are identical
  * @retval  1 b precedes a
  */
-int mutt_file_stat_timespec_compare(struct stat *sba, enum MuttStatType type, struct timespec *b)
+int mutt_file_stat_timespec_compare(struct stat *sba, enum MuttStatType type,
+                                    struct timespec *b)
 {
   struct timespec a = { 0 };
 
@@ -1486,7 +1487,7 @@ int mutt_file_stat_timespec_compare(struct stat *sba, enum MuttStatType type, st
  * @retval  1 b precedes a
  */
 int mutt_file_stat_compare(struct stat *sba, enum MuttStatType sba_type,
-                      struct stat *sbb, enum MuttStatType sbb_type)
+                           struct stat *sbb, enum MuttStatType sbb_type)
 {
   struct timespec a = { 0 };
   struct timespec b = { 0 };
@@ -1495,4 +1496,3 @@ int mutt_file_stat_compare(struct stat *sba, enum MuttStatType sba_type,
   mutt_file_get_stat_timespec(&b, sbb, sbb_type);
   return mutt_file_timespec_compare(&a, &b);
 }
-
index 2adb65e79f8b532d0e5ee02ac6fc22a09b9110cc..5ea5cb314d8bd724d2432bb636cf27e57c7937b2 100644 (file)
@@ -843,7 +843,8 @@ void crypt_extract_keys_from_messages(struct Email *e)
 
       if (((WithCrypto & APPLICATION_PGP) != 0) && (ei->security & APPLICATION_PGP))
       {
-        mutt_copy_message_ctx(fpout, Context->mailbox, ei, MUTT_CM_DECODE | MUTT_CM_CHARCONV, 0);
+        mutt_copy_message_ctx(fpout, Context->mailbox, ei,
+                              MUTT_CM_DECODE | MUTT_CM_CHARCONV, 0);
         fflush(fpout);
 
         mutt_endwin();
@@ -887,7 +888,8 @@ void crypt_extract_keys_from_messages(struct Email *e)
     {
       if (((WithCrypto & APPLICATION_PGP) != 0) && (e->security & APPLICATION_PGP))
       {
-        mutt_copy_message_ctx(fpout, Context->mailbox, e, MUTT_CM_DECODE | MUTT_CM_CHARCONV, 0);
+        mutt_copy_message_ctx(fpout, Context->mailbox, e,
+                              MUTT_CM_DECODE | MUTT_CM_CHARCONV, 0);
         fflush(fpout);
         mutt_endwin();
         puts(_("Trying to extract PGP keys...\n"));
index af093b0f5e75ef61e52ea18cfb7e84b63485999e..7c26acfca8c14a38334f14b194624d593b707a46 100644 (file)
--- a/pattern.c
+++ b/pattern.c
@@ -1666,13 +1666,11 @@ static int match_threadcomplete(struct Pattern *pat, enum PatternExecFlag flags,
 
   if (up && (a = match_threadcomplete(pat, flags, m, t->parent, 1, 1, 1, 0)))
     return a;
-  if (right && t->parent &&
-      (a = match_threadcomplete(pat, flags, m, t->next, 0, 0, 1, 1)))
+  if (right && t->parent && (a = match_threadcomplete(pat, flags, m, t->next, 0, 0, 1, 1)))
   {
     return a;
   }
-  if (left && t->parent &&
-      (a = match_threadcomplete(pat, flags, m, t->prev, 1, 0, 0, 1)))
+  if (left && t->parent && (a = match_threadcomplete(pat, flags, m, t->prev, 1, 0, 0, 1)))
   {
     return a;
   }
@@ -1755,8 +1753,8 @@ static int match_content_type(const struct Pattern *pat, struct Body *b)
  * @retval  1 Success, pattern matched
  * @retval  0 Pattern did not match
  */
-static int match_mime_content_type(const struct Pattern *pat,
-                                   struct Mailbox *m, struct Email *e)
+static int match_mime_content_type(const struct Pattern *pat, struct Mailbox *m,
+                                   struct Email *e)
 {
   mutt_parse_mime_message(m, e);
   return match_content_type(pat, e->content);
@@ -2288,16 +2286,19 @@ int mutt_pattern_func(int op, char *prompt)
         switch (op)
         {
           case MUTT_UNDELETE:
-            mutt_set_flag(Context->mailbox, Context->mailbox->hdrs[Context->mailbox->v2r[i]],
+            mutt_set_flag(Context->mailbox,
+                          Context->mailbox->hdrs[Context->mailbox->v2r[i]],
                           MUTT_PURGE, 0);
           /* fallthrough */
           case MUTT_DELETE:
-            mutt_set_flag(Context->mailbox, Context->mailbox->hdrs[Context->mailbox->v2r[i]],
+            mutt_set_flag(Context->mailbox,
+                          Context->mailbox->hdrs[Context->mailbox->v2r[i]],
                           MUTT_DELETE, (op == MUTT_DELETE));
             break;
           case MUTT_TAG:
           case MUTT_UNTAG:
-            mutt_set_flag(Context->mailbox, Context->mailbox->hdrs[Context->mailbox->v2r[i]],
+            mutt_set_flag(Context->mailbox,
+                          Context->mailbox->hdrs[Context->mailbox->v2r[i]],
                           MUTT_TAG, (op == MUTT_TAG));
             break;
         }
@@ -2459,8 +2460,8 @@ int mutt_search_command(int cur, int op)
     {
       /* remember that we've already searched this message */
       e->searched = true;
-      e->matched =
-          mutt_pattern_exec(SearchPattern, MUTT_MATCH_FULL_ADDRESS, Context->mailbox, e, NULL);
+      e->matched = mutt_pattern_exec(SearchPattern, MUTT_MATCH_FULL_ADDRESS,
+                                     Context->mailbox, e, NULL);
       if (e->matched > 0)
       {
         mutt_clear_error();
index 602f6cd109ab0c12e22753b15873b9e2d74210b9..b5b503f1120e34e0993514830618ae4fa54db65b 100644 (file)
--- a/recvcmd.c
+++ b/recvcmd.c
@@ -29,8 +29,8 @@
 #include "config/lib.h"
 #include "email/lib.h"
 #include "mutt.h"
-#include "context.h"
 #include "alias.h"
+#include "context.h"
 #include "copy.h"
 #include "curs_lib.h"
 #include "globals.h"
diff --git a/send.c b/send.c
index f7c5ff5fd484bacde2f657490a89b4a3daad47dc..db00d4b9858f1ceed90dcedad75b0a86d2917356 100644 (file)
--- a/send.c
+++ b/send.c
@@ -2416,8 +2416,7 @@ int ci_send_message(int flags, struct Email *msg, char *tempfile,
   {
     if (cur && ctx)
       mutt_set_flag(ctx->mailbox, cur, MUTT_REPLIED, is_reply(cur, msg));
-    else if (!(flags & SEND_POSTPONED) && ctx && ctx->mailbox &&
-             ctx->mailbox->msg_tagged)
+    else if (!(flags & SEND_POSTPONED) && ctx && ctx->mailbox && ctx->mailbox->msg_tagged)
     {
       for (i = 0; i < ctx->mailbox->msg_count; i++)
       {
index 5522fd47af426fa4f419a7e4518741255458c12b..d22ad1ef29fbf1e258fbac12303279e61b1f4d96 100644 (file)
--- a/sendlib.c
+++ b/sendlib.c
@@ -379,8 +379,7 @@ int mutt_write_mime_header(struct Body *a, FILE *f)
        * even when they aren't needed.
        */
 
-      if ((mutt_str_strcasecmp(np->attribute, "boundary") == 0) &&
-          (strcmp(buf, tmp) == 0))
+      if ((mutt_str_strcasecmp(np->attribute, "boundary") == 0) && (strcmp(buf, tmp) == 0))
       {
         snprintf(buf, sizeof(buf), "\"%s\"", tmp);
       }