]> granicus.if.org Git - neomutt/commitdiff
menu: rename functions
authorRichard Russon <rich@flatcap.org>
Wed, 26 Sep 2018 23:14:57 +0000 (00:14 +0100)
committerRichard Russon <rich@flatcap.org>
Thu, 27 Sep 2018 00:01:37 +0000 (01:01 +0100)
14 files changed:
addrbook.c
browser.c
compose.c
curs_main.c
menu.c
mutt_attach.h
mutt_history.c
ncrypt/crypt_gpgme.c
ncrypt/pgpkey.c
ncrypt/smime.c
pager.c
postpone.c
query.c
recvattach.c

index 5ea5f50afd4f976830354322a9db7f63f6a584a9..daa2a5032cb0cff944cf2560d4b96360c99b453a 100644 (file)
@@ -105,13 +105,13 @@ static const char *alias_format_str(char *buf, size_t buflen, size_t col, int co
 }
 
 /**
- * alias_entry - Format a menu item for the alias list
+ * alias_make_entry - Format a menu item for the alias list
  * @param[out] buf    Buffer in which to save string
  * @param[in]  buflen Buffer length
  * @param[in]  menu   Menu containing aliases
  * @param[in]  num    Index into the menu
  */
-static void alias_entry(char *buf, size_t buflen, struct Menu *menu, int num)
+static void alias_make_entry(char *buf, size_t buflen, struct Menu *menu, int num)
 {
   mutt_expando_format(buf, buflen, 0, MuttIndexWindow->cols, NONULL(AliasFormat), alias_format_str,
                       (unsigned long) ((struct Alias **) menu->data)[num],
@@ -211,7 +211,7 @@ void mutt_alias_menu(char *buf, size_t buflen, struct AliasList *aliases)
   }
 
   menu = mutt_menu_new(MENU_ALIAS);
-  menu->menu_make_entry = alias_entry;
+  menu->menu_make_entry = alias_make_entry;
   menu->menu_tag = alias_tag;
   menu->title = _("Aliases");
   menu->help = mutt_compile_help(helpstr, sizeof(helpstr), MENU_ALIAS, AliasHelp);
index eb27fad0d07c7949e149408a2ab0304f63518d2a..054bc5b5769ab34ca8d2e30d8164be2c91c0569c 100644 (file)
--- a/browser.c
+++ b/browser.c
@@ -1065,13 +1065,13 @@ static int select_vfolder_search(struct Menu *menu, regex_t *re, int n)
 #endif
 
 /**
- * folder_entry - Format a menu item for the folder browser
+ * folder_make_entry - Format a menu item for the folder browser
  * @param[out] buf    Buffer in which to save string
  * @param[in]  buflen Buffer length
  * @param[in]  menu   Menu containing aliases
  * @param[in]  num    Index into the menu
  */
-static void folder_entry(char *buf, size_t buflen, struct Menu *menu, int num)
+static void folder_make_entry(char *buf, size_t buflen, struct Menu *menu, int num)
 {
   struct Folder folder;
 
@@ -1096,13 +1096,13 @@ static void folder_entry(char *buf, size_t buflen, struct Menu *menu, int num)
 
 #ifdef USE_NOTMUCH
 /**
- * vfolder_entry - Format a menu item for the virtual folder list
+ * vfolder_make_entry - Format a menu item for the virtual folder list
  * @param[out] buf    Buffer in which to save string
  * @param[in]  buflen Buffer length
  * @param[in]  menu   Menu containing aliases
  * @param[in]  num    Index into the menu
  */
-static void vfolder_entry(char *buf, size_t buflen, struct Menu *menu, int num)
+static void vfolder_make_entry(char *buf, size_t buflen, struct Menu *menu, int num)
 {
   struct Folder folder;
 
@@ -1505,7 +1505,7 @@ void mutt_select_file(char *file, size_t filelen, int flags, char ***files, int
       goto bail;
   }
   menu = mutt_menu_new(MENU_FOLDER);
-  menu->menu_make_entry = folder_entry;
+  menu->menu_make_entry = folder_make_entry;
   menu->menu_search = select_file_search;
   menu->title = title;
   menu->data = state.entry;
@@ -1515,12 +1515,12 @@ void mutt_select_file(char *file, size_t filelen, int flags, char ***files, int
 #ifdef USE_NOTMUCH
   if (flags & MUTT_SEL_VFOLDER)
   {
-    menu->menu_make_entry = vfolder_entry;
+    menu->menu_make_entry = vfolder_make_entry;
     menu->menu_search = select_vfolder_search;
   }
   else
 #endif
-    menu->menu_make_entry = folder_entry;
+    menu->menu_make_entry = folder_make_entry;
 
   menu->help = mutt_compile_help(helpstr, sizeof(helpstr), MENU_FOLDER,
 #ifdef USE_NNTP
index 7b23c8dc511ba2b464c29a374a9b5dd791a4b63f..97cefd80ef9ed420e46ba5eade9b39d19691b393 100644 (file)
--- a/compose.c
+++ b/compose.c
@@ -248,13 +248,13 @@ static void init_header_padding(void)
 }
 
 /**
- * snd_entry - Format a menu item for the attachment list
+ * snd_make_entry - Format a menu item for the attachment list
  * @param[out] buf    Buffer in which to save string
  * @param[in]  buflen Buffer length
  * @param[in]  menu   Menu containing aliases
  * @param[in]  num    Index into the menu
  */
-static void snd_entry(char *buf, size_t buflen, struct Menu *menu, int num)
+static void snd_make_entry(char *buf, size_t buflen, struct Menu *menu, int num)
 {
   struct AttachCtx *actx = menu->data;
 
@@ -678,10 +678,10 @@ static void compose_status_line(char *buf, size_t buflen, size_t col, int cols,
                                 struct Menu *menu, const char *p);
 
 /**
- * compose_menu_redraw - Redraw the compose menu
+ * compose_custom_redraw - Redraw the compose menu
  * @param menu Current menu
  */
-static void compose_menu_redraw(struct Menu *menu)
+static void compose_custom_redraw(struct Menu *menu)
 {
   struct ComposeRedrawData *rd = menu->redraw_data;
 
@@ -916,15 +916,15 @@ int mutt_compose_menu(struct Email *msg, char *fcc, size_t fcclen, struct Email
 
   struct Menu *menu = mutt_menu_new(MENU_COMPOSE);
   menu->offset = HDR_ATTACH;
-  menu->menu_make_entry = snd_entry;
-  menu->menu_tag = mutt_tag_attach;
+  menu->menu_make_entry = snd_make_entry;
+  menu->menu_tag = attach_tag;
 #ifdef USE_NNTP
   if (news)
     menu->help = mutt_compile_help(helpstr, sizeof(helpstr), MENU_COMPOSE, ComposeNewsHelp);
   else
 #endif
     menu->help = mutt_compile_help(helpstr, sizeof(helpstr), MENU_COMPOSE, ComposeHelp);
-  menu->menu_custom_redraw = compose_menu_redraw;
+  menu->menu_custom_redraw = compose_custom_redraw;
   menu->redraw_data = &rd;
   mutt_menu_push_current(menu);
 
index 97ea47c61f313961dbd085c61facfef29044b642..724a1a5c8f398354bd5f12a2a55364d873999610 100644 (file)
@@ -901,10 +901,10 @@ struct Mapping IndexNewsHelp[] = {
 #endif
 
 /**
- * index_menu_redraw - Redraw the index
+ * index_custom_redraw - Redraw the index
  * @param menu Current Menu
  */
-static void index_menu_redraw(struct Menu *menu)
+static void index_custom_redraw(struct Menu *menu)
 {
   if (menu->redraw & REDRAW_FULL)
   {
@@ -987,7 +987,7 @@ int mutt_index_menu(void)
                                      IndexNewsHelp :
 #endif
                                      IndexHelp);
-  menu->menu_custom_redraw = index_menu_redraw;
+  menu->menu_custom_redraw = index_custom_redraw;
   mutt_menu_push_current(menu);
 
   if (!attach_msg)
@@ -1136,7 +1136,7 @@ int mutt_index_menu(void)
 
     if (menu->menu == MENU_MAIN)
     {
-      index_menu_redraw(menu);
+      index_custom_redraw(menu);
 
       /* give visual indication that the next command is a tag- command */
       if (tag)
diff --git a/menu.c b/menu.c
index 9544a4548b3016f041ecf89cd9eb269690c76c10..b2096163f9a7bb4c4aa3c6faae469758a0152ec0 100644 (file)
--- a/menu.c
+++ b/menu.c
@@ -943,14 +943,14 @@ static int default_color(int i)
 }
 
 /**
- * menu_search_generic - Search a menu for a item matching a regex
+ * generic_search - Search a menu for a item matching a regex
  * @param m  Menu to search
  * @param re Regex to match
  * @param n  Index number
  * @retval  0 Success
- * @retval >0 Error, e.g. REG_BADPAT
+ * @retval >0 Error, e.g. REG_NOMATCH
  */
-static int menu_search_generic(struct Menu *m, regex_t *re, int n)
+static int generic_search(struct Menu *m, regex_t *re, int n)
 {
   char buf[LONG_STRING];
 
@@ -990,7 +990,7 @@ struct Menu *mutt_menu_new(int menu)
   p->helpwin = MuttHelpWindow;
   p->messagewin = MuttMessageWindow;
   p->menu_color = default_color;
-  p->menu_search = menu_search_generic;
+  p->menu_search = generic_search;
 
   return p;
 }
index 1b106513b522edb881840f5d263b9eaff12fec32..5f95b15c73c10eb26b9b80b1b2fffa2795223270 100644 (file)
@@ -33,7 +33,7 @@ struct Menu;
 struct Email;
 struct Body;
 
-int mutt_tag_attach(struct Menu *menu, int n, int m);
+int attach_tag(struct Menu *menu, int n, int m);
 int mutt_attach_display_loop(struct Menu *menu, int op, struct Email *e,
                              struct AttachCtx *actx, bool recv);
 
index fc8521062fb85a3d38db525f89fec9789a21589d..1ac22f6c6699e5c18c6de3d18140ec2d8da8e306 100644 (file)
@@ -65,13 +65,13 @@ static const char *history_format_str(char *buf, size_t buflen, size_t col, int
 }
 
 /**
- * history_entry - Format a menu item for the history list
+ * history_make_entry - Format a menu item for the history list
  * @param[out] buf    Buffer in which to save string
  * @param[in]  buflen Buffer length
  * @param[in]  menu   Menu containing aliases
  * @param[in]  num    Index into the menu
  */
-static void history_entry(char *buf, size_t buflen, struct Menu *menu, int num)
+static void history_make_entry(char *buf, size_t buflen, struct Menu *menu, int num)
 {
   char *entry = ((char **) menu->data)[num];
 
@@ -95,7 +95,7 @@ static void history_menu(char *buf, size_t buflen, char **matches, int match_cou
   snprintf(title, sizeof(title), _("History '%s'"), buf);
 
   struct Menu *menu = mutt_menu_new(MENU_GENERIC);
-  menu->menu_make_entry = history_entry;
+  menu->menu_make_entry = history_make_entry;
   menu->title = title;
   menu->help = mutt_compile_help(helpstr, sizeof(helpstr), MENU_GENERIC, HistoryHelp);
   mutt_menu_push_current(menu);
index fb0cdb7171c7661e99e40e0a44ad9b847c8a20be..4188a5e3b36cc59631bd58f2576b4cbe7116470e 100644 (file)
@@ -3150,13 +3150,13 @@ static const char *crypt_format_str(char *buf, size_t buflen, size_t col, int co
 }
 
 /**
- * crypt_entry - Format a menu item for the key selection list
+ * crypt_make_entry - Format a menu item for the key selection list
  * @param[out] buf    Buffer in which to save string
  * @param[in]  buflen Buffer length
  * @param[in]  menu   Menu containing aliases
  * @param[in]  num    Index into the menu
  */
-static void crypt_entry(char *buf, size_t buflen, struct Menu *menu, int num)
+static void crypt_make_entry(char *buf, size_t buflen, struct Menu *menu, int num)
 {
   struct CryptKeyInfo **key_table = menu->data;
   struct CryptEntry entry;
@@ -4357,7 +4357,7 @@ static struct CryptKeyInfo *crypt_select_key(struct CryptKeyInfo *keys,
 
   struct Menu *menu = mutt_menu_new(menu_to_use);
   menu->max = i;
-  menu->menu_make_entry = crypt_entry;
+  menu->menu_make_entry = crypt_make_entry;
   menu->help = helpstr;
   menu->data = key_table;
   mutt_menu_push_current(menu);
index 047b1e16fe0c590c54e9d4b1c3da185969926cfb..5daf747b0121eca95f83a61e035fd4190e2bf5ec 100644 (file)
@@ -326,13 +326,13 @@ static const char *pgp_entry_fmt(char *buf, size_t buflen, size_t col, int cols,
 }
 
 /**
- * pgp_entry - Format a menu item for the pgp key list
+ * pgp_make_entry - Format a menu item for the pgp key list
  * @param[out] buf    Buffer in which to save string
  * @param[in]  buflen Buffer length
  * @param[in]  menu   Menu containing aliases
  * @param[in]  num    Index into the menu
  */
-static void pgp_entry(char *buf, size_t buflen, struct Menu *menu, int num)
+static void pgp_make_entry(char *buf, size_t buflen, struct Menu *menu, int num)
 {
   struct PgpUid **KeyTable = menu->data;
   struct PgpEntry entry;
@@ -675,7 +675,7 @@ static struct PgpKeyInfo *pgp_select_key(struct PgpKeyInfo *keys,
 
   menu = mutt_menu_new(MENU_PGP);
   menu->max = i;
-  menu->menu_make_entry = pgp_entry;
+  menu->menu_make_entry = pgp_make_entry;
   menu->help = helpstr;
   menu->data = KeyTable;
   mutt_menu_push_current(menu);
index 9b66f6cde42ddcd0001ffd58215fb166ff77c969..12275a943b8e0fcd5dd8fe3b71beb9dcf807edba 100644 (file)
@@ -435,13 +435,13 @@ static char *smime_key_flags(int flags)
 }
 
 /**
- * smime_entry - Format a menu item for the smime key list
+ * smime_make_entry - Format a menu item for the smime key list
  * @param[out] buf    Buffer in which to save string
  * @param[in]  buflen Buffer length
  * @param[in]  menu   Menu containing aliases
  * @param[in]  num    Index into the menu
  */
-static void smime_entry(char *buf, size_t buflen, struct Menu *menu, int num)
+static void smime_make_entry(char *buf, size_t buflen, struct Menu *menu, int num)
 {
   struct SmimeKey **Table = menu->data;
   struct SmimeKey *this = Table[num];
@@ -567,7 +567,7 @@ static struct SmimeKey *smime_select_key(struct SmimeKey *keys, char *query)
   /* Create the menu */
   menu = mutt_menu_new(MENU_SMIME);
   menu->max = table_index;
-  menu->menu_make_entry = smime_entry;
+  menu->menu_make_entry = smime_make_entry;
   menu->help = helpstr;
   menu->data = table;
   menu->title = title;
diff --git a/pager.c b/pager.c
index 3d99cc12c5b38d9aeb543bde5ea6207142e3685e..661e1edc76ed45f30db4cc1f7d123130c1e7d2db 100644 (file)
--- a/pager.c
+++ b/pager.c
@@ -1885,10 +1885,10 @@ struct PagerRedrawData
 };
 
 /**
- * pager_menu_redraw - Redraw the pager window
+ * pager_custom_redraw - Redraw the pager window
  * @param pager_menu Pager Menu
  */
-static void pager_menu_redraw(struct Menu *pager_menu)
+static void pager_custom_redraw(struct Menu *pager_menu)
 {
   struct PagerRedrawData *rd = pager_menu->redraw_data;
   char buffer[LONG_STRING];
@@ -2291,7 +2291,7 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e
   rd.pager_window = mutt_mem_calloc(1, sizeof(struct MuttWindow));
 
   pager_menu = mutt_menu_new(MENU_PAGER);
-  pager_menu->menu_custom_redraw = pager_menu_redraw;
+  pager_menu->menu_custom_redraw = pager_custom_redraw;
   pager_menu->redraw_data = &rd;
   mutt_menu_push_current(pager_menu);
 
@@ -2299,7 +2299,7 @@ int mutt_pager(const char *banner, const char *fname, int flags, struct Pager *e
   {
     mutt_curs_set(0);
 
-    pager_menu_redraw(pager_menu);
+    pager_custom_redraw(pager_menu);
 
     if (BrailleFriendly)
     {
index 122ecec58f4c4925313dff7b792a33b4259995d0..1d10d72ca2489736ab4daaa1a1a3a9680626fc34 100644 (file)
@@ -187,13 +187,13 @@ void mutt_update_num_postponed(void)
 }
 
 /**
- * post_entry - Format a menu item for the email list
+ * post_make_entry - Format a menu item for the email list
  * @param[out] buf    Buffer in which to save string
  * @param[in]  buflen Buffer length
  * @param[in]  menu   Menu containing aliases
  * @param[in]  num    Index into the menu
  */
-static void post_entry(char *buf, size_t buflen, struct Menu *menu, int num)
+static void post_make_entry(char *buf, size_t buflen, struct Menu *menu, int num)
 {
   struct Context *ctx = menu->data;
 
@@ -212,7 +212,7 @@ static struct Email *select_msg(void)
   char helpstr[LONG_STRING];
 
   struct Menu *menu = mutt_menu_new(MENU_POST);
-  menu->menu_make_entry = post_entry;
+  menu->menu_make_entry = post_make_entry;
   menu->max = PostContext->mailbox->msg_count;
   menu->title = _("Postponed Messages");
   menu->data = PostContext;
diff --git a/query.c b/query.c
index be08ee0c6baad2c86c9401d3f9ea5e8d8f1e1bc3..d9508136af8daffd44580d15b0375496b8e95ea7 100644 (file)
--- a/query.c
+++ b/query.c
@@ -292,13 +292,13 @@ static const char *query_format_str(char *buf, size_t buflen, size_t col, int co
 }
 
 /**
- * query_entry - Format a menu item for the query list
+ * query_make_entry - Format a menu item for the query list
  * @param[out] buf    Buffer in which to save string
  * @param[in]  buflen Buffer length
  * @param[in]  menu   Menu containing aliases
  * @param[in]  num    Index into the menu
  */
-static void query_entry(char *buf, size_t buflen, struct Menu *menu, int num)
+static void query_make_entry(char *buf, size_t buflen, struct Menu *menu, int num)
 {
   struct Entry *entry = &((struct Entry *) menu->data)[num];
 
@@ -352,7 +352,7 @@ static void query_menu(char *buf, size_t buflen, struct Query *results, bool ret
     snprintf(title, sizeof(title), _("Query '%s'"), buf);
 
     menu = mutt_menu_new(MENU_QUERY);
-    menu->menu_make_entry = query_entry;
+    menu->menu_make_entry = query_make_entry;
     menu->menu_search = query_search;
     menu->menu_tag = query_tag;
     menu->title = title;
@@ -407,7 +407,7 @@ static void query_menu(char *buf, size_t buflen, struct Query *results, bool ret
               mutt_menu_pop_current(menu);
               mutt_menu_destroy(&menu);
               menu = mutt_menu_new(MENU_QUERY);
-              menu->menu_make_entry = query_entry;
+              menu->menu_make_entry = query_make_entry;
               menu->menu_search = query_search;
               menu->menu_tag = query_tag;
               menu->title = title;
index 605ba2fea70f2c9b7631a634a5ecbb7908fad6bf..a3936512aacc5ecb01d9bf5fdbc8f9736c5b9221 100644 (file)
@@ -416,13 +416,13 @@ const char *attach_format_str(char *buf, size_t buflen, size_t col, int cols,
 }
 
 /**
- * attach_entry - Format a menu item for the attachment list
+ * attach_make_entry - Format a menu item for the attachment list
  * @param[out] buf    Buffer in which to save string
  * @param[in]  buflen Buffer length
  * @param[in]  menu   Menu containing aliases
  * @param[in]  num    Index into the menu
  */
-static void attach_entry(char *buf, size_t buflen, struct Menu *menu, int num)
+static void attach_make_entry(char *buf, size_t buflen, struct Menu *menu, int num)
 {
   struct AttachCtx *actx = menu->data;
 
@@ -432,13 +432,13 @@ static void attach_entry(char *buf, size_t buflen, struct Menu *menu, int num)
 }
 
 /**
- * mutt_tag_attach - Tag an attachment
+ * attach_tag - Tag an attachment
  * @param menu Menu listing attachments
  * @param n    Index number of the attachment
  * @param m    Action: 0 untag, 1 tag, -1 toggle
  * @retval num Net change in number of tagged attachments
  */
-int mutt_tag_attach(struct Menu *menu, int n, int m)
+int attach_tag(struct Menu *menu, int n, int m)
 {
   struct AttachCtx *actx = menu->data;
   struct Body *cur = actx->idx[actx->v2r[n]]->content;
@@ -1325,8 +1325,8 @@ void mutt_view_attachments(struct Email *e)
 
   struct Menu *menu = mutt_menu_new(MENU_ATTACH);
   menu->title = _("Attachments");
-  menu->menu_make_entry = attach_entry;
-  menu->menu_tag = mutt_tag_attach;
+  menu->menu_make_entry = attach_make_entry;
+  menu->menu_tag = attach_tag;
   menu->help = mutt_compile_help(helpstr, sizeof(helpstr), MENU_ATTACH, AttachHelp);
   mutt_menu_push_current(menu);