rework m_strformat so that it takes the cols number to use in case of
[apps/madmutt.git] / lib-mx / mx.c
index bd03117..96dab2c 100644 (file)
@@ -17,6 +17,7 @@
 #include <lib-ui/sidebar.h>
 
 #include "mutt.h"
+#include "pattern.h"
 #include "buffy.h"
 #include "mx.h"
 #include "mbox.h"
@@ -60,8 +61,8 @@ static mx_t const *mxfmts[] = {
 static int invoke_dotlock (const char *path, int flags, int retry)
 {
   char cmd[LONG_STRING + _POSIX_PATH_MAX];
-  char f[SHORT_STRING + _POSIX_PATH_MAX];
-  char r[SHORT_STRING];
+  char f[STRING + _POSIX_PATH_MAX];
+  char r[STRING];
 
   if (flags & DL_FL_RETRY)
     snprintf (r, sizeof (r), "-r %d ", retry ? MAXLOCKATTEMPT : 0);
@@ -566,8 +567,7 @@ void mx_fastclose_mailbox (CONTEXT * ctx)
 
   p_delete(&ctx->path);
   p_delete(&ctx->pattern);
-  if (ctx->limit_pattern)
-    mutt_pattern_free (&ctx->limit_pattern);
+  pattern_list_wipe(&ctx->limit_pattern);
   m_fclose(&ctx->fp);
   p_clear(ctx, 1);
 }
@@ -644,7 +644,7 @@ static int _mx_close_mailbox (CONTEXT * ctx, int *index_hint)
   int isSpool = 0;
   CONTEXT f;
   char mbox[_POSIX_PATH_MAX];
-  char buf[SHORT_STRING];
+  char buf[STRING];
 
   if (!ctx)
     return 0;
@@ -960,7 +960,7 @@ static int _mx_sync_mailbox (CONTEXT * ctx, int *index_hint)
   }
 
   if (ctx->deleted) {
-    char buf[SHORT_STRING];
+    char buf[STRING];
 
     snprintf (buf, sizeof (buf), ctx->deleted == 1
               ? _("Purge %d deleted message?") :