]> granicus.if.org Git - neomutt/commitdiff
rename buffy
authorRichard Russon <rich@flatcap.org>
Fri, 3 Aug 2018 14:51:43 +0000 (15:51 +0100)
committerRichard Russon <rich@flatcap.org>
Fri, 3 Aug 2018 19:43:13 +0000 (20:43 +0100)
31 files changed:
ChangeLog.md
browser.c
browser.h
commands.c
context.h
curs_lib.c
curs_lib.h
curs_main.c
doc/manual.xml.head
doc/neomutt.pwl
enter.c
functions.h
imap/browse.c
imap/command.c
imap/imap.c
imap/imap.h
mailbox.c
mailbox.h
maildir/maildir.h
maildir/mh.c
main.c
mbox/mbox.c
mx.c
nntp/newsrc.c
nntp/nntp.h
notmuch/mutt_notmuch.c
pager.c
sendlib.c
sidebar.c
sidebar.h
status.c

index 0fcf0c090ffb333615fa22ba34fe70fa26ec6373..e9305b3ce85ae3557b86886d3af9b2907c033110 100644 (file)
   - 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
 * 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
   - Add option for missing subject replacement
   - notmuch: Allow <modify-labels> 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
   - 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
   - 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
index f3ec64e7fb8ac7baff4641c45947cade0bc0f512..ca936f486047367349e8b425c8bb575d47a897f8 100644 (file)
--- 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:
index 059685a54aa709dbca26f48cea6e2753be550e04..6e0ddaf797a61195c3f96ecc6fa760338e2c4fc5 100644 (file)
--- 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
index 5b4fb2317b8409d22359cd0491b190f53f6f79ca..281f8a3b20d203e5b7b6a54746c366959af18378 100644 (file)
@@ -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);
 }
index 1c90f85683ef5d5d6df021961006770bb60116b5..5a77eb7d5f848cf02aa249c463c171b1881764eb 100644 (file)
--- 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;
index 9d026b99c2c2bee1eb8f1101ea7f096a438b8544..1c03b347369c66ffe48a9a33e7e251704e864de3 100644 (file)
@@ -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';
index 0c0a16b45c2204ac80c4687307ec1887ae7ea68a..e60e7f10bf8dd9390eec7ee6303953febdfcd58f 100644 (file)
@@ -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);
index a50bb14dc6b858c876278614aeff00f28b90e615..6595c87f57fe05343d230f616bada4566d2a1807 100644 (file)
@@ -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:
index 6a262bd895640e63ed3aa58832db5053b6406d40..62a83a37d21891ed1427aa6ab74b6fb2ade6749e 100644 (file)
@@ -8801,7 +8801,7 @@ subjectrx '\[[^]]*\]:? *' '%L%R'
         </para>
         <para>
           For the pager, index and directory browser menus, NeoMutt contains
-          the <literal>&lt;buffy-list&gt;</literal> function (bound to
+          the <literal>&lt;mailbox-list&gt;</literal> function (bound to
           <quote>.</quote> by default) which will print a list of folders with
           new mail in the command line at the bottom of the screen.
         </para>
@@ -15829,7 +15829,7 @@ set sidebar_on_right = no
 <emphasis role="comment"># The character to use as the divider between the Sidebar and the other NeoMutt</emphasis>
 <emphasis role="comment"># panels.</emphasis>
 set sidebar_divider_char = '|'
-<emphasis role="comment"># Enable extended buffy mode to calculate total, new, and flagged</emphasis>
+<emphasis role="comment"># Enable extended mailbox mode to calculate total, new, and flagged</emphasis>
 <emphasis role="comment"># message counts for each mailbox.</emphasis>
 set mail_check_stats
 <emphasis role="comment"># Display the Sidebar mailboxes using this format string.</emphasis>
index 29fd99c8d4045e5916e342500a0310bcac4d0318..15f3865442d4e8bc6916390d8beffa0b74dd5171 100644 (file)
@@ -404,7 +404,6 @@ Fi
 fI
 Cx
 dt
-buffy
 manny
 applica
 autoview
diff --git a/enter.c b/enter.c
index 775fe8809143ab32e26c775e14b8ac4911840560..065b02f91bb40beae36a461d56f2596308f83516 100644 (file)
--- 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;
index 37201554b31b2e2b77eed9c96fba1a673f1ffca2..78e4eb52e4c187cb8f80ebd5d456b05d9ca8213e 100644 (file)
@@ -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 },
 };
 
index 366bed5c90bfb12f92d6dac1457ae006ca6ec527..79d5d083740e363ca01d562586614eceea8f903a 100644 (file)
@@ -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;
index 94cf1ce8283b31a11de9417598296c8813ed89bc..ad72b64480cc123fd74a7ff3d911c4b0b791143c 100644 (file)
@@ -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)
         {
index dc666392001231f664ac2156f1d9154cca77ca6a..3611ba40e1088927e18c5aa7807a9befb183b5fa 100644 (file)
@@ -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");
index b4e04ec59875466a8ffc0318b6d3d822c48e5a62..d9fd946908b26c0ce28cce9f0bc58147ae6db5cd 100644 (file)
@@ -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);
index a1094cd4e3e6e0dc4c5b6bcad0c8c8d0a7bcaf4d..2b39d59b7b61c072672b2d4c8ee3f057fc1beccd 100644 (file)
--- 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 */
index ac39b2d899d775097fb363db3383a765b2fb6229..4ed4a1b317760f1069437c110d91f17ea79d6372 100644 (file)
--- 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);
 
index d19988ba8d0228e231a5da8ff85097803d97d96f..84a40b3089367a20ac773fad2c9562890924500d 100644 (file)
@@ -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);
index 39acb30a392514e415b8f927b95e24f647f7bd03..a3c06109faf27b53b109139f41decdad2cacb08c 100644 (file)
@@ -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 d776a611d08ddedf8bb85b4c5aaf4d7ade4ca709..38cda045f23764770a5051677cdb78c3bc5d0422 100644 (file)
--- 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)
index 719aa048a8465fba1cd6863fd180146e21a308d6..f0eac0f3277a782fee3497fbbebad846cc55e363 100644 (file)
@@ -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 c68a85e89496ed73cd08ffffc9a3894ef68173ef..ecd33f15f6a799b64b7f314a4a428aa9e5e2b51c 100644 (file)
--- 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
index 4304e6dbed7cc445cdf2c99c71ee6e1f8f4c15b7..2e1a1ff51515e2dc819a36da3e52f33d0c3b6ad1 100644 (file)
@@ -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++)
   {
index 7354e2429b70769bc28cdd8c57442897f3200aac..87d003404732b05d61868a4b915fa42ff8067722 100644 (file)
@@ -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,
index 711ca12f0c1688d22c2242b6c9e0a864f46f8e37..cc1b55ad0da0dcc4b10682adf4b6519821a21139 100644 (file)
@@ -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 5b32997d4a311c035b20dd3e4871c9a17af4cbd4..91d2877af6f7c6327679d6c71cdac02be7cb7be6 100644 (file)
--- 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:
index 3d3905058086c49c14f293f660d2e04fad0ea335..29d2d01262843d1903fc67ae526289bc7b927e32 100644 (file)
--- 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);
index 32061c6159b69d05d2efc73e670164cee3ec9960..036b738e0e8ede6ea389c19d697840edaeb75050 100644 (file)
--- 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;
index ec7b926bc39065636e70f3cfa0abb0c031333187..47c3bdc8a259830bc27e29c279a2958b899ef47e 100644 (file)
--- 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 */
index d0a2ae0a5e48f366bc80fa1a602a02c889b0a49c..220ac4cfb7bd89e9578cd5d152a9bf333b4550ff 100644 (file)
--- 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;