From: Richard Russon Date: Thu, 6 Sep 2018 16:58:59 +0000 (+0100) Subject: clang-format X-Git-Tag: 2019-10-25~658 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=31b629e304b71a209a155bcf87c03e30906074d0;p=neomutt clang-format --- diff --git a/browser.c b/browser.c index 4685a712f..f405bb67b 100644 --- a/browser.c +++ b/browser.c @@ -885,7 +885,8 @@ static int examine_directory(struct Menu *menu, struct BrowserState *state, break; } - if (np && Context && (mutt_str_strcmp(np->b->realpath, Context->mailbox->realpath) == 0)) + if (np && Context && + (mutt_str_strcmp(np->b->realpath, Context->mailbox->realpath) == 0)) { np->b->msg_count = Context->mailbox->msg_count; np->b->msg_unread = Context->mailbox->msg_unread; diff --git a/commands.c b/commands.c index 131b99635..8c07f25ca 100644 --- a/commands.c +++ b/commands.c @@ -1060,8 +1060,8 @@ int mutt_save_message(struct Header *h, bool delete, bool decode, bool decrypt) } } - const bool need_mailbox_cleanup = - ((savectx->mailbox->magic == MUTT_MBOX) || (savectx->mailbox->magic == MUTT_MMDF)); + const bool need_mailbox_cleanup = ((savectx->mailbox->magic == MUTT_MBOX) || + (savectx->mailbox->magic == MUTT_MMDF)); mx_mbox_close(&savectx, NULL); diff --git a/compress.c b/compress.c index b1f139c26..fcf517d85 100644 --- a/compress.c +++ b/compress.c @@ -161,7 +161,8 @@ static int setup_paths(struct Context *ctx) char tmppath[PATH_MAX]; /* Setup the right paths */ - mutt_str_strfcpy(ctx->mailbox->realpath, ctx->mailbox->path, sizeof(ctx->mailbox->realpath)); + mutt_str_strfcpy(ctx->mailbox->realpath, ctx->mailbox->path, + sizeof(ctx->mailbox->realpath)); /* We will uncompress to /tmp */ mutt_mktemp(tmppath, sizeof(tmppath)); @@ -516,7 +517,8 @@ static int comp_mbox_open_append(struct Context *ctx, int flags) /* To append we need an append-hook or a close-hook */ if (!ci->append && !ci->close) { - mutt_error(_("Cannot append without an append-hook or close-hook : %s"), ctx->mailbox->path); + mutt_error(_("Cannot append without an append-hook or close-hook : %s"), + ctx->mailbox->path); goto oa_fail1; } @@ -798,7 +800,8 @@ bool mutt_comp_can_append(struct Context *ctx) if (ci->append || ci->close) return true; - mutt_error(_("Cannot append without an append-hook or close-hook : %s"), ctx->mailbox->path); + mutt_error(_("Cannot append without an append-hook or close-hook : %s"), + ctx->mailbox->path); return false; } diff --git a/copy.c b/copy.c index 6a41373cc..cc225f090 100644 --- a/copy.c +++ b/copy.c @@ -838,7 +838,8 @@ static int append_message(struct Context *dest, FILE *fpin, struct Context *src, r = -1; #ifdef USE_NOTMUCH - if (msg->committed_path && dest->mailbox->magic == MUTT_MAILDIR && src->mailbox->magic == MUTT_NOTMUCH) + if (msg->committed_path && dest->mailbox->magic == MUTT_MAILDIR && + src->mailbox->magic == MUTT_NOTMUCH) nm_update_filename(src, NULL, msg->committed_path, hdr); #endif diff --git a/curs_main.c b/curs_main.c index 720f6ad4f..3f765a756 100644 --- a/curs_main.c +++ b/curs_main.c @@ -121,7 +121,7 @@ static const char *NoVisible = N_("No visible messages"); mutt_error(_(No_mailbox_is_open)); \ break; \ } \ - else if (!Context->mailbox->msg_count) \ + else if (!Context->mailbox->msg_count) \ { \ mutt_flushinp(); \ mutt_error(_(There_are_no_messages)); \ @@ -983,12 +983,12 @@ int mutt_index_menu(void) menu->make_entry = index_make_entry; menu->color = index_color; menu->current = ci_first_message(); - menu->help = - mutt_compile_help(helpstr, sizeof(helpstr), MENU_MAIN, + menu->help = mutt_compile_help(helpstr, sizeof(helpstr), MENU_MAIN, #ifdef USE_NNTP - (Context && (Context->mailbox->magic == MUTT_NNTP)) ? IndexNewsHelp : + (Context && (Context->mailbox->magic == MUTT_NNTP)) ? + IndexNewsHelp : #endif - IndexHelp); + IndexHelp); menu->custom_menu_redraw = index_menu_redraw; mutt_menu_push_current(menu); diff --git a/editmsg.c b/editmsg.c index 2dc269ce5..e9e0fdf87 100644 --- a/editmsg.c +++ b/editmsg.c @@ -95,7 +95,8 @@ static int edit_or_view_one_message(bool edit, struct Context *ctx, struct Heade } const int chflags = - CH_NOLEN | ((ctx->mailbox->magic == MUTT_MBOX || ctx->mailbox->magic == MUTT_MMDF) ? 0 : CH_NOSTATUS); + CH_NOLEN | + ((ctx->mailbox->magic == MUTT_MBOX || ctx->mailbox->magic == MUTT_MMDF) ? 0 : CH_NOSTATUS); rc = mutt_append_message(tmpctx, ctx, cur, 0, chflags); oerrno = errno; @@ -196,7 +197,9 @@ static int edit_or_view_one_message(bool edit, struct Context *ctx, struct Heade } of = 0; - cf = (((tmpctx->mailbox->magic == MUTT_MBOX) || (tmpctx->mailbox->magic == MUTT_MMDF)) ? 0 : CH_NOSTATUS); + cf = (((tmpctx->mailbox->magic == MUTT_MBOX) || (tmpctx->mailbox->magic == MUTT_MMDF)) ? + 0 : + CH_NOSTATUS); if (fgets(buf, sizeof(buf), fp) && is_from(buf, NULL, 0, NULL)) { diff --git a/imap/imap.c b/imap/imap.c index 0b829c549..173554fec 100644 --- a/imap/imap.c +++ b/imap/imap.c @@ -186,7 +186,8 @@ static int make_msg_set(struct ImapData *idata, struct Buffer *buf, int flag, bool started = false; struct Header **hdrs = idata->ctx->hdrs; - for (n = *pos; n < idata->ctx->mailbox->msg_count && buf->dptr - buf->data < IMAP_MAX_CMDLEN; n++) + for (n = *pos; n < idata->ctx->mailbox->msg_count && buf->dptr - buf->data < IMAP_MAX_CMDLEN; + n++) { bool match = false; /* whether current message matches flag condition */ /* don't include pending expunged messages */ @@ -1202,12 +1203,13 @@ int imap_exec_msgset(struct ImapData *idata, const char *pre, const char *post, if (Sort != SORT_ORDER) { hdrs = idata->ctx->hdrs; - idata->ctx->hdrs = mutt_mem_malloc(idata->ctx->mailbox->msg_count * sizeof(struct Header *)); + idata->ctx->hdrs = + mutt_mem_malloc(idata->ctx->mailbox->msg_count * sizeof(struct Header *)); memcpy(idata->ctx->hdrs, hdrs, idata->ctx->mailbox->msg_count * sizeof(struct Header *)); Sort = SORT_ORDER; - qsort(idata->ctx->hdrs, idata->ctx->mailbox->msg_count, sizeof(struct Header *), - mutt_get_sort_func(SORT_ORDER)); + qsort(idata->ctx->hdrs, idata->ctx->mailbox->msg_count, + sizeof(struct Header *), mutt_get_sort_func(SORT_ORDER)); } pos = 0; @@ -2027,7 +2029,8 @@ static int imap_mbox_open(struct Context *ctx) imap_qualify_path(buf, sizeof(buf), &mx, idata->mailbox); mutt_str_strfcpy(ctx->mailbox->path, buf, sizeof(ctx->mailbox->path)); - mutt_str_strfcpy(ctx->mailbox->realpath, ctx->mailbox->path, sizeof(ctx->mailbox->realpath)); + mutt_str_strfcpy(ctx->mailbox->realpath, ctx->mailbox->path, + sizeof(ctx->mailbox->realpath)); idata->ctx = ctx; @@ -2494,7 +2497,8 @@ int imap_sync_mailbox(struct Context *ctx, bool expunge) memcpy(ctx->hdrs, hdrs, ctx->mailbox->msg_count * sizeof(struct Header *)); Sort = SORT_ORDER; - qsort(ctx->hdrs, ctx->mailbox->msg_count, sizeof(struct Header *), mutt_get_sort_func(SORT_ORDER)); + qsort(ctx->hdrs, ctx->mailbox->msg_count, sizeof(struct Header *), + mutt_get_sort_func(SORT_ORDER)); } rc = sync_helper(idata, MUTT_ACL_DELETE, MUTT_DELETED, "\\Deleted"); diff --git a/mailbox.c b/mailbox.c index 951516d18..3d52f2d57 100644 --- a/mailbox.c +++ b/mailbox.c @@ -1056,4 +1056,3 @@ void mutt_context_free(struct Context **ctx) mailbox_free(&(*ctx)->mailbox); FREE(ctx); } - diff --git a/maildir/mh.c b/maildir/mh.c index e179a8628..bd8f200fd 100644 --- a/maildir/mh.c +++ b/maildir/mh.c @@ -1754,8 +1754,9 @@ static int maildir_msg_open_new(struct Context *ctx, struct Message *msg, struct omask = umask(mh_umask(ctx)); while (true) { - snprintf(path, sizeof(path), "%s/tmp/%s.%lld.R%" PRIu64 ".%s%s", ctx->mailbox->path, subdir, - (long long) time(NULL), mutt_rand64(), NONULL(ShortHostname), suffix); + snprintf(path, sizeof(path), "%s/tmp/%s.%lld.R%" PRIu64 ".%s%s", + ctx->mailbox->path, subdir, (long long) time(NULL), mutt_rand64(), + NONULL(ShortHostname), suffix); mutt_debug(2, "Trying %s.\n", path); @@ -2635,7 +2636,8 @@ static int mh_mbox_sync(struct Context *ctx, int *index_hint) if (!ctx->quiet) { snprintf(msgbuf, sizeof(msgbuf), _("Writing %s..."), ctx->mailbox->path); - mutt_progress_init(&progress, msgbuf, MUTT_PROGRESS_MSG, WriteInc, ctx->mailbox->msg_count); + mutt_progress_init(&progress, msgbuf, MUTT_PROGRESS_MSG, WriteInc, + ctx->mailbox->msg_count); } for (i = 0; i < ctx->mailbox->msg_count; i++) diff --git a/mbox/mbox.c b/mbox/mbox.c index 5b9f09e46..44b9a0c01 100644 --- a/mbox/mbox.c +++ b/mbox/mbox.c @@ -707,7 +707,8 @@ static int reopen_mailbox(struct Context *ctx, int *index_hint) if (!ctx->fp) rc = -1; else - rc = ((ctx->mailbox->magic == MUTT_MBOX) ? mbox_parse_mailbox : mmdf_parse_mailbox)(ctx); + rc = ((ctx->mailbox->magic == MUTT_MBOX) ? mbox_parse_mailbox : + mmdf_parse_mailbox)(ctx); break; default: @@ -1092,7 +1093,8 @@ static int mbox_mbox_sync(struct Context *ctx, int *index_hint) if (!ctx->quiet) { snprintf(msgbuf, sizeof(msgbuf), _("Writing %s..."), ctx->mailbox->path); - mutt_progress_init(&progress, msgbuf, MUTT_PROGRESS_MSG, WriteInc, ctx->mailbox->msg_count); + mutt_progress_init(&progress, msgbuf, MUTT_PROGRESS_MSG, WriteInc, + ctx->mailbox->msg_count); } for (i = first, j = 0; i < ctx->mailbox->msg_count; i++) diff --git a/mutt_thread.c b/mutt_thread.c index 841c15eb2..103ce0660 100644 --- a/mutt_thread.c +++ b/mutt_thread.c @@ -118,7 +118,8 @@ bool need_display_subject(struct Context *ctx, struct Header *hdr) static void linearize_tree(struct Context *ctx) { struct MuttThread *tree = ctx->tree; - struct Header **array = ctx->hdrs + ((Sort & SORT_REVERSE) ? ctx->mailbox->msg_count - 1 : 0); + struct Header **array = + ctx->hdrs + ((Sort & SORT_REVERSE) ? ctx->mailbox->msg_count - 1 : 0); while (tree) { diff --git a/mx.c b/mx.c index 5cad114c2..eaf1b2db3 100644 --- a/mx.c +++ b/mx.c @@ -257,7 +257,8 @@ struct Context *mx_mbox_open(const char *path, int flags) mutt_str_strfcpy(ctx->mailbox->path, path, sizeof(ctx->mailbox->path)); if (!realpath(ctx->mailbox->path, ctx->mailbox->realpath)) - mutt_str_strfcpy(ctx->mailbox->realpath, ctx->mailbox->path, sizeof(ctx->mailbox->realpath)); + mutt_str_strfcpy(ctx->mailbox->realpath, ctx->mailbox->path, + sizeof(ctx->mailbox->realpath)); ctx->msgnotreadyet = -1; ctx->collapsed = false; @@ -286,7 +287,8 @@ struct Context *mx_mbox_open(const char *path, int flags) ctx->mailbox->magic = mx_path_probe(path, NULL); ctx->mx_ops = mx_get_ops(ctx->mailbox->magic); - if ((ctx->mailbox->magic == MUTT_UNKNOWN) || (ctx->mailbox->magic == MUTT_MAILBOX_ERROR) || !ctx->mx_ops) + if ((ctx->mailbox->magic == MUTT_UNKNOWN) || + (ctx->mailbox->magic == MUTT_MAILBOX_ERROR) || !ctx->mx_ops) { if (ctx->mailbox->magic == MUTT_MAILBOX_ERROR) mutt_perror(path); @@ -347,7 +349,8 @@ void mx_fastclose_mailbox(struct Context *ctx) return; /* fix up the times so mailbox won't get confused */ - if (ctx->peekonly && ctx->mailbox->path && (mutt_timespec_compare(&ctx->mtime, &ctx->atime) > 0)) + if (ctx->peekonly && ctx->mailbox->path && + (mutt_timespec_compare(&ctx->mtime, &ctx->atime) > 0)) { #ifdef HAVE_UTIMENSAT struct timespec ts[2]; @@ -751,10 +754,12 @@ int mx_mbox_close(struct Context **pctx, int *index_hint) ctx->mailbox->msg_count - ctx->deleted, read_msgs, ctx->deleted); } else - mutt_message(_("%d kept, %d deleted"), ctx->mailbox->msg_count - ctx->deleted, ctx->deleted); + mutt_message(_("%d kept, %d deleted"), + ctx->mailbox->msg_count - ctx->deleted, ctx->deleted); } - if (ctx->mailbox->msg_count == ctx->deleted && (ctx->mailbox->magic == MUTT_MMDF || ctx->mailbox->magic == MUTT_MBOX) && + if (ctx->mailbox->msg_count == ctx->deleted && + (ctx->mailbox->magic == MUTT_MMDF || ctx->mailbox->magic == MUTT_MBOX) && !mutt_is_spool(ctx->mailbox->path) && !SaveEmpty) { mutt_file_unlink_empty(ctx->mailbox->path); @@ -806,7 +811,8 @@ void mx_update_tables(struct Context *ctx, bool committing) for (i = 0, j = 0; i < ctx->mailbox->msg_count; i++) { if (!ctx->hdrs[i]->quasi_deleted && - ((committing && (!ctx->hdrs[i]->deleted || (ctx->mailbox->magic == MUTT_MAILDIR && MaildirTrash))) || + ((committing && (!ctx->hdrs[i]->deleted || + (ctx->mailbox->magic == MUTT_MAILDIR && MaildirTrash))) || (!committing && ctx->hdrs[i]->active))) { if (i != j) @@ -973,7 +979,8 @@ int mx_mbox_sync(struct Context *ctx, int *index_hint) mutt_sleep(0); - if (ctx->mailbox->msg_count == ctx->deleted && (ctx->mailbox->magic == MUTT_MBOX || ctx->mailbox->magic == MUTT_MMDF) && + if (ctx->mailbox->msg_count == ctx->deleted && + (ctx->mailbox->magic == MUTT_MBOX || ctx->mailbox->magic == MUTT_MMDF) && !mutt_is_spool(ctx->mailbox->path) && !SaveEmpty) { unlink(ctx->mailbox->path); @@ -1040,7 +1047,8 @@ struct Message *mx_msg_open_new(struct Context *ctx, struct Header *hdr, int fla if (ctx->mailbox->magic == MUTT_MMDF) fputs(MMDF_SEP, msg->fp); - if ((ctx->mailbox->magic == MUTT_MBOX || ctx->mailbox->magic == MUTT_MMDF) && flags & MUTT_ADD_FROM) + if ((ctx->mailbox->magic == MUTT_MBOX || ctx->mailbox->magic == MUTT_MMDF) && + flags & MUTT_ADD_FROM) { if (hdr) { @@ -1094,7 +1102,8 @@ struct Message *mx_msg_open(struct Context *ctx, int msgno) if (!ctx->mx_ops || !ctx->mx_ops->msg_open) { - mutt_debug(1, "function not implemented for mailbox type %d.\n", ctx->mailbox->magic); + mutt_debug(1, "function not implemented for mailbox type %d.\n", + ctx->mailbox->magic); return NULL; } @@ -1196,7 +1205,8 @@ void mx_alloc_memory(struct Context *ctx) void mx_update_context(struct Context *ctx, int new_messages) { struct Header *h = NULL; - for (int msgno = ctx->mailbox->msg_count - new_messages; msgno < ctx->mailbox->msg_count; msgno++) + for (int msgno = ctx->mailbox->msg_count - new_messages; + msgno < ctx->mailbox->msg_count; msgno++) { h = ctx->hdrs[msgno]; diff --git a/notmuch/mutt_notmuch.c b/notmuch/mutt_notmuch.c index 5700fcce8..fb4d452e1 100644 --- a/notmuch/mutt_notmuch.c +++ b/notmuch/mutt_notmuch.c @@ -1076,7 +1076,8 @@ static void progress_update(struct Context *ctx, notmuch_query_t *q) if (data->progress_ready) { mutt_progress_update(&data->progress, - ctx->mailbox->msg_count + data->ignmsgcount - data->oldmsgcount, -1); + ctx->mailbox->msg_count + data->ignmsgcount - data->oldmsgcount, + -1); } } @@ -1150,8 +1151,8 @@ static void append_message(struct Context *ctx, notmuch_query_t *q, if (!path) return; - mutt_debug(2, "nm: appending message, i=%d, id=%s, path=%s\n", ctx->mailbox->msg_count, - notmuch_message_get_message_id(msg), path); + mutt_debug(2, "nm: appending message, i=%d, id=%s, path=%s\n", + ctx->mailbox->msg_count, notmuch_message_get_message_id(msg), path); if (ctx->mailbox->msg_count >= ctx->hdrmax) { @@ -1334,7 +1335,8 @@ static bool read_threads_query(struct Context *ctx, notmuch_query_t *q, bool ded threads = notmuch_query_search_threads(q); #endif - for (; notmuch_threads_valid(threads) && ((limit == 0) || (ctx->mailbox->msg_count < limit)); + for (; notmuch_threads_valid(threads) && + ((limit == 0) || (ctx->mailbox->msg_count < limit)); notmuch_threads_move_to_next(threads)) { if (SigInt == 1) @@ -1849,7 +1851,8 @@ int nm_read_entire_thread(struct Context *ctx, struct Header *h) if (!(db = get_db(data, false)) || !(msg = get_nm_message(db, h))) goto done; - mutt_debug(1, "nm: reading entire-thread messages...[current count=%d]\n", ctx->mailbox->msg_count); + mutt_debug(1, "nm: reading entire-thread messages...[current count=%d]\n", + ctx->mailbox->msg_count); progress_reset(ctx); id = notmuch_message_get_thread_id(msg); @@ -2483,7 +2486,8 @@ static int nm_mbox_open(struct Context *ctx) mx_update_context(ctx, ctx->mailbox->msg_count); data->oldmsgcount = 0; - mutt_debug(1, "nm: reading messages... done [rc=%d, count=%d]\n", rc, ctx->mailbox->msg_count); + mutt_debug(1, "nm: reading messages... done [rc=%d, count=%d]\n", rc, + ctx->mailbox->msg_count); return rc; } @@ -2634,8 +2638,9 @@ done: ctx->mailbox->msg_count, new_flags, occult); return occult ? MUTT_REOPENED : - (ctx->mailbox->msg_count > data->oldmsgcount) ? MUTT_NEW_MAIL : - new_flags ? MUTT_FLAGS : 0; + (ctx->mailbox->msg_count > data->oldmsgcount) ? + MUTT_NEW_MAIL : + new_flags ? MUTT_FLAGS : 0; } /** @@ -2659,7 +2664,8 @@ static int nm_mbox_sync(struct Context *ctx, int *index_hint) /* all is in this function so we don't use data->progress here */ char msgbuf[PATH_MAX + 64]; snprintf(msgbuf, sizeof(msgbuf), _("Writing %s..."), ctx->mailbox->path); - mutt_progress_init(&progress, msgbuf, MUTT_PROGRESS_MSG, WriteInc, ctx->mailbox->msg_count); + mutt_progress_init(&progress, msgbuf, MUTT_PROGRESS_MSG, WriteInc, + ctx->mailbox->msg_count); } for (int i = 0; i < ctx->mailbox->msg_count; i++) diff --git a/pager.c b/pager.c index 13d3c67cb..fc042c25a 100644 --- a/pager.c +++ b/pager.c @@ -2272,9 +2272,10 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e mutt_str_strfcpy(tmphelp, helpstr, sizeof(tmphelp)); mutt_compile_help(buffer, sizeof(buffer), MENU_PAGER, #ifdef USE_NNTP - (Context && (Context->mailbox->magic == MUTT_NNTP)) ? PagerNewsHelpExtra : + (Context && (Context->mailbox->magic == MUTT_NNTP)) ? + PagerNewsHelpExtra : #endif - PagerHelpExtra); + PagerHelpExtra); snprintf(helpstr, sizeof(helpstr), "%s %s", tmphelp, buffer); } if (!InHelp) @@ -2373,7 +2374,8 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e { /* After the mailbox has been updated, * rd.index->current might be invalid */ - rd.index->current = MIN(rd.index->current, (Context->mailbox->msg_count - 1)); + rd.index->current = + MIN(rd.index->current, (Context->mailbox->msg_count - 1)); index_hint = Context->hdrs[Context->v2r[rd.index->current]]->index; bool q = Context->quiet; diff --git a/pop/pop.c b/pop/pop.c index 28cc564b6..34a3cea6b 100644 --- a/pop/pop.c +++ b/pop/pop.c @@ -502,7 +502,8 @@ static int pop_mbox_open(struct Context *ctx) return -1; mutt_str_strfcpy(ctx->mailbox->path, buf, sizeof(ctx->mailbox->path)); - mutt_str_strfcpy(ctx->mailbox->realpath, ctx->mailbox->path, sizeof(ctx->mailbox->realpath)); + mutt_str_strfcpy(ctx->mailbox->realpath, ctx->mailbox->path, + sizeof(ctx->mailbox->realpath)); pop_data = mutt_mem_calloc(1, sizeof(struct PopData)); pop_data->conn = conn; diff --git a/recvattach.c b/recvattach.c index 283b42d1f..00c336951 100644 --- a/recvattach.c +++ b/recvattach.c @@ -1123,8 +1123,8 @@ int mutt_attach_display_loop(struct Menu *menu, int op, struct Header *hdr, * @param decrypted True if attachment has been decrypted */ static void mutt_generate_recvattach_list(struct AttachCtx *actx, struct Header *hdr, - struct Body *m, FILE *fp, - int parent_type, int level, bool decrypted) + struct Body *m, FILE *fp, int parent_type, + int level, bool decrypted) { struct AttachPtr *new = NULL; struct Body *new_body = NULL; diff --git a/send.c b/send.c index 024ddf90e..6da63eaa0 100644 --- a/send.c +++ b/send.c @@ -1727,7 +1727,8 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile, mutt_fix_reply_recipients(msg->env); #ifdef USE_NNTP - if ((flags & SEND_NEWS) && ctx && ctx->mailbox->magic == MUTT_NNTP && !msg->env->newsgroups) + if ((flags & SEND_NEWS) && ctx && ctx->mailbox->magic == MUTT_NNTP && + !msg->env->newsgroups) msg->env->newsgroups = mutt_str_strdup(((struct NntpData *) ctx->data)->group); #endif diff --git a/sidebar.c b/sidebar.c index 2e7120c94..5ef4ae839 100644 --- a/sidebar.c +++ b/sidebar.c @@ -1161,7 +1161,8 @@ void mutt_sb_notify_mailbox(struct Mailbox *b, bool created) TopIndex = EntryCount; if (BotIndex < 0) BotIndex = EntryCount; - if ((OpnIndex < 0) && Context && (mutt_str_strcmp(b->realpath, Context->mailbox->realpath) == 0)) + if ((OpnIndex < 0) && Context && + (mutt_str_strcmp(b->realpath, Context->mailbox->realpath) == 0)) OpnIndex = EntryCount; EntryCount++; diff --git a/status.c b/status.c index 03605912f..99cb65eda 100644 --- a/status.c +++ b/status.c @@ -125,7 +125,8 @@ static const char *status_format_str(char *buf, size_t buflen, size_t col, int c { #ifdef USE_NOTMUCH char *p = NULL; - if (Context && Context->mailbox->magic == MUTT_NOTMUCH && (p = nm_get_description(Context))) + if (Context && Context->mailbox->magic == MUTT_NOTMUCH && + (p = nm_get_description(Context))) mutt_str_strfcpy(tmp, p, sizeof(tmp)); else #endif @@ -220,7 +221,8 @@ static const char *status_format_str(char *buf, size_t buflen, size_t col, int c if (!optional) { snprintf(fmt, sizeof(fmt), "%%%sd", prec); - snprintf(buf, buflen, fmt, Context ? Context->mailbox->msg_unread - Context->new : 0); + snprintf(buf, buflen, fmt, + Context ? Context->mailbox->msg_unread - Context->new : 0); } else if (!Context || !(Context->mailbox->msg_unread - Context->new)) optional = 0; @@ -264,14 +266,15 @@ static const char *status_format_str(char *buf, size_t buflen, size_t col, int c if (Context) { - i = OptAttachMsg ? 3 : - ((Context->readonly || Context->dontwrite) ? - 2 : - (Context->changed || - /* deleted doesn't necessarily mean changed in IMAP */ - (Context->mailbox->magic != MUTT_IMAP && Context->deleted)) ? - 1 : - 0); + i = OptAttachMsg ? + 3 : + ((Context->readonly || Context->dontwrite) ? + 2 : + (Context->changed || + /* deleted doesn't necessarily mean changed in IMAP */ + (Context->mailbox->magic != MUTT_IMAP && Context->deleted)) ? + 1 : + 0); } if (!StatusChars || !StatusChars->len)