From: Richard Russon Date: Fri, 3 Aug 2018 14:51:43 +0000 (+0100) Subject: rename buffy X-Git-Tag: 2019-10-25~713^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1180acb984581aac66ae6f69e18f0dcb70670e9a;p=neomutt rename buffy --- diff --git a/ChangeLog.md b/ChangeLog.md index 0fcf0c090..e9305b3ce 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -346,7 +346,7 @@ - Updated French translation - Fix imap sync segfault due to inactive headers during an expunge - Close the imap socket for the selected mailbox on error - - Add missing IMAP_CMD_POLL flag in imap buffy check + - Add missing IMAP_CMD_POLL flag in imap mailbox check - Change maildir and mh check_mailbox to use dynamic sized hash - Fix uses of context->changed as a counter - Make cmd_parse_fetch() more precise about setting reopen/check flags @@ -485,7 +485,7 @@ * Tidy - drop VirtIncoming - split mutt_parse_mailboxes into mutt_parse_unmailboxes - - tidy some buffy code + - tidy some mailbox code - tidy the version strings * Upstream - Add ~<() and ~>() immediate parent/children patterns @@ -970,7 +970,7 @@ - Add option for missing subject replacement - notmuch: Allow to toggle labels - Support for aborting mailbox loading - - Do a buffy check after shell escape + - Do a mailbox check after shell escape - Support of relative paths sourcing and cyclic source detection - Support of multiple config files as CLI arguments - Extend the ~m pattern to allow relative ranges @@ -1375,14 +1375,14 @@ - Add sidebar_format flag '%n' to display 'N' on new mail. - fix index_format truncation problem - Fix compiler warnings due to always true condition - - Change sidebar next/prev-new to look at buffy->new too. + - Change sidebar next/prev-new to look at mailbox->new too. - Change the default for sidebar_format to use %n. - - sidebar "unsorted" order to match Buffy list order. + - sidebar "unsorted" order to match Mailbox list order. - Include ncurses tinfo library if found. - Sidebar width problem - sidebar crash for non-existent mailbox - Temporary compatibility workaround - - Reset buffy->new for the current mailbox in IMAP. + - Reset mailbox->new for the current mailbox in IMAP. - version.sh regression - crash when notmuch tries to read a message - status line wrapping @@ -1413,7 +1413,7 @@ - Single quote at line beginning misinterpreted by groff - Setting $sidebar_width to more than 128 would cause bad things to happen. - Fix alignment in the compose menu. - - Fix sidebar buffy stats updating on mailbox close. + - Fix sidebar mailbox stats updating on mailbox close. * Build Changes - Sync whitespace to mutt/default - Alter ChangeLog date format to simplify Makefiles diff --git a/browser.c b/browser.c index f3ec64e7f..ca936f486 100644 --- a/browser.c +++ b/browser.c @@ -217,9 +217,9 @@ static int browser_compare_count(const void *a, const void *b) struct FolderFile *pb = (struct FolderFile *) b; int r = 0; - if (pa->has_buffy && pb->has_buffy) + if (pa->has_mailbox && pb->has_mailbox) r = pa->msg_count - pb->msg_count; - else if (pa->has_buffy) + else if (pa->has_mailbox) r = -1; else r = 1; @@ -241,9 +241,9 @@ static int browser_compare_count_new(const void *a, const void *b) struct FolderFile *pb = (struct FolderFile *) b; int r = 0; - if (pa->has_buffy && pb->has_buffy) + if (pa->has_mailbox && pb->has_mailbox) r = pa->msg_unread - pb->msg_unread; - else if (pa->has_buffy) + else if (pa->has_mailbox) r = -1; else r = 1; @@ -516,7 +516,7 @@ static const char *folder_format_str(char *buf, size_t buflen, size_t col, int c case 'm': if (!optional) { - if (folder->ff->has_buffy) + if (folder->ff->has_mailbox) { snprintf(fmt, sizeof(fmt), "%%%sd", prec); snprintf(buf, buflen, fmt, folder->ff->msg_count); @@ -536,7 +536,7 @@ static const char *folder_format_str(char *buf, size_t buflen, size_t col, int c case 'n': if (!optional) { - if (folder->ff->has_buffy) + if (folder->ff->has_mailbox) { snprintf(fmt, sizeof(fmt), "%%%sd", prec); snprintf(buf, buflen, fmt, folder->ff->msg_unread); @@ -756,7 +756,7 @@ static void add_folder(struct Menu *m, struct BrowserState *state, if (b) { - (state->entry)[state->entrylen].has_buffy = true; + (state->entry)[state->entrylen].has_mailbox = true; (state->entry)[state->entrylen].new = b->new; (state->entry)[state->entrylen].msg_count = b->msg_count; (state->entry)[state->entrylen].msg_unread = b->msg_unread; @@ -856,7 +856,7 @@ static int examine_directory(struct Menu *menu, struct BrowserState *state, return -1; } - mutt_buffy_check(0); + mutt_mailbox_check(0); dp = opendir(d); if (!dp) @@ -926,7 +926,7 @@ static int examine_vfolders(struct Menu *menu, struct BrowserState *state) if (STAILQ_EMPTY(&AllMailboxes)) return -1; - mutt_buffy_check(0); + mutt_mailbox_check(0); init_state(state, menu); @@ -981,7 +981,7 @@ static int examine_mailboxes(struct Menu *menu, struct BrowserState *state) if (STAILQ_EMPTY(&AllMailboxes)) return -1; - mutt_buffy_check(0); + mutt_mailbox_check(0); struct MailboxNode *np = NULL; STAILQ_FOREACH(np, &AllMailboxes, entries) @@ -1161,10 +1161,10 @@ static void browser_highlight_default(struct BrowserState *state, struct Menu *m * @param menu Current menu * @param title Buffer for the title * @param titlelen Length of buffer - * @param buffy If true, select mailboxes + * @param mailbox If true, select mailboxes */ static void init_menu(struct BrowserState *state, struct Menu *menu, - char *title, size_t titlelen, bool buffy) + char *title, size_t titlelen, bool mailbox) { menu->max = state->entrylen; @@ -1180,7 +1180,7 @@ static void init_menu(struct BrowserState *state, struct Menu *menu, #ifdef USE_NNTP if (OptNews) { - if (buffy) + if (mailbox) snprintf(title, titlelen, _("Subscribed newsgroups")); else { @@ -1191,10 +1191,10 @@ static void init_menu(struct BrowserState *state, struct Menu *menu, else #endif { - if (buffy) + if (mailbox) { menu->is_mailbox_list = 1; - snprintf(title, titlelen, _("Mailboxes [%d]"), mutt_buffy_check(0)); + snprintf(title, titlelen, _("Mailboxes [%d]"), mutt_mailbox_check(0)); } else { @@ -2107,7 +2107,7 @@ void mutt_select_file(char *file, size_t filelen, int flags, char ***files, int break; case OP_MAILBOX_LIST: - mutt_buffy_list(); + mutt_mailbox_list(); break; case OP_BROWSER_NEW_FILE: diff --git a/browser.h b/browser.h index 059685a54..6e0ddaf79 100644 --- a/browser.h +++ b/browser.h @@ -68,7 +68,7 @@ struct FolderFile bool selectable : 1; bool inferiors : 1; #endif - bool has_buffy : 1; + bool has_mailbox : 1; bool local : 1; /**< folder is on local filesystem */ bool tagged : 1; #ifdef USE_NNTP diff --git a/commands.c b/commands.c index 5b4fb2317..281f8a3b2 100644 --- a/commands.c +++ b/commands.c @@ -713,7 +713,7 @@ void mutt_shell_escape(void) if ((rc != 0) || WaitKey) mutt_any_key_to_continue(NULL); - mutt_buffy_check(MUTT_MAILBOX_CHECK_FORCE); + mutt_mailbox_check(MUTT_MAILBOX_CHECK_FORCE); } /** @@ -1056,12 +1056,12 @@ int mutt_save_message(struct Header *h, bool delete, bool decode, bool decrypt) } } - const int need_buffy_cleanup = (ctx.magic == MUTT_MBOX || ctx.magic == MUTT_MMDF); + const int need_mailbox_cleanup = (ctx.magic == MUTT_MBOX || ctx.magic == MUTT_MMDF); mx_mbox_close(&ctx, NULL); - if (need_buffy_cleanup) - mutt_buffy_cleanup(buf, &st); + if (need_mailbox_cleanup) + mutt_mailbox_cleanup(buf, &st); mutt_clear_error(); return 0; @@ -1235,5 +1235,5 @@ bool mutt_check_traditional_pgp(struct Header *h, int *redraw) */ void mutt_check_stats(void) { - mutt_buffy_check(MUTT_MAILBOX_CHECK_FORCE | MUTT_MAILBOX_CHECK_FORCE_STATS); + mutt_mailbox_check(MUTT_MAILBOX_CHECK_FORCE | MUTT_MAILBOX_CHECK_FORCE_STATS); } diff --git a/context.h b/context.h index 1c90f8568..5a77eb7d5 100644 --- a/context.h +++ b/context.h @@ -54,7 +54,7 @@ enum AclRights struct Context { char *path; - char *realpath; /**< used for buffy comparison and the sidebar */ + char *realpath; /**< used for mailbox comparison and the sidebar */ FILE *fp; time_t atime; time_t mtime; diff --git a/curs_lib.c b/curs_lib.c index 9d026b99c..1c03b3473 100644 --- a/curs_lib.c +++ b/curs_lib.c @@ -547,7 +547,7 @@ int mutt_do_pager(const char *banner, const char *tempfile, int do_color, struct * @param[in] prompt Prompt * @param[in] buf Buffer for the result * @param[in] buflen Length of the buffer - * @param[in] buffy If true, select mailboxes + * @param[in] mailbox If true, select mailboxes * @param[in] multiple Allow multiple selections * @param[out] files List of files selected * @param[out] numfiles Number of files selected @@ -555,7 +555,7 @@ int mutt_do_pager(const char *banner, const char *tempfile, int do_color, struct * @retval 0 Success * @retval -1 Error */ -int mutt_enter_fname_full(const char *prompt, char *buf, size_t buflen, bool buffy, +int mutt_enter_fname_full(const char *prompt, char *buf, size_t buflen, bool mailbox, bool multiple, char ***files, int *numfiles, int flags) { struct Event ch; @@ -584,7 +584,7 @@ int mutt_enter_fname_full(const char *prompt, char *buf, size_t buflen, bool buf flags = MUTT_SEL_FOLDER; if (multiple) flags |= MUTT_SEL_MULTI; - if (buffy) + if (mailbox) flags |= MUTT_SEL_MAILBOX; mutt_select_file(buf, buflen, flags, files, numfiles); } @@ -594,7 +594,7 @@ int mutt_enter_fname_full(const char *prompt, char *buf, size_t buflen, bool buf sprintf(pc, "%s: ", prompt); mutt_unget_event(ch.op ? 0 : ch.ch, ch.op ? ch.op : 0); - if (mutt_get_field_full(pc, buf, buflen, (buffy ? MUTT_EFILE : MUTT_FILE) | MUTT_CLEAR, + if (mutt_get_field_full(pc, buf, buflen, (mailbox ? MUTT_EFILE : MUTT_FILE) | MUTT_CLEAR, multiple, files, numfiles) != 0) { buf[0] = '\0'; diff --git a/curs_lib.h b/curs_lib.h index 0c0a16b45..e60e7f10b 100644 --- a/curs_lib.h +++ b/curs_lib.h @@ -47,7 +47,7 @@ int mutt_any_key_to_continue(const char *s); int mutt_do_pager(const char *banner, const char *tempfile, int do_color, struct Pager *info); void mutt_edit_file(const char *editor, const char *file); void mutt_endwin(void); -int mutt_enter_fname_full(const char *prompt, char *buf, size_t blen, bool buffy, bool multiple, char ***files, int *numfiles, int flags); +int mutt_enter_fname_full(const char *prompt, char *buf, size_t blen, bool mailbox, bool multiple, char ***files, int *numfiles, int flags); void mutt_flushinp(void); void mutt_flush_macro_to_endcond(void); void mutt_flush_unget_to_endcond(void); diff --git a/curs_main.c b/curs_main.c index a50bb14dc..6595c87f5 100644 --- a/curs_main.c +++ b/curs_main.c @@ -561,11 +561,11 @@ static int main_change_folder(struct Menu *menu, int op, char *buf, collapse_all(menu, 0); #ifdef USE_SIDEBAR - mutt_sb_set_open_buffy(); + mutt_sb_set_open_mailbox(); #endif mutt_clear_error(); - mutt_buffy_check(MUTT_MAILBOX_CHECK_FORCE); /* force the buffy check after we have changed the folder */ + mutt_mailbox_check(MUTT_MAILBOX_CHECK_FORCE); /* force the mailbox check after we have changed the folder */ menu->redraw = REDRAW_FULL; OptSearchInvalid = true; @@ -847,7 +847,7 @@ static void index_menu_redraw(struct Menu *menu) #ifdef USE_SIDEBAR if (menu->redraw & REDRAW_SIDEBAR) { - mutt_sb_set_buffystats(Context); + mutt_sb_set_mailbox_stats(Context); menu_redraw_sidebar(menu); } #endif @@ -908,7 +908,7 @@ int mutt_index_menu(void) int rc = -1; char *cp = NULL; /* temporary variable. */ int index_hint; /* used to restore cursor position */ - bool do_buffy_notify = true; + bool do_mailbox_notify = true; int close = 0; /* did we OP_QUIT or OP_EXIT out of this menu? */ int attach_msg = OptAttachMsg; @@ -927,8 +927,8 @@ int mutt_index_menu(void) if (!attach_msg) { - /* force the buffy check after we enter the folder */ - mutt_buffy_check(MUTT_MAILBOX_CHECK_FORCE); + /* force the mailbox check after we enter the folder */ + mutt_mailbox_check(MUTT_MAILBOX_CHECK_FORCE); } if (((Sort & SORT_MASK) == SORT_THREADS) && CollapseAll) @@ -1021,8 +1021,8 @@ int mutt_index_menu(void) else if (check == MUTT_FLAGS) mutt_message(_("Mailbox was externally modified.")); - /* avoid the message being overwritten by buffy */ - do_buffy_notify = false; + /* avoid the message being overwritten by mailbox */ + do_mailbox_notify = false; bool q = Context->quiet; Context->quiet = true; @@ -1040,12 +1040,12 @@ int mutt_index_menu(void) { /* check for new mail in the incoming folders */ oldcount = newcount; - newcount = mutt_buffy_check(0); + newcount = mutt_mailbox_check(0); if (newcount != oldcount) menu->redraw |= REDRAW_STATUS; - if (do_buffy_notify) + if (do_mailbox_notify) { - if (mutt_buffy_notify()) + if (mutt_mailbox_notify()) { menu->redraw |= REDRAW_STATUS; if (BeepNew) @@ -1060,7 +1060,7 @@ int mutt_index_menu(void) } } else - do_buffy_notify = true; + do_mailbox_notify = true; } if (op >= 0) @@ -2073,7 +2073,7 @@ int mutt_index_menu(void) { mutt_str_strfcpy(buf, Context->path, sizeof(buf)); mutt_pretty_mailbox(buf, sizeof(buf)); - mutt_buffy(buf, sizeof(buf)); + mutt_mailbox(buf, sizeof(buf)); if (!buf[0]) { mutt_error(_("No mailboxes have new mail")); @@ -2098,7 +2098,7 @@ int mutt_index_menu(void) if (Context && (Context->magic == MUTT_NOTMUCH)) { mutt_str_strfcpy(buf, Context->path, sizeof(buf)); - mutt_buffy_vfolder(buf, sizeof(buf)); + mutt_mailbox_vfolder(buf, sizeof(buf)); } mutt_enter_vfolder(cp, buf, sizeof(buf), 1); if (!buf[0]) @@ -2126,13 +2126,13 @@ int mutt_index_menu(void) cp = _("Open newsgroup in read-only mode"); else cp = _("Open newsgroup"); - nntp_buffy(buf, sizeof(buf)); + nntp_mailbox(buf, sizeof(buf)); } else #endif /* By default, fill buf with the next mailbox that contains unread * mail */ - mutt_buffy(buf, sizeof(buf)); + mutt_mailbox(buf, sizeof(buf)); if (mutt_enter_fname(cp, buf, sizeof(buf), 1) == -1) { @@ -2157,14 +2157,14 @@ int mutt_index_menu(void) main_change_folder(menu, op, buf, sizeof(buf), &oldcount, &index_hint); #ifdef USE_NNTP - /* mutt_buffy_check() must be done with mail-reader mode! */ + /* mutt_mailbox_check() must be done with mail-reader mode! */ menu->help = mutt_compile_help( helpstr, sizeof(helpstr), MENU_MAIN, (Context && (Context->magic == MUTT_NNTP)) ? IndexNewsHelp : IndexHelp); #endif mutt_expand_path(buf, sizeof(buf)); #ifdef USE_SIDEBAR - mutt_sb_set_open_buffy(); + mutt_sb_set_open_mailbox(); #endif break; @@ -3357,7 +3357,7 @@ int mutt_index_menu(void) break; case OP_MAILBOX_LIST: - mutt_buffy_list(); + mutt_mailbox_list(); break; case OP_VIEW_ATTACHMENTS: diff --git a/doc/manual.xml.head b/doc/manual.xml.head index 6a262bd89..62a83a37d 100644 --- a/doc/manual.xml.head +++ b/doc/manual.xml.head @@ -8801,7 +8801,7 @@ subjectrx '\[[^]]*\]:? *' '%L%R' For the pager, index and directory browser menus, NeoMutt contains - the <buffy-list> function (bound to + the <mailbox-list> function (bound to . by default) which will print a list of folders with new mail in the command line at the bottom of the screen. @@ -15829,7 +15829,7 @@ set sidebar_on_right = no # The character to use as the divider between the Sidebar and the other NeoMutt # panels. set sidebar_divider_char = '|' -# Enable extended buffy mode to calculate total, new, and flagged +# Enable extended mailbox mode to calculate total, new, and flagged # message counts for each mailbox. set mail_check_stats # Display the Sidebar mailboxes using this format string. diff --git a/doc/neomutt.pwl b/doc/neomutt.pwl index 29fd99c8d..15f386544 100644 --- a/doc/neomutt.pwl +++ b/doc/neomutt.pwl @@ -404,7 +404,6 @@ Fi fI Cx dt -buffy manny applica autoview diff --git a/enter.c b/enter.c index 775fe8809..065b02f91 100644 --- a/enter.c +++ b/enter.c @@ -489,7 +489,7 @@ int mutt_enter_string_full(char *buf, size_t buflen, int col, int flags, int mul { first = 1; /* clear input if user types a real key later */ mutt_mb_wcstombs(buf, buflen, state->wbuf, state->curpos); - mutt_buffy(buf, buflen); + mutt_mailbox(buf, buflen); state->curpos = state->lastchar = mutt_mb_mbstowcs(&state->wbuf, &state->wbuflen, 0, buf); break; diff --git a/functions.h b/functions.h index 37201554b..78e4eb52e 100644 --- a/functions.h +++ b/functions.h @@ -95,7 +95,6 @@ const struct Binding OpGeneric[] = { /* map: generic */ const struct Binding OpMain[] = { /* map: index */ { "bounce-message", OP_BOUNCE_MESSAGE, "b" }, { "break-thread", OP_MAIN_BREAK_THREAD, "#" }, - { "buffy-list", OP_MAILBOX_LIST, "." }, #ifdef USE_NNTP { "catchup", OP_CATCHUP, NULL }, #endif @@ -162,6 +161,7 @@ const struct Binding OpMain[] = { /* map: index */ { "list-reply", OP_LIST_REPLY, "L" }, { "mail", OP_MAIL, "m" }, { "mail-key", OP_MAIL_KEY, "\033k" }, + { "mailbox-list", OP_MAILBOX_LIST, "." }, { "mark-message", OP_MARK_MSG, "~" }, { "modify-labels", OP_MAIN_MODIFY_TAGS, NULL }, // NOTE(sileht): kept for backward compatibility { "modify-labels-then-hide", OP_MAIN_MODIFY_TAGS_THEN_HIDE, NULL }, // NOTE(sileht): kept for backward compatibility @@ -237,6 +237,8 @@ const struct Binding OpMain[] = { /* map: index */ #endif { "view-attachments", OP_VIEW_ATTACHMENTS, "v" }, { "view-raw-message", OP_VIEW_RAW_MESSAGE, NULL }, + /* This is deprecated. Leave it last so it doesn't show up in the help. */ + { "buffy-list", OP_MAILBOX_LIST, NULL }, { NULL, 0, NULL }, }; @@ -244,7 +246,6 @@ const struct Binding OpPager[] = { /* map: pager */ { "bottom", OP_PAGER_BOTTOM, NULL }, { "bounce-message", OP_BOUNCE_MESSAGE, "b" }, { "break-thread", OP_MAIN_BREAK_THREAD, "#" }, - { "buffy-list", OP_MAILBOX_LIST, "." }, { "change-folder", OP_MAIN_CHANGE_FOLDER, "c" }, { "change-folder-readonly", OP_MAIN_CHANGE_FOLDER_READONLY, "\033c" }, #ifdef USE_NNTP @@ -302,6 +303,7 @@ const struct Binding OpPager[] = { /* map: pager */ { "list-reply", OP_LIST_REPLY, "L" }, { "mail", OP_MAIL, "m" }, { "mail-key", OP_MAIL_KEY, "\033k" }, + { "mailbox-list", OP_MAILBOX_LIST, "." }, { "mark-as-new", OP_TOGGLE_NEW, "N" }, { "modify-labels", OP_MAIN_MODIFY_TAGS, NULL }, // NOTE(sileht): kept for backward compatibility { "modify-labels-then-hide", OP_MAIN_MODIFY_TAGS_THEN_HIDE, NULL }, // NOTE(sileht): kept for backward compatibility @@ -383,6 +385,8 @@ const struct Binding OpPager[] = { /* map: pager */ { "view-attachments", OP_VIEW_ATTACHMENTS, "v" }, { "view-raw-message", OP_VIEW_RAW_MESSAGE, NULL }, { "what-key", OP_WHAT_KEY, NULL }, + /* This is deprecated. Leave it last so it doesn't show up in the help. */ + { "buffy-list", OP_MAILBOX_LIST, NULL }, { NULL, 0, NULL }, }; @@ -495,7 +499,6 @@ const struct Binding OpAlias[] = { /* map: alias */ /* The file browser */ const struct Binding OpBrowser[] = { /* map: browser */ - { "buffy-list", OP_MAILBOX_LIST, "." }, #ifdef USE_NNTP { "catchup", OP_CATCHUP, NULL }, #endif @@ -509,6 +512,7 @@ const struct Binding OpBrowser[] = { /* map: browser */ { "enter-mask", OP_ENTER_MASK, "m" }, { "goto-folder", OP_BROWSER_GOTO_FOLDER, "=" }, { "goto-parent", OP_GOTO_PARENT, "p" }, + { "mailbox-list", OP_MAILBOX_LIST, "." }, #ifdef USE_NNTP { "reload-active", OP_LOAD_ACTIVE, NULL }, #endif @@ -538,6 +542,8 @@ const struct Binding OpBrowser[] = { /* map: browser */ { "unsubscribe-pattern", OP_UNSUBSCRIBE_PATTERN, NULL }, #endif { "view-file", OP_BROWSER_VIEW_FILE, " " }, + /* This is deprecated. Leave it last so it doesn't show up in the help. */ + { "buffy-list", OP_MAILBOX_LIST, NULL }, { NULL, 0, NULL }, }; @@ -555,7 +561,6 @@ const struct Binding OpEditor[] = { /* map: editor */ { "backward-char", OP_EDITOR_BACKWARD_CHAR, "\002" }, { "backward-word", OP_EDITOR_BACKWARD_WORD, "\033b" }, { "bol", OP_EDITOR_BOL, "\001" }, - { "buffy-cycle", OP_EDITOR_MAILBOX_CYCLE, " " }, { "capitalize-word", OP_EDITOR_CAPITALIZE_WORD, "\033c" }, { "complete", OP_EDITOR_COMPLETE, "\t" }, { "complete-query", OP_EDITOR_COMPLETE_QUERY, "\024" }, @@ -571,9 +576,12 @@ const struct Binding OpEditor[] = { /* map: editor */ { "kill-eow", OP_EDITOR_KILL_EOW, "\033d" }, { "kill-line", OP_EDITOR_KILL_LINE, "\025" }, { "kill-word", OP_EDITOR_KILL_WORD, "\027" }, + { "mailbox-cycle", OP_EDITOR_MAILBOX_CYCLE, " " }, { "quote-char", OP_EDITOR_QUOTE_CHAR, "\026" }, { "transpose-chars", OP_EDITOR_TRANSPOSE_CHARS, NULL }, { "upcase-word", OP_EDITOR_UPCASE_WORD, "\033u" }, + /* This is deprecated. Leave it last so it doesn't show up in the help. */ + { "buffy-cycle", OP_EDITOR_MAILBOX_CYCLE, NULL }, { NULL, 0, NULL }, }; diff --git a/imap/browse.c b/imap/browse.c index 366bed5c9..79d5d0837 100644 --- a/imap/browse.c +++ b/imap/browse.c @@ -127,7 +127,7 @@ static void add_folder(char delim, char *folder, int noselect, int noinferiors, np->b->msg_count = Context->msgcount; np->b->msg_unread = Context->unread; } - (state->entry)[state->entrylen].has_buffy = true; + (state->entry)[state->entrylen].has_mailbox = true; (state->entry)[state->entrylen].new = np->b->new; (state->entry)[state->entrylen].msg_count = np->b->msg_count; (state->entry)[state->entrylen].msg_unread = np->b->msg_unread; diff --git a/imap/command.c b/imap/command.c index 94cf1ce82..ad72b6448 100644 --- a/imap/command.c +++ b/imap/command.c @@ -614,8 +614,8 @@ static void cmd_parse_search(struct ImapData *idata, const char *s) * @param idata Server data * @param s Command string with status info * - * first cut: just do buffy update. Later we may wish to cache all mailbox - * information, even that not desired by buffy + * first cut: just do mailbox update. Later we may wish to cache all mailbox + * information, even that not desired by mailbox */ static void cmd_parse_status(struct ImapData *idata, char *s) { @@ -710,7 +710,7 @@ static void cmd_parse_status(struct ImapData *idata, char *s) mutt_debug(3, "Running default STATUS handler\n"); - /* should perhaps move this code back to imap_buffy_check */ + /* should perhaps move this code back to imap_mailbox_check */ struct MailboxNode *np = NULL; STAILQ_FOREACH(np, &AllMailboxes, entries) { @@ -736,8 +736,8 @@ static void cmd_parse_status(struct ImapData *idata, char *s) if (value && (imap_mxcmp(mailbox, value) == 0)) { - mutt_debug(3, "Found %s in buffy list (OV: %u ON: %u U: %d)\n", mailbox, - olduv, oldun, status->unseen); + mutt_debug(3, "Found %s in mailbox list (OV: %u ON: %u U: %d)\n", + mailbox, olduv, oldun, status->unseen); if (MailCheckRecent) { diff --git a/imap/imap.c b/imap/imap.c index dc6663920..3611ba40e 100644 --- a/imap/imap.c +++ b/imap/imap.c @@ -1413,7 +1413,7 @@ int imap_check(struct ImapData *idata, int force) } /** - * imap_buffy_check - Check for new mail in subscribed folders + * imap_mailbox_check - Check for new mail in subscribed folders * @param check_stats Check for message stats too * @retval num Number of mailboxes with new mail * @retval 0 Failure @@ -1421,7 +1421,7 @@ int imap_check(struct ImapData *idata, int force) * Given a list of mailboxes rather than called once for each so that it can * batch the commands and save on round trips. */ -int imap_buffy_check(int check_stats) +int imap_mailbox_check(int check_stats) { struct ImapData *idata = NULL; struct ImapData *lastdata = NULL; @@ -1468,7 +1468,7 @@ int imap_buffy_check(int check_stats) if (lastdata && idata != lastdata) { - /* Send commands to previous server. Sorting the buffy list + /* Send commands to previous server. Sorting the mailbox list * may prevent some infelicitous interleavings */ if (imap_exec(lastdata, NULL, IMAP_CMD_FAIL_OK | IMAP_CMD_POLL) == -1) mutt_debug(1, "#1 Error polling mailboxes\n"); diff --git a/imap/imap.h b/imap/imap.h index b4e04ec59..d9fd94690 100644 --- a/imap/imap.h +++ b/imap/imap.h @@ -87,7 +87,7 @@ int imap_access(const char *path); int imap_check_mailbox(struct Context *ctx, int force); int imap_delete_mailbox(struct Context *ctx, struct ImapMbox *mx); int imap_sync_mailbox(struct Context *ctx, int expunge); -int imap_buffy_check(int check_stats); +int imap_mailbox_check(int check_stats); int imap_status(char *path, int queue); int imap_search(struct Context *ctx, const struct Pattern *pat); int imap_subscribe(char *path, bool subscribe); diff --git a/mailbox.c b/mailbox.c index a1094cd4e..2b39d59b7 100644 --- a/mailbox.c +++ b/mailbox.c @@ -170,28 +170,28 @@ static bool test_new_folder(const char *path) } /** - * buffy_new - Create a new Maibox + * mailbox_new - Create a new Maibox * @param path Path to the mailbox * @retval ptr New Mailbox */ -static struct Mailbox *buffy_new(const char *path) +static struct Mailbox *mailbox_new(const char *path) { char rp[PATH_MAX] = ""; - struct Mailbox *buffy = mutt_mem_calloc(1, sizeof(struct Mailbox)); - mutt_str_strfcpy(buffy->path, path, sizeof(buffy->path)); + struct Mailbox *mailbox = mutt_mem_calloc(1, sizeof(struct Mailbox)); + mutt_str_strfcpy(mailbox->path, path, sizeof(mailbox->path)); char *r = realpath(path, rp); - mutt_str_strfcpy(buffy->realpath, r ? rp : path, sizeof(buffy->realpath)); - buffy->magic = 0; + mutt_str_strfcpy(mailbox->realpath, r ? rp : path, sizeof(mailbox->realpath)); + mailbox->magic = 0; - return buffy; + return mailbox; } /** - * buffy_free - Free a Mailbox + * mailbox_free - Free a Mailbox * @param mailbox Mailbox to free */ -static void buffy_free(struct Mailbox **mailbox) +static void mailbox_free(struct Mailbox **mailbox) { if (mailbox && *mailbox) FREE(&(*mailbox)->desc); @@ -199,7 +199,7 @@ static void buffy_free(struct Mailbox **mailbox) } /** - * buffy_maildir_check_dir - Check for new mail / mail counts + * mailbox_maildir_check_dir - Check for new mail / mail counts * @param mailbox Mailbox to check * @param dir_name Path to mailbox * @param check_new if true, check for new mail @@ -208,8 +208,8 @@ static void buffy_free(struct Mailbox **mailbox) * * Checks the specified maildir subdir (cur or new) for new mail or mail counts. */ -static int buffy_maildir_check_dir(struct Mailbox *mailbox, const char *dir_name, - bool check_new, bool check_stats) +static int mailbox_maildir_check_dir(struct Mailbox *mailbox, const char *dir_name, + bool check_new, bool check_stats) { char path[PATH_MAX]; char msgpath[PATH_MAX]; @@ -286,12 +286,12 @@ static int buffy_maildir_check_dir(struct Mailbox *mailbox, const char *dir_name } /** - * buffy_maildir_check - Check for new mail in a maildir mailbox + * mailbox_maildir_check - Check for new mail in a maildir mailbox * @param mailbox Mailbox to check * @param check_stats if true, also count total, new, and flagged messages * @retval 1 if the mailbox has new mail */ -static int buffy_maildir_check(struct Mailbox *mailbox, bool check_stats) +static int mailbox_maildir_check(struct Mailbox *mailbox, bool check_stats) { int rc = 1; bool check_new = true; @@ -303,24 +303,24 @@ static int buffy_maildir_check(struct Mailbox *mailbox, bool check_stats) mailbox->msg_flagged = 0; } - rc = buffy_maildir_check_dir(mailbox, "new", check_new, check_stats); + rc = mailbox_maildir_check_dir(mailbox, "new", check_new, check_stats); check_new = !rc && MaildirCheckCur; if (check_new || check_stats) - if (buffy_maildir_check_dir(mailbox, "cur", check_new, check_stats)) + if (mailbox_maildir_check_dir(mailbox, "cur", check_new, check_stats)) rc = 1; return rc; } /** - * buffy_mbox_check - Check for new mail for an mbox mailbox + * mailbox_mbox_check - Check for new mail for an mbox mailbox * @param mailbox Mailbox to check * @param sb stat(2) information about the mailbox * @param check_stats if true, also count total, new, and flagged messages * @retval 1 if the mailbox has new mail */ -static int buffy_mbox_check(struct Mailbox *mailbox, struct stat *sb, bool check_stats) +static int mailbox_mbox_check(struct Mailbox *mailbox, struct stat *sb, bool check_stats) { int rc = 0; int new_or_changed; @@ -369,12 +369,12 @@ static int buffy_mbox_check(struct Mailbox *mailbox, struct stat *sb, bool check } /** - * buffy_check - Check a mailbox for new mail + * mailbox_check - Check a mailbox for new mail * @param tmp Mailbox to check * @param contex_sb stat() info for the current mailbox (Context) * @param check_stats If true, also count the total, new and flagged messages */ -static void buffy_check(struct Mailbox *tmp, struct stat *contex_sb, bool check_stats) +static void mailbox_check(struct Mailbox *tmp, struct stat *contex_sb, bool check_stats) { struct stat sb; #ifdef USE_SIDEBAR @@ -437,17 +437,17 @@ static void buffy_check(struct Mailbox *tmp, struct stat *contex_sb, bool check_ { case MUTT_MBOX: case MUTT_MMDF: - if (buffy_mbox_check(tmp, &sb, check_stats) > 0) + if (mailbox_mbox_check(tmp, &sb, check_stats) > 0) MailboxCount++; break; case MUTT_MAILDIR: - if (buffy_maildir_check(tmp, check_stats) > 0) + if (mailbox_maildir_check(tmp, check_stats) > 0) MailboxCount++; break; case MUTT_MH: - if (mh_buffy(tmp, check_stats)) + if (mh_mailbox(tmp, check_stats)) MailboxCount++; break; #ifdef USE_NOTMUCH @@ -483,11 +483,11 @@ static void buffy_check(struct Mailbox *tmp, struct stat *contex_sb, bool check_ } /** - * buffy_get - Fetch buffy object for given path, if present + * mailbox_get - Fetch mailbox object for given path, if present * @param path Path to the mailbox * @retval ptr Mailbox for the path */ -static struct Mailbox *buffy_get(const char *path) +static struct Mailbox *mailbox_get(const char *path) { if (!path) return NULL; @@ -512,14 +512,14 @@ static struct Mailbox *buffy_get(const char *path) } /** - * mutt_buffy_cleanup - Restore the timestamp of a mailbox + * mutt_mailbox_cleanup - Restore the timestamp of a mailbox * @param path Path to the mailbox * @param st Timestamp info from stat() * * Fix up the atime and mtime after mbox/mmdf mailbox was modified according to * stat() info taken before a modification. */ -void mutt_buffy_cleanup(const char *path, struct stat *st) +void mutt_mailbox_cleanup(const char *path, struct stat *st) { struct utimbuf ut; @@ -531,7 +531,7 @@ void mutt_buffy_cleanup(const char *path, struct stat *st) } else { - /* fix up the times so buffy won't get confused */ + /* fix up the times so mailbox won't get confused */ if (st->st_mtime > st->st_atime) { ut.actime = st->st_atime; @@ -656,7 +656,7 @@ int mutt_parse_mailboxes(struct Buffer *path, struct Buffer *s, continue; } - struct Mailbox *b = buffy_new(buf); + struct Mailbox *b = mailbox_new(buf); b->new = false; b->notified = true; @@ -751,7 +751,7 @@ int mutt_parse_unmailboxes(struct Buffer *path, struct Buffer *s, mutt_sb_notify_mailbox(np->b, 0); #endif STAILQ_REMOVE(&AllMailboxes, np, MailboxNode, entries); - buffy_free(&np->b); + mailbox_free(&np->b); FREE(&np); continue; } @@ -761,7 +761,7 @@ int mutt_parse_unmailboxes(struct Buffer *path, struct Buffer *s, } /** - * mutt_buffy_check - Check all AllMailboxes for new mail + * mutt_mailbox_check - Check all AllMailboxes for new mail * @param force Force flags, see below * @retval num Number of mailboxes with new mail * @@ -771,7 +771,7 @@ int mutt_parse_unmailboxes(struct Buffer *path, struct Buffer *s, * * Check all AllMailboxes for new mail and total/new/flagged messages */ -int mutt_buffy_check(int force) +int mutt_mailbox_check(int force) { struct stat contex_sb; time_t t; @@ -805,7 +805,7 @@ int mutt_buffy_check(int force) MailboxNotify = 0; #ifdef USE_IMAP - MailboxCount += imap_buffy_check(check_stats); + MailboxCount += imap_mailbox_check(check_stats); #endif /* check device ID and serial number instead of comparing paths */ @@ -822,27 +822,27 @@ int mutt_buffy_check(int force) struct MailboxNode *np = NULL; STAILQ_FOREACH(np, &AllMailboxes, entries) { - buffy_check(np->b, &contex_sb, check_stats); + mailbox_check(np->b, &contex_sb, check_stats); } return MailboxCount; } /** - * mutt_buffy_list - List the mailboxes with new mail + * mutt_mailbox_list - List the mailboxes with new mail * @retval true If there is new mail */ -bool mutt_buffy_list(void) +bool mutt_mailbox_list(void) { char path[PATH_MAX]; - char buffylist[2 * STRING]; + char mailboxlist[2 * STRING]; size_t pos = 0; int first = 1; int have_unnotified = MailboxNotify; - buffylist[0] = '\0'; - pos += strlen(strncat(buffylist, _("New mail in "), sizeof(buffylist) - 1 - pos)); + mailboxlist[0] = '\0'; + pos += strlen(strncat(mailboxlist, _("New mail in "), sizeof(mailboxlist) - 1 - pos)); struct MailboxNode *np = NULL; STAILQ_FOREACH(np, &AllMailboxes, entries) { @@ -860,26 +860,26 @@ bool mutt_buffy_list(void) } if (!first) - pos += strlen(strncat(buffylist + pos, ", ", sizeof(buffylist) - 1 - pos)); + pos += strlen(strncat(mailboxlist + pos, ", ", sizeof(mailboxlist) - 1 - pos)); /* Prepend an asterisk to mailboxes not already notified */ if (!np->b->notified) { - /* pos += strlen (strncat(buffylist + pos, "*", sizeof(buffylist)-1-pos)); */ + /* pos += strlen (strncat(mailboxlist + pos, "*", sizeof(mailboxlist)-1-pos)); */ np->b->notified = true; MailboxNotify--; } - pos += strlen(strncat(buffylist + pos, path, sizeof(buffylist) - 1 - pos)); + pos += strlen(strncat(mailboxlist + pos, path, sizeof(mailboxlist) - 1 - pos)); first = 0; } if (!first && np) { - strncat(buffylist + pos, ", ...", sizeof(buffylist) - 1 - pos); + strncat(mailboxlist + pos, ", ...", sizeof(mailboxlist) - 1 - pos); } if (!first) { - mutt_message("%s", buffylist); + mutt_message("%s", mailboxlist); return true; } /* there were no mailboxes needing to be notified, so clean up since @@ -890,44 +890,44 @@ bool mutt_buffy_list(void) } /** - * mutt_buffy_setnotified - Note when the user was last notified of new mail + * mutt_mailbox_setnotified - Note when the user was last notified of new mail * @param path Path to the mailbox */ -void mutt_buffy_setnotified(const char *path) +void mutt_mailbox_setnotified(const char *path) { - struct Mailbox *buffy = buffy_get(path); - if (!buffy) + struct Mailbox *mailbox = mailbox_get(path); + if (!mailbox) return; - buffy->notified = true; - time(&buffy->last_visited); + mailbox->notified = true; + time(&mailbox->last_visited); } /** - * mutt_buffy_notify - Notify the user if there's new mail + * mutt_mailbox_notify - Notify the user if there's new mail * @retval true If there is new mail */ -bool mutt_buffy_notify(void) +bool mutt_mailbox_notify(void) { - if (mutt_buffy_check(0) && MailboxNotify) + if (mutt_mailbox_check(0) && MailboxNotify) { - return mutt_buffy_list(); + return mutt_mailbox_list(); } return false; } /** - * mutt_buffy - incoming folders completion routine + * mutt_mailbox - incoming folders completion routine * @param s Buffer containing name of current mailbox * @param slen Buffer length * * Given a folder name, find the next incoming folder with new mail. */ -void mutt_buffy(char *s, size_t slen) +void mutt_mailbox(char *s, size_t slen) { mutt_expand_path(s, slen); - if (mutt_buffy_check(0)) + if (mutt_mailbox_check(0)) { int found = 0; for (int pass = 0; pass < 2; pass++) @@ -949,7 +949,7 @@ void mutt_buffy(char *s, size_t slen) } } - mutt_buffy_check(MUTT_MAILBOX_CHECK_FORCE); /* buffy was wrong - resync things */ + mutt_mailbox_check(MUTT_MAILBOX_CHECK_FORCE); /* mailbox was wrong - resync things */ } /* no folders with new mail */ @@ -958,13 +958,13 @@ void mutt_buffy(char *s, size_t slen) #ifdef USE_NOTMUCH /** - * mutt_buffy_vfolder - Find the first virtual folder with new mail + * mutt_mailbox_vfolder - Find the first virtual folder with new mail * @param buf Buffer for the folder name * @param buflen Length of the buffer */ -void mutt_buffy_vfolder(char *buf, size_t buflen) +void mutt_mailbox_vfolder(char *buf, size_t buflen) { - if (mutt_buffy_check(0)) + if (mutt_mailbox_check(0)) { bool found = false; for (int pass = 0; pass < 2; pass++) @@ -984,7 +984,7 @@ void mutt_buffy_vfolder(char *buf, size_t buflen) } } - mutt_buffy_check(MUTT_MAILBOX_CHECK_FORCE); /* Mailbox was wrong - resync things */ + mutt_mailbox_check(MUTT_MAILBOX_CHECK_FORCE); /* Mailbox was wrong - resync things */ } /* no folders with new mail */ diff --git a/mailbox.h b/mailbox.h index ac39b2d89..4ed4a1b31 100644 --- a/mailbox.h +++ b/mailbox.h @@ -78,25 +78,25 @@ STAILQ_HEAD(MailboxList, MailboxNode); extern struct MailboxList AllMailboxes; #ifdef USE_NOTMUCH -void mutt_buffy_vfolder(char *buf, size_t buflen); +void mutt_mailbox_vfolder(char *buf, size_t buflen); #endif struct Mailbox *mutt_find_mailbox(const char *path); void mutt_update_mailbox(struct Mailbox *b); -void mutt_buffy_cleanup(const char *path, struct stat *st); +void mutt_mailbox_cleanup(const char *path, struct stat *st); /** mark mailbox just left as already notified */ -void mutt_buffy_setnotified(const char *path); +void mutt_mailbox_setnotified(const char *path); -/* force flags passed to mutt_buffy_check() */ +/* force flags passed to mutt_mailbox_check() */ #define MUTT_MAILBOX_CHECK_FORCE (1 << 0) #define MUTT_MAILBOX_CHECK_FORCE_STATS (1 << 1) -void mutt_buffy(char *s, size_t slen); -bool mutt_buffy_list(void); -int mutt_buffy_check(int force); -bool mutt_buffy_notify(void); +void mutt_mailbox(char *s, size_t slen); +bool mutt_mailbox_list(void); +int mutt_mailbox_check(int force); +bool mutt_mailbox_notify(void); int mutt_parse_mailboxes(struct Buffer *path, struct Buffer *s, unsigned long data, struct Buffer *err); int mutt_parse_unmailboxes(struct Buffer *path, struct Buffer *s, unsigned long data, struct Buffer *err); diff --git a/maildir/maildir.h b/maildir/maildir.h index d19988ba8..84a40b308 100644 --- a/maildir/maildir.h +++ b/maildir/maildir.h @@ -63,7 +63,7 @@ struct Header *maildir_parse_message(int magic, const char *fname, bool is_old, struct Header *maildir_parse_stream(int magic, FILE *f, const char *fname, bool is_old, struct Header *h); bool maildir_update_flags(struct Context *ctx, struct Header *o, struct Header *n); -bool mh_buffy(struct Mailbox *mailbox, bool check_stats); +bool mh_mailbox(struct Mailbox *mailbox, bool check_stats); int mh_check_empty(const char *path); bool mx_is_maildir(const char *path); diff --git a/maildir/mh.c b/maildir/mh.c index 39acb30a3..a3c06109f 100644 --- a/maildir/mh.c +++ b/maildir/mh.c @@ -347,12 +347,12 @@ static bool mh_valid_message(const char *s) } /** - * mh_buffy - Check for new mail for a mh mailbox + * mh_mailbox - Check for new mail for a mh mailbox * @param mailbox Mailbox to check * @param check_stats Also count total, new, and flagged messages * @retval true if the mailbox has new mail */ -bool mh_buffy(struct Mailbox *mailbox, bool check_stats) +bool mh_mailbox(struct Mailbox *mailbox, bool check_stats) { struct MhSequences mhs = { 0 }; bool check_new = true; diff --git a/main.c b/main.c index d776a611d..38cda045f 100644 --- a/main.c +++ b/main.c @@ -1119,13 +1119,13 @@ int main(int argc, char *argv[], char *envp[]) { if (flags & MUTT_MAILBOX) { - if (mutt_buffy_check(0) == 0) + if (mutt_mailbox_check(0) == 0) { mutt_message(_("No mailbox with new mail.")); goto main_curses; // TEST37: neomutt -Z (no new mail) } folder[0] = '\0'; - mutt_buffy(folder, sizeof(folder)); + mutt_mailbox(folder, sizeof(folder)); } else if (flags & MUTT_SELECT) { @@ -1197,7 +1197,7 @@ int main(int argc, char *argv[], char *envp[]) if (Context || !explicit_folder) { #ifdef USE_SIDEBAR - mutt_sb_set_open_buffy(); + mutt_sb_set_open_mailbox(); #endif mutt_index_menu(); if (Context) diff --git a/mbox/mbox.c b/mbox/mbox.c index 719aa048a..f0eac0f32 100644 --- a/mbox/mbox.c +++ b/mbox/mbox.c @@ -921,7 +921,7 @@ static bool mbox_has_new(struct Context *ctx) * @param st Timestamp * * if mailbox has at least 1 new message, sets mtime > atime of mailbox so - * buffy check reports new mail + * mailbox check reports new mail */ void mbox_reset_atime(struct Context *ctx, struct stat *st) { diff --git a/mx.c b/mx.c index c68a85e89..ecd33f15f 100644 --- a/mx.c +++ b/mx.c @@ -539,7 +539,7 @@ void mx_fastclose_mailbox(struct Context *ctx) if (!ctx) return; - /* fix up the times so buffy won't get confused */ + /* fix up the times so mailbox won't get confused */ if (ctx->peekonly && ctx->path && (ctx->mtime > ctx->atime)) { ut.actime = ctx->atime; @@ -550,7 +550,7 @@ void mx_fastclose_mailbox(struct Context *ctx) /* never announce that a mailbox we've just left has new mail. #3290 * TODO: really belongs in mx_mbox_close, but this is a nice hook point */ if (!ctx->peekonly) - mutt_buffy_setnotified(ctx->path); + mutt_mailbox_setnotified(ctx->path); if (ctx->mx_ops) ctx->mx_ops->mbox_close(ctx); @@ -945,7 +945,7 @@ int mx_mbox_close(struct Context *ctx, int *index_hint) ctx->flagged--; } ctx->msgcount -= ctx->deleted; - mutt_sb_set_buffystats(ctx); + mutt_sb_set_mailbox_stats(ctx); ctx->msgcount = orig_msgcount; } #endif diff --git a/nntp/newsrc.c b/nntp/newsrc.c index 4304e6dbe..2e1a1ff51 100644 --- a/nntp/newsrc.c +++ b/nntp/newsrc.c @@ -1398,11 +1398,11 @@ struct NntpData *mutt_newsgroup_uncatchup(struct NntpServer *nserv, char *group) } /** - * nntp_buffy - Get first newsgroup with new messages + * nntp_mailbox - Get first newsgroup with new messages * @param buf Buffer for result * @param len Length of buffer */ -void nntp_buffy(char *buf, size_t len) +void nntp_mailbox(char *buf, size_t len) { for (unsigned int i = 0; i < CurrentNewsSrv->groups_num; i++) { diff --git a/nntp/nntp.h b/nntp/nntp.h index 7354e2429..87d003404 100644 --- a/nntp/nntp.h +++ b/nntp/nntp.h @@ -162,7 +162,7 @@ int nntp_check_msgid(struct Context *ctx, const char *msgid); int nntp_check_children(struct Context *ctx, const char *msgid); int nntp_newsrc_parse(struct NntpServer *nserv); void nntp_newsrc_close(struct NntpServer *nserv); -void nntp_buffy(char *buf, size_t len); +void nntp_mailbox(char *buf, size_t len); void nntp_expand_path(char *line, size_t len, struct Account *acct); void nntp_clear_cache(struct NntpServer *nserv); const char *nntp_format_str(char *buf, size_t buflen, size_t col, int cols, char op, diff --git a/notmuch/mutt_notmuch.c b/notmuch/mutt_notmuch.c index 711ca12f0..cc1b55ad0 100644 --- a/notmuch/mutt_notmuch.c +++ b/notmuch/mutt_notmuch.c @@ -448,7 +448,7 @@ static bool windowed_query_from_query(const char *query, char *buf, size_t bufle * * @note The window parameter here is here to decide contextually whether we * want to return a search query with window applied (for the actual search - * result in buffy) or not (for the count in the sidebar). It is not aimed at + * result in mailbox) or not (for the count in the sidebar). It is not aimed at * enabling/disabling the feature. */ static char *get_query_string(struct NmCtxData *data, bool window) @@ -1954,7 +1954,7 @@ char *nm_uri_from_query(struct Context *ctx, char *buf, size_t buflen) * by building a notmuch context object from the original search string, and * building a new from the notmuch context object. * - * It's aimed to be used by buffy when parsing the virtual_mailboxes to make the + * It's aimed to be used by mailbox when parsing the virtual_mailboxes to make the * parsed user written search strings comparable to the internally generated ones. */ bool nm_normalize_uri(char *new_uri, const char *orig_uri, size_t new_uri_sz) @@ -2231,7 +2231,7 @@ int nm_nonctx_get_count(char *path, int *all, int *new) } /* don't be verbose about connection, as we're called from - * sidebar/buffy very often */ + * sidebar/mailbox very often */ db = do_database_open(db_filename, false, false); if (!db) goto done; diff --git a/pager.c b/pager.c index 5b32997d4..91d2877af 100644 --- a/pager.c +++ b/pager.c @@ -2422,7 +2422,7 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e } } - if (mutt_buffy_notify() || do_new_mail) + if (mutt_mailbox_notify() || do_new_mail) { if (BeepNew) beep(); @@ -3357,7 +3357,7 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e break; case OP_MAILBOX_LIST: - mutt_buffy_list(); + mutt_mailbox_list(); break; case OP_VIEW_ATTACHMENTS: diff --git a/sendlib.c b/sendlib.c index 3d3905058..29d2d0126 100644 --- a/sendlib.c +++ b/sendlib.c @@ -3211,7 +3211,7 @@ int mutt_write_fcc(const char *path, struct Header *hdr, const char *msgid, char tempfile[PATH_MAX]; FILE *tempfp = NULL; int rc = -1; - bool need_buffy_cleanup = false; + bool need_mailbox_cleanup = false; struct stat st; char buf[SHORT_STRING]; int onm_flags; @@ -3242,7 +3242,7 @@ int mutt_write_fcc(const char *path, struct Header *hdr, const char *msgid, goto done; } /* remember new mail status before appending message */ - need_buffy_cleanup = true; + need_mailbox_cleanup = true; stat(path, &st); } @@ -3405,8 +3405,8 @@ int mutt_write_fcc(const char *path, struct Header *hdr, const char *msgid, mx_msg_close(&f, &msg); mx_mbox_close(&f, NULL); - if (!post && need_buffy_cleanup) - mutt_buffy_cleanup(path, &st); + if (!post && need_mailbox_cleanup) + mutt_mailbox_cleanup(path, &st); if (post) set_noconv_flags(hdr->content, 0); diff --git a/sidebar.c b/sidebar.c index 32061c615..036b738e0 100644 --- a/sidebar.c +++ b/sidebar.c @@ -73,9 +73,9 @@ static short PreviousSort = SORT_ORDER; /* sidebar_sort_method */ */ struct SbEntry { - char box[STRING]; /**< formatted mailbox name */ - struct Mailbox *buffy; /**< Mailbox this represents */ - bool is_hidden; /**< Don't show, e.g. $sidebar_new_mail_only */ + char box[STRING]; /**< formatted mailbox name */ + struct Mailbox *mailbox; /**< Mailbox this represents */ + bool is_hidden; /**< Don't show, e.g. $sidebar_new_mail_only */ }; static int EntryCount = 0; @@ -149,7 +149,7 @@ static const char *sidebar_format_str(char *buf, size_t buflen, size_t col, int buf[0] = 0; /* Just in case there's nothing to do */ - struct Mailbox *b = sbe->buffy; + struct Mailbox *b = sbe->mailbox; if (!b) return src; @@ -316,8 +316,8 @@ static int cb_qsort_sbe(const void *a, const void *b) { const struct SbEntry *sbe1 = *(const struct SbEntry **) a; const struct SbEntry *sbe2 = *(const struct SbEntry **) b; - struct Mailbox *b1 = sbe1->buffy; - struct Mailbox *b2 = sbe2->buffy; + struct Mailbox *b1 = sbe1->mailbox; + struct Mailbox *b2 = sbe2->mailbox; int result = 0; @@ -381,8 +381,8 @@ static void update_entries_visibility(void) sbe->is_hidden = false; #ifdef USE_NOTMUCH - if (((sbe->buffy->magic != MUTT_NOTMUCH) && (sidebar_source == SB_SRC_VIRT)) || - ((sbe->buffy->magic == MUTT_NOTMUCH) && (sidebar_source == SB_SRC_INCOMING))) + if (((sbe->mailbox->magic != MUTT_NOTMUCH) && (sidebar_source == SB_SRC_VIRT)) || + ((sbe->mailbox->magic == MUTT_NOTMUCH) && (sidebar_source == SB_SRC_INCOMING))) { sbe->is_hidden = true; continue; @@ -392,20 +392,20 @@ static void update_entries_visibility(void) if (!new_only) continue; - if ((i == OpnIndex) || (sbe->buffy->msg_unread > 0) || sbe->buffy->new || - (sbe->buffy->msg_flagged > 0)) + if ((i == OpnIndex) || (sbe->mailbox->msg_unread > 0) || + sbe->mailbox->new || (sbe->mailbox->msg_flagged > 0)) { continue; } - if (Context && (mutt_str_strcmp(sbe->buffy->realpath, Context->realpath) == 0)) + if (Context && (mutt_str_strcmp(sbe->mailbox->realpath, Context->realpath) == 0)) { /* Spool directory */ continue; } - if (mutt_list_find(&SidebarWhitelist, sbe->buffy->path) || - mutt_list_find(&SidebarWhitelist, sbe->buffy->desc)) + if (mutt_list_find(&SidebarWhitelist, sbe->mailbox->path) || + mutt_list_find(&SidebarWhitelist, sbe->mailbox->desc)) { /* Explicitly asked to be visible */ continue; @@ -429,7 +429,7 @@ static void unsort_entries(void) break; int j = i; - while ((j < EntryCount) && (Entries[j]->buffy != np->b)) + while ((j < EntryCount) && (Entries[j]->mailbox != np->b)) j++; if (j < EntryCount) { @@ -513,7 +513,7 @@ static int select_next_new(void) } if (entry == HilIndex) return false; - } while (!Entries[entry]->buffy->new && !Entries[entry]->buffy->msg_unread); + } while (!Entries[entry]->mailbox->new && !Entries[entry]->mailbox->msg_unread); HilIndex = entry; return true; @@ -568,7 +568,7 @@ static bool select_prev_new(void) } if (entry == HilIndex) return false; - } while (!Entries[entry]->buffy->new && !Entries[entry]->buffy->msg_unread); + } while (!Entries[entry]->mailbox->new && !Entries[entry]->mailbox->msg_unread); HilIndex = entry; return true; @@ -843,7 +843,7 @@ static void draw_sidebar(int num_rows, int num_cols, int div_width) entry = Entries[entryidx]; if (entry->is_hidden) continue; - b = entry->buffy; + b = entry->mailbox; if (entryidx == OpnIndex) { @@ -1075,13 +1075,13 @@ void mutt_sb_change_mailbox(int op) } /** - * mutt_sb_set_buffystats - Update the Mailbox's message counts from the Context + * mutt_sb_set_mailbox_stats - Update the Mailbox's message counts from the Context * @param ctx A mailbox Context * * Given a mailbox Context, find a matching mailbox Mailbox and copy the message * counts into it. */ -void mutt_sb_set_buffystats(const struct Context *ctx) +void mutt_sb_set_mailbox_stats(const struct Context *ctx) { if (!ctx) return; @@ -1114,16 +1114,16 @@ const char *mutt_sb_get_highlight(void) if (!EntryCount || HilIndex < 0) return NULL; - return Entries[HilIndex]->buffy->path; + return Entries[HilIndex]->mailbox->path; } /** - * mutt_sb_set_open_buffy - Set the OpnMailbox based on the global Context + * mutt_sb_set_open_mailbox - Set the OpnMailbox based on the global Context * * Search through the list of mailboxes. If a Mailbox has a matching path, set * OpnMailbox to it. */ -void mutt_sb_set_open_buffy(void) +void mutt_sb_set_open_mailbox(void) { OpnIndex = -1; @@ -1132,7 +1132,7 @@ void mutt_sb_set_open_buffy(void) for (int entry = 0; entry < EntryCount; entry++) { - if (mutt_str_strcmp(Entries[entry]->buffy->realpath, Context->realpath) == 0) + if (mutt_str_strcmp(Entries[entry]->mailbox->realpath, Context->realpath) == 0) { OpnIndex = entry; HilIndex = entry; @@ -1168,7 +1168,7 @@ void mutt_sb_notify_mailbox(struct Mailbox *b, int created) mutt_mem_realloc(&Entries, EntryLen * sizeof(struct SbEntry *)); } Entries[EntryCount] = mutt_mem_calloc(1, sizeof(struct SbEntry)); - Entries[EntryCount]->buffy = b; + Entries[EntryCount]->mailbox = b; if (TopIndex < 0) TopIndex = EntryCount; @@ -1183,7 +1183,7 @@ void mutt_sb_notify_mailbox(struct Mailbox *b, int created) { int del_index; for (del_index = 0; del_index < EntryCount; del_index++) - if (Entries[del_index]->buffy == b) + if (Entries[del_index]->mailbox == b) break; if (del_index == EntryCount) return; diff --git a/sidebar.h b/sidebar.h index ec7b926bc..47c3bdc8a 100644 --- a/sidebar.h +++ b/sidebar.h @@ -46,8 +46,8 @@ void mutt_sb_change_mailbox(int op); void mutt_sb_draw(void); const char *mutt_sb_get_highlight(void); void mutt_sb_notify_mailbox(struct Mailbox *b, int created); -void mutt_sb_set_buffystats(const struct Context *ctx); -void mutt_sb_set_open_buffy(void); +void mutt_sb_set_mailbox_stats(const struct Context *ctx); +void mutt_sb_set_open_mailbox(void); void mutt_sb_toggle_virtual(void); #endif /* _MUTT_SIDEBAR_H */ diff --git a/status.c b/status.c index d0a2ae0a5..220ac4cfb 100644 --- a/status.c +++ b/status.c @@ -122,9 +122,9 @@ 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, mutt_buffy_check(0)); + snprintf(buf, buflen, fmt, mutt_mailbox_check(0)); } - else if (mutt_buffy_check(0) == 0) + else if (mutt_mailbox_check(0) == 0) optional = 0; break;