fix mutt compilation, that's ugly, but it works for now
[apps/madmutt.git] / complete.c
index bd2bb05..b9d1088 100644 (file)
 # include "config.h"
 #endif
 
-#include "mutt.h"
-#ifdef USE_IMAP
-#include "mx.h"
-#include "imap.h"
-#endif
-#ifdef USE_NNTP
-#include "nntp.h"
-#endif
-
-#include <lib-lib/str.h>
-#include <lib-lib/file.h>
-#include "lib/debug.h"
-
 #include <dirent.h>
 #include <string.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <errno.h>
 
+#include <lib-lib/str.h>
+#include <lib-lib/file.h>
+#include <lib-lib/debug.h>
+
+#include "mutt.h"
+#include "mx.h"
+#include <imap/imap.h>
+#ifdef USE_NNTP
+#include "nntp.h"
+#endif
+
 /* given a partial pathname, this routine fills in as much of the rest of the
  * path as is unique.
  *
@@ -45,9 +43,7 @@ int mutt_complete (char *s, size_t slen)
   char dirpart[_POSIX_PATH_MAX], exp_dirpart[_POSIX_PATH_MAX];
   char filepart[_POSIX_PATH_MAX];
 
-#ifdef USE_IMAP
   char imap_path[LONG_STRING];
-#endif
 
   debug_print (2, ("completing %s\n", s));
 
@@ -101,7 +97,6 @@ int mutt_complete (char *s, size_t slen)
   }
 #endif
 
-#ifdef USE_IMAP
   /* we can use '/' as a delimiter, imap_complete rewrites it */
   if (*s == '=' || *s == '+' || *s == '!') {
       const char *q = NONULL(*s == '!' ? Spoolfile : Maildir);
@@ -112,7 +107,6 @@ int mutt_complete (char *s, size_t slen)
 
   if (mx_get_magic (imap_path) == M_IMAP)
     return imap_complete (s, slen, imap_path);
-#endif
 
   if (*s == '=' || *s == '+' || *s == '!') {
     dirpart[0] = *s;