Use good m_ functions, because it smell like a flower, version 2.
[apps/madmutt.git] / lib-ui / status.c
index 1f756a5..b19bf24 100644 (file)
@@ -7,28 +7,16 @@
  * please see the file GPL in the top level source directory.
  */
 
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <lib-lib/mem.h>
-#include <lib-lib/str.h>
-#include <lib-lib/macros.h>
-#include <lib-lib/mapping.h>
+#include <lib-lib/lib-lib.h>
 
 #include <lib-ui/curses.h>
 #include <lib-ui/menu.h>
+#include <lib-mx/mx.h>
 
 #include "mutt.h"
 #include "sort.h"
-#include "mx.h"
 #include "buffy.h"
 
-
-#include <string.h>
-#include <ctype.h>
-#include <unistd.h>
-
 #define SW              (option(OPTMBOXPANE)?SidebarWidth:0)
 
 static char *get_sort_str (char *buf, ssize_t buflen, int method)
@@ -82,7 +70,7 @@ static const char *status_format_str (char *buf, ssize_t buflen, char op,
 
   case 'B':
     snprintf (fmt, sizeof (fmt), "%%%ss", prefix);
-    if (Context && Context->compressinfo && Context->realpath) {
+    if (Context && Context->cinfo && Context->realpath) {
       if ((p = strrchr (Context->realpath, '/')))
         m_strcpy(tmp, sizeof(tmp), p + 1);
       else
@@ -116,17 +104,16 @@ static const char *status_format_str (char *buf, ssize_t buflen, char op,
 
   case 'f':
     snprintf (fmt, sizeof (fmt), "%%%ss", prefix);
-    if (Context && Context->compressinfo && Context->realpath) {
+    if (Context && Context->cinfo && Context->realpath) {
       m_strcpy(tmp, sizeof(tmp), Context->realpath);
       mutt_pretty_mailbox (tmp);
-    }
-    else
+    } else
     if (Context && Context->path) {
       m_strcpy(tmp, sizeof(tmp), Context->path);
       mutt_pretty_mailbox (tmp);
-    }
-    else
+    } else {
       m_strcpy(tmp, sizeof(tmp), _("(no mailbox)"));
+    }
     snprintf (buf, buflen, fmt, tmp);
     break;