Nico Golde:
[apps/madmutt.git] / status.c
index 305be60..0dc5d0e 100644 (file)
--- a/status.c
+++ b/status.c
  *     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  */ 
 
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
+
 #include "mutt.h"
 #include "mutt_menu.h"
 #include "mutt_curses.h"
@@ -51,7 +55,7 @@ static char *get_sort_str (char *buf, size_t buflen, int method)
  * %s = current sorting method ($sort)
  * %S = current aux sorting method ($sort_aux)
  * %t = # of tagged messages [option]
- * %v = Mutt version 
+ * %v = Mutt-ng version 
  * %V = currently active limit pattern [option] */
 static const char *
 status_format_str (char *buf, size_t buflen, char op, const char *src,
@@ -266,7 +270,7 @@ status_format_str (char *buf, size_t buflen, char op, const char *src,
       break;
 
     case 'v':
-      snprintf (fmt, sizeof (fmt), "Mutt %%s");
+      snprintf (fmt, sizeof (fmt), "Mutt-ng %%s");
       snprintf (buf, buflen, fmt, MUTT_VERSION);
       break;
 
@@ -274,7 +278,7 @@ status_format_str (char *buf, size_t buflen, char op, const char *src,
       if (!optional)
       {
        snprintf (fmt, sizeof(fmt), "%%%ss", prefix);
-       snprintf (buf, buflen, fmt, Context ? Context->pattern : 0);
+       snprintf (buf, buflen, fmt, (Context && Context->pattern) ? Context->pattern : "");
       }
       else if (!Context || !Context->pattern)
        optional = 0;