]> granicus.if.org Git - neomutt/commitdiff
Add "mutt_" prefix to global sidebar functions.
authorKevin McCarthy <kevin@8t8.us>
Sat, 4 Jun 2016 18:32:08 +0000 (11:32 -0700)
committerKevin McCarthy <kevin@8t8.us>
Sat, 4 Jun 2016 18:32:08 +0000 (11:32 -0700)
Also, remove unused sb_init declaration.

buffy.c
curs_main.c
main.c
menu.c
mx.c
pager.c
sidebar.c
sidebar.h

diff --git a/buffy.c b/buffy.c
index 02e338b2f34287a7d8d24bf59becc4cd08468512..babc824fc65c9f0d948df0eed57edc46165eab9a 100644 (file)
--- a/buffy.c
+++ b/buffy.c
@@ -244,7 +244,7 @@ int mutt_parse_mailboxes (BUFFER *path, BUFFER *s, unsigned long data, BUFFER *e
       {
         tmp1=(*tmp)->next;
 #ifdef USE_SIDEBAR
-       sb_notify_mailbox (*tmp, 0);
+       mutt_sb_notify_mailbox (*tmp, 0);
 #endif
         buffy_free (tmp);
         *tmp=tmp1;
@@ -280,7 +280,7 @@ int mutt_parse_mailboxes (BUFFER *path, BUFFER *s, unsigned long data, BUFFER *e
       {
         tmp1=(*tmp)->next;
 #ifdef USE_SIDEBAR
-       sb_notify_mailbox (*tmp, 0);
+       mutt_sb_notify_mailbox (*tmp, 0);
 #endif
         buffy_free (tmp);
         *tmp=tmp1;
@@ -291,7 +291,7 @@ int mutt_parse_mailboxes (BUFFER *path, BUFFER *s, unsigned long data, BUFFER *e
     if (!*tmp) {
       *tmp = buffy_new (buf);
 #ifdef USE_SIDEBAR
-      sb_notify_mailbox (*tmp, 1);
+      mutt_sb_notify_mailbox (*tmp, 1);
 #endif
     }
 
@@ -582,7 +582,7 @@ int mutt_buffy_check (int force)
   }
   
 #ifdef USE_SIDEBAR
-  int should_refresh = sb_should_refresh();
+  int should_refresh = mutt_sb_should_refresh();
 #endif
   for (tmp = Incoming; tmp; tmp = tmp->next)
   {
@@ -657,7 +657,7 @@ int mutt_buffy_check (int force)
   if (should_refresh)
   {
     SidebarNeedsRedraw = 1;
-    sb_set_update_time();
+    mutt_sb_set_update_time();
   }
 #endif
 
index f18debbd525ce6820ab02a550ec7a4da9f36ba22..68620fab3881929e00f64e3927f413fabe957a14 100644 (file)
@@ -623,7 +623,7 @@ int mutt_index_menu (void)
 #ifdef USE_SIDEBAR
       if (menu->redraw & REDRAW_SIDEBAR || SidebarNeedsRedraw)
       {
-        sb_set_buffystats (Context);
+        mutt_sb_set_buffystats (Context);
         menu_redraw_sidebar (menu);
       }
 #endif
@@ -1198,7 +1198,7 @@ int mutt_index_menu (void)
 #ifdef USE_SIDEBAR
         else if (op == OP_SIDEBAR_OPEN)
         {
-          const char *path = sb_get_highlight();
+          const char *path = mutt_sb_get_highlight();
           if (!path || !*path)
             break;
           strncpy (buf, path, sizeof (buf));
@@ -1227,7 +1227,7 @@ int mutt_index_menu (void)
 
        mutt_expand_path (buf, sizeof (buf));
 #ifdef USE_SIDEBAR
-       sb_set_open_buffy (buf);
+       mutt_sb_set_open_buffy (buf);
 #endif
        if (mx_get_magic (buf) <= 0)
        {
@@ -2347,7 +2347,7 @@ int mutt_index_menu (void)
       case OP_SIDEBAR_PAGE_UP:
       case OP_SIDEBAR_PREV:
       case OP_SIDEBAR_PREV_NEW:
-        sb_change_mailbox (op);
+        mutt_sb_change_mailbox (op);
         break;
 
       case OP_SIDEBAR_TOGGLE_VISIBLE:
diff --git a/main.c b/main.c
index 11e3cdcec89c2f78057286779ffe1faa2a1f2051..9effb13de42a6725c6b9f77e0b21e0fa6f4b3a47 100644 (file)
--- a/main.c
+++ b/main.c
@@ -1234,7 +1234,7 @@ int main (int argc, char **argv)
        || !explicit_folder)
     {
 #ifdef USE_SIDEBAR
-      sb_set_open_buffy (folder);
+      mutt_sb_set_open_buffy (folder);
 #endif
       mutt_index_menu ();
       if (Context)
diff --git a/menu.c b/menu.c
index 86bbed4377a84670fe5f3d24a1eb1042b7785140..3c45656b423595847e4046e3baf67a1c3ee06443 100644 (file)
--- a/menu.c
+++ b/menu.c
@@ -238,7 +238,7 @@ void menu_redraw_status (MUTTMENU *menu)
 void menu_redraw_sidebar (MUTTMENU *menu)
 {
   SidebarNeedsRedraw = 0;
-  sb_draw ();
+  mutt_sb_draw ();
 }
 #endif
 
diff --git a/mx.c b/mx.c
index 9f3a7a991e9885749dbc1a762de0449327571a79..317bcfd4791436a302e6fb39820992d2218e63ce 100644 (file)
--- a/mx.c
+++ b/mx.c
@@ -745,7 +745,7 @@ void mx_fastclose_mailbox (CONTEXT *ctx)
     mutt_free_header (&ctx->hdrs[i]);
 #ifdef USE_SIDEBAR
   ctx->msgcount -= ctx->deleted;
-  sb_set_buffystats (ctx);
+  mutt_sb_set_buffystats (ctx);
 #endif
   FREE (&ctx->hdrs);
   FREE (&ctx->v2r);
diff --git a/pager.c b/pager.c
index d9907527575070dccad5b0e752695fee3fc9e433..1420d920c587b1da652d1c9dad42c2c763182f4b 100644 (file)
--- a/pager.c
+++ b/pager.c
@@ -1789,7 +1789,7 @@ mutt_pager (const char *banner, const char *fname, int flags, pager_t *extra)
     if ((redraw & REDRAW_SIDEBAR) || SidebarNeedsRedraw)
     {
       SidebarNeedsRedraw = 0;
-      sb_draw ();
+      mutt_sb_draw ();
     }
 #endif
 
@@ -2837,7 +2837,7 @@ search_next:
       case OP_SIDEBAR_PAGE_UP:
       case OP_SIDEBAR_PREV:
       case OP_SIDEBAR_PREV_NEW:
-       sb_change_mailbox (ch);
+       mutt_sb_change_mailbox (ch);
        break;
 
       case OP_SIDEBAR_TOGGLE_VISIBLE:
index 3722b388abf173a256d11656aff42abf3666a13c..7c07eac84acc730438c71b26b167752af01f5477 100644 (file)
--- a/sidebar.c
+++ b/sidebar.c
@@ -723,12 +723,12 @@ static void draw_sidebar (int num_rows, int num_cols, int div_width)
 
 
 /**
- * sb_draw - Completely redraw the sidebar
+ * mutt_sb_draw - Completely redraw the sidebar
  *
  * Completely refresh the sidebar region.  First draw the divider; then, for
  * each BUFFY, call make_sidebar_entry; finally blank out any remaining space.
  */
-void sb_draw (void)
+void mutt_sb_draw (void)
 {
   if (!option (OPTSIDEBAR))
     return;
@@ -753,7 +753,7 @@ void sb_draw (void)
 }
 
 /**
- * sb_should_refresh - Check if the sidebar is due to be refreshed
+ * mutt_sb_should_refresh - Check if the sidebar is due to be refreshed
  *
  * The "sidebar_refresh_time" config option allows the user to limit the frequency
  * with which the sidebar is refreshed.
@@ -762,7 +762,7 @@ void sb_draw (void)
  *     1  Yes, refresh is due
  *     0  No,  refresh happened recently
  */
-int sb_should_refresh (void)
+int mutt_sb_should_refresh (void)
 {
   if (!option (OPTSIDEBAR))
     return 0;
@@ -776,7 +776,7 @@ int sb_should_refresh (void)
 }
 
 /**
- * sb_change_mailbox - Change the selected mailbox
+ * mutt_sb_change_mailbox - Change the selected mailbox
  * @op: Operation code
  *
  * Change the selected mailbox, e.g. "Next mailbox", "Previous Mailbox
@@ -790,7 +790,7 @@ int sb_should_refresh (void)
  * OP_SIDEBAR_PAGE_DOWN, OP_SIDEBAR_PAGE_UP, OP_SIDEBAR_PREV,
  * OP_SIDEBAR_PREV_NEW.
  */
-void sb_change_mailbox (int op)
+void mutt_sb_change_mailbox (int op)
 {
   if (!option (OPTSIDEBAR))
     return;
@@ -846,13 +846,13 @@ void sb_change_mailbox (int op)
 }
 
 /**
- * sb_set_buffystats - Update the BUFFY's message counts from the CONTEXT
+ * mutt_sb_set_buffystats - Update the BUFFY's message counts from the CONTEXT
  * @ctx:  A mailbox CONTEXT
  *
  * Given a mailbox CONTEXT, find a matching mailbox BUFFY and copy the message
  * counts into it.
  */
-void sb_set_buffystats (const CONTEXT *ctx)
+void mutt_sb_set_buffystats (const CONTEXT *ctx)
 {
   /* Even if the sidebar's hidden,
    * we should take note of the new data. */
@@ -874,14 +874,14 @@ void sb_set_buffystats (const CONTEXT *ctx)
 }
 
 /**
- * sb_get_highlight - Get the BUFFY that's highlighted in the sidebar
+ * mutt_sb_get_highlight - Get the BUFFY that's highlighted in the sidebar
  *
  * Get the path of the mailbox that's highlighted in the sidebar.
  *
  * Returns:
  *     Mailbox path
  */
-const char *sb_get_highlight (void)
+const char *mutt_sb_get_highlight (void)
 {
   if (!option (OPTSIDEBAR))
     return NULL;
@@ -893,13 +893,13 @@ const char *sb_get_highlight (void)
 }
 
 /**
- * sb_set_open_buffy - Set the OpnBuffy based on a mailbox path
+ * mutt_sb_set_open_buffy - Set the OpnBuffy based on a mailbox path
  * @path: Mailbox path
  *
  * Search through the list of mailboxes.  If a BUFFY has a matching path, set
  * OpnBuffy to it.
  */
-BUFFY *sb_set_open_buffy (const char *path)
+BUFFY *mutt_sb_set_open_buffy (const char *path)
 {
   /* Even if the sidebar is hidden */
 
@@ -925,12 +925,12 @@ BUFFY *sb_set_open_buffy (const char *path)
 }
 
 /**
- * sb_set_update_time - Note the time that the sidebar was updated
+ * mutt_sb_set_update_time - Note the time that the sidebar was updated
  *
  * Update the timestamp representing the last sidebar update.  If the user
  * configures "sidebar_refresh_time", this will help to reduce traffic.
  */
-void sb_set_update_time (void)
+void mutt_sb_set_update_time (void)
 {
   /* XXX - should this be public? */
 
@@ -938,7 +938,7 @@ void sb_set_update_time (void)
 }
 
 /**
- * sb_notify_mailbox - The state of a BUFFY is about to change
+ * mutt_sb_notify_mailbox - The state of a BUFFY is about to change
  *
  * We receive a notification:
  *     After a new BUFFY has been created
@@ -946,7 +946,7 @@ void sb_set_update_time (void)
  *
  * Before a deletion, check that our pointers won't be invalidated.
  */
-void sb_notify_mailbox (BUFFY *b, int created)
+void mutt_sb_notify_mailbox (BUFFY *b, int created)
 {
   if (!b)
     return;
index d56b02a233994b71f25fafae15f61e54a3417335..f219d5ec1e36bd16adf6897d2aee616fbcb03b1b 100644 (file)
--- a/sidebar.h
+++ b/sidebar.h
 #include "mutt.h"
 #include "buffy.h"
 
-void         sb_change_mailbox (int op);
-void         sb_draw (void);
-const char * sb_get_highlight (void);
-void         sb_init (void);
-void         sb_notify_mailbox (BUFFY *b, int created);
-void         sb_set_buffystats (const CONTEXT *ctx);
-BUFFY *      sb_set_open_buffy (const char *path);
-void         sb_set_update_time (void);
-int          sb_should_refresh (void);
+void         mutt_sb_change_mailbox (int op);
+void         mutt_sb_draw (void);
+const char * mutt_sb_get_highlight (void);
+void         mutt_sb_notify_mailbox (BUFFY *b, int created);
+void         mutt_sb_set_buffystats (const CONTEXT *ctx);
+BUFFY *      mutt_sb_set_open_buffy (const char *path);
+void         mutt_sb_set_update_time (void);
+int          mutt_sb_should_refresh (void);
 
 #endif /* SIDEBAR_H */