From c324f1029c3f546daead91e6f51e69d2db9aad03 Mon Sep 17 00:00:00 2001 From: Richard Russon Date: Mon, 1 Apr 2019 17:47:53 +0100 Subject: [PATCH] clang-format --- color.c | 7 ++++--- curs_lib.c | 2 +- editmsg.c | 3 ++- imap/message.c | 9 +++++---- imap/util.c | 2 +- mailbox.c | 1 - maildir/maildir.c | 2 +- maildir/shared.c | 6 +++--- mutt/string.c | 2 +- nntp/newsrc.c | 2 +- nntp/nntp.c | 2 +- notmuch/mutt_notmuch.c | 12 ++++++------ pop/pop.c | 2 +- 13 files changed, 27 insertions(+), 25 deletions(-) diff --git a/color.c b/color.c index 61d77c1c0..02fccce26 100644 --- a/color.c +++ b/color.c @@ -69,14 +69,14 @@ static int ColorQuoteSize; #define COLOR_DEFAULT (-2) #define COLOR_UNSET UINT32_MAX -#define GET_COLOR_VALUE(v) ((v) & 0xffffff) +#define GET_COLOR_VALUE(v) ((v) &0xffffff) /* * Flags for the high 8bits of the color value. * * Note that no flag means it's a palette color. */ -#define RGB24 (1u << 24) +#define RGB24 (1u << 24) /** * struct ColorList - A set of colors @@ -469,7 +469,8 @@ void mutt_free_color(uint32_t fg, uint32_t bg) * * Parse a colour name, such as "red", "brightgreen", "color123". */ -static int parse_color_name(const char *s, uint32_t *col, int *attr, bool is_fg, struct Buffer *err) +static int parse_color_name(const char *s, uint32_t *col, int *attr, bool is_fg, + struct Buffer *err) { char *eptr = NULL; bool is_alert = false, is_bright = false, is_light = false; diff --git a/curs_lib.c b/curs_lib.c index aba0fba39..533eb7655 100644 --- a/curs_lib.c +++ b/curs_lib.c @@ -355,7 +355,7 @@ enum QuadOption mutt_yesorno(const char *msg, enum QuadOption def) * ensure there is enough room for the answer and truncate the question * to fit. */ mutt_str_asprintf(&answer_string, " ([%s]/%s): ", (def == MUTT_YES) ? yes : no, - (def == MUTT_YES) ? no : yes); + (def == MUTT_YES) ? no : yes); answer_string_wid = mutt_strwidth(answer_string); msg_wid = mutt_strwidth(msg); diff --git a/editmsg.c b/editmsg.c index 684978fcf..c093c1934 100644 --- a/editmsg.c +++ b/editmsg.c @@ -183,7 +183,8 @@ static int ev_message(enum EvMessage action, struct Mailbox *m, struct Email *e) } MsgOpenFlags of = MUTT_MSG_NO_FLAGS; - CopyHeaderFlags cf = (((ctx_app->mailbox->magic == MUTT_MBOX) || (ctx_app->mailbox->magic == MUTT_MMDF)) ? + CopyHeaderFlags cf = + (((ctx_app->mailbox->magic == MUTT_MBOX) || (ctx_app->mailbox->magic == MUTT_MMDF)) ? CH_NO_FLAGS : CH_NOSTATUS); diff --git a/imap/message.c b/imap/message.c index 20decd33f..57e455176 100644 --- a/imap/message.c +++ b/imap/message.c @@ -45,6 +45,7 @@ #include "bcache.h" #include "curs_lib.h" #include "globals.h" +#include "hcache/hcache.h" #include "imap/imap.h" #include "mailbox.h" #include "mutt_account.h" @@ -55,7 +56,6 @@ #include "mx.h" #include "progress.h" #include "protos.h" -#include "hcache/hcache.h" #ifdef ENABLE_NLS #include #endif @@ -1028,12 +1028,12 @@ static int read_headers_fetch_new(struct Mailbox *m, unsigned int msn_begin, if (adata->capabilities & IMAP_CAP_IMAP4REV1) { mutt_str_asprintf(&hdrreq, "BODY.PEEK[HEADER.FIELDS (%s%s%s)]", want_headers, - C_ImapHeaders ? " " : "", NONULL(C_ImapHeaders)); + C_ImapHeaders ? " " : "", NONULL(C_ImapHeaders)); } else if (adata->capabilities & IMAP_CAP_IMAP4) { mutt_str_asprintf(&hdrreq, "RFC822.HEADER.LINES (%s%s%s)", want_headers, - C_ImapHeaders ? " " : "", NONULL(C_ImapHeaders)); + C_ImapHeaders ? " " : "", NONULL(C_ImapHeaders)); } else { /* Unable to fetch headers for lower versions */ @@ -1069,7 +1069,8 @@ static int read_headers_fetch_new(struct Mailbox *m, unsigned int msn_begin, fetch_msn_end = msn_end; char *cmd = NULL; - mutt_str_asprintf(&cmd, "FETCH %s (UID FLAGS INTERNALDATE RFC822.SIZE %s)", b->data, hdrreq); + mutt_str_asprintf(&cmd, "FETCH %s (UID FLAGS INTERNALDATE RFC822.SIZE %s)", + b->data, hdrreq); imap_cmd_start(adata, cmd); FREE(&cmd); mutt_buffer_free(&b); diff --git a/imap/util.c b/imap/util.c index 8d87a3cc3..8bbc431d1 100644 --- a/imap/util.c +++ b/imap/util.c @@ -51,12 +51,12 @@ #include "bcache.h" #include "curs_lib.h" #include "globals.h" +#include "hcache/hcache.h" #include "imap/imap.h" #include "mailbox.h" #include "message.h" #include "mutt_account.h" #include "options.h" -#include "hcache/hcache.h" /* These Config Variables are only used in imap/util.c */ char *C_ImapDelimChars; ///< Config: (imap) Characters that denote separators in IMAP folders diff --git a/mailbox.c b/mailbox.c index c91cd3fbf..eb187ecfb 100644 --- a/mailbox.c +++ b/mailbox.c @@ -553,4 +553,3 @@ void mutt_mailbox_size_sub(struct Mailbox *m, const struct Email *e) { m->size -= mutt_email_size(e); } - diff --git a/maildir/maildir.c b/maildir/maildir.c index d48a67bc6..90b4cb4e6 100644 --- a/maildir/maildir.c +++ b/maildir/maildir.c @@ -47,12 +47,12 @@ #include "config/lib.h" #include "email/lib.h" #include "globals.h" +#include "hcache/hcache.h" #include "mailbox.h" #include "maildir/lib.h" #include "monitor.h" #include "muttlib.h" #include "mx.h" -#include "hcache/hcache.h" // Flags for maildir_mbox_check() #define MMC_NO_DIRS 0 ///< No directories changed diff --git a/maildir/shared.c b/maildir/shared.c index 1f53bf6f0..ef17177ff 100644 --- a/maildir/shared.c +++ b/maildir/shared.c @@ -442,9 +442,9 @@ int maildir_move_to_mailbox(struct Mailbox *m, struct Maildir **ptr) continue; mutt_debug(LL_DEBUG2, "Adding header structure. Flags: %s%s%s%s%s\n", - md->email->flagged ? "f" : "", md->email->deleted ? "D" : "", - md->email->replied ? "r" : "", md->email->old ? "O" : "", - md->email->read ? "R" : ""); + md->email->flagged ? "f" : "", md->email->deleted ? "D" : "", + md->email->replied ? "r" : "", md->email->old ? "O" : "", + md->email->read ? "R" : ""); if (m->msg_count == m->email_max) mx_alloc_memory(m); diff --git a/mutt/string.c b/mutt/string.c index bb3fdad0d..1c64585e0 100644 --- a/mutt/string.c +++ b/mutt/string.c @@ -37,11 +37,11 @@ #include #include #include "exit.h" +#include "list.h" #include "logging.h" #include "memory.h" #include "message.h" #include "string2.h" -#include "list.h" #ifdef HAVE_SYSEXITS_H #include #endif diff --git a/nntp/newsrc.c b/nntp/newsrc.c index af19bb81d..3a94575a9 100644 --- a/nntp/newsrc.c +++ b/nntp/newsrc.c @@ -47,6 +47,7 @@ #include "bcache.h" #include "format_flags.h" #include "globals.h" +#include "hcache/hcache.h" #include "mailbox.h" #include "mutt_account.h" #include "mutt_logging.h" @@ -56,7 +57,6 @@ #include "nntp.h" #include "protos.h" #include "sort.h" -#include "hcache/hcache.h" /* These Config Variables are only used in nntp/newsrc.c */ char *C_NewsCacheDir; ///< Config: (nntp) Directory for cached news articles diff --git a/nntp/nntp.c b/nntp/nntp.c index 65562afdc..83e4c7afd 100644 --- a/nntp/nntp.c +++ b/nntp/nntp.c @@ -48,6 +48,7 @@ #include "context.h" #include "curs_lib.h" #include "globals.h" +#include "hcache/hcache.h" #include "hook.h" #include "mailbox.h" #include "mutt_account.h" @@ -60,7 +61,6 @@ #include "progress.h" #include "protos.h" #include "sort.h" -#include "hcache/hcache.h" #ifdef USE_SASL #include #include diff --git a/notmuch/mutt_notmuch.c b/notmuch/mutt_notmuch.c index 6b2e754cd..d6b0a441e 100644 --- a/notmuch/mutt_notmuch.c +++ b/notmuch/mutt_notmuch.c @@ -55,12 +55,12 @@ #include "mutt/mutt.h" #include "config/lib.h" #include "email/lib.h" -#include "hcache/hcache.h" #include "mutt.h" #include "mutt_notmuch.h" #include "account.h" #include "curs_lib.h" #include "globals.h" +#include "hcache/hcache.h" #include "index.h" #include "mailbox.h" #include "maildir/lib.h" @@ -979,7 +979,7 @@ static void append_message(header_cache_t *h, struct Mailbox *m, else { mutt_hcache_store(h, newpath ? newpath : path, - mutt_str_strlen(newpath ? newpath : path), e, 0); + mutt_str_strlen(newpath ? newpath : path), e, 0); } #endif if (init_email(e, newpath ? newpath : path, msg) != 0) @@ -1021,8 +1021,8 @@ done: * * Careful, this calls itself recursively to make sure we get everything. */ -static void append_replies(header_cache_t *h, struct Mailbox *m, notmuch_query_t *q, - notmuch_message_t *top, bool dedup) +static void append_replies(header_cache_t *h, struct Mailbox *m, + notmuch_query_t *q, notmuch_message_t *top, bool dedup) { notmuch_messages_t *msgs = NULL; @@ -1048,8 +1048,8 @@ static void append_replies(header_cache_t *h, struct Mailbox *m, notmuch_query_t * add each top level reply in the thread, and then add each reply to the top * level replies */ -static void append_thread(header_cache_t *h, struct Mailbox *m, notmuch_query_t *q, - notmuch_thread_t *thread, bool dedup) +static void append_thread(header_cache_t *h, struct Mailbox *m, + notmuch_query_t *q, notmuch_thread_t *thread, bool dedup) { notmuch_messages_t *msgs = NULL; diff --git a/pop/pop.c b/pop/pop.c index 9ee0c0c37..84430e596 100644 --- a/pop/pop.c +++ b/pop/pop.c @@ -48,6 +48,7 @@ #include "bcache.h" #include "context.h" #include "globals.h" +#include "hcache/hcache.h" #include "hook.h" #include "mailbox.h" #include "mutt_account.h" @@ -58,7 +59,6 @@ #include "mx.h" #include "ncrypt/ncrypt.h" #include "progress.h" -#include "hcache/hcache.h" #ifdef ENABLE_NLS #include #endif -- 2.40.0