a whole lot of size_t -> ssize_t.
[apps/madmutt.git] / imap / browse.c
index a983c94..2cc16f8 100644 (file)
 #include <lib-lib/str.h>
 #include <lib-lib/ascii.h>
 #include <lib-lib/macros.h>
+#include <lib-lib/debug.h>
+
+#include <lib-ui/enter.h>
 
-#include "lib/debug.h"
 
 #include "mutt.h"
-#include "enter.h"
 #include "imap_private.h"
 
 /* -- forward declarations -- */
@@ -74,7 +75,7 @@ int imap_browse (char *path, struct browser_state *state)
   save_lsub = option (OPTIMAPCHECKSUBSCRIBED);
   unset_option (OPTIMAPCHECKSUBSCRIBED);
   m_strcpy(list_cmd, sizeof(list_cmd),
-           option(OPTIMAPLSUB) ? "LSUB" : "LIST");
+           option(OPTIMAPLSUB) ? "LSUB" : "string_list_t");
 
   if (!(idata = imap_conn_find (&(mx.account), 0)))
     goto fail;
@@ -194,7 +195,7 @@ int imap_browse (char *path, struct browser_state *state)
      * namespace is not "", so we have to list it explicitly. We ask the 
      * server to see if it has descendants. */
     debug_print (3, ("adding INBOX\n"));
-    if (browse_add_list_result (idata, "LIST \"\" \"INBOX\"", state, 0))
+    if (browse_add_list_result (idata, "string_list_t \"\" \"INBOX\"", state, 0))
       goto fail;
   }
 
@@ -263,7 +264,7 @@ int imap_mailbox_create (const char *folder)
 
   /* append a delimiter if necessary */
   n = m_strlen(buf);
-  if (n && (n < sizeof (buf) - 1) && (buf[n - 1] != idata->delim)) {
+  if (n && (n < ssizeof (buf) - 1) && (buf[n - 1] != idata->delim)) {
     buf[n++] = idata->delim;
     buf[n] = '\0';
   }
@@ -418,7 +419,7 @@ static void imap_add_folder (char delim, char *folder, int noselect,
   (state->entry)[state->entrylen].name = m_strdup(tmp);
 
   /* mark desc with delim in browser if it can have subfolders */
-  if (!isparent && !noinferiors && m_strlen(relpath) < sizeof (relpath) - 1) {
+  if (!isparent && !noinferiors && m_strlen(relpath) < ssizeof (relpath) - 1) {
     relpath[m_strlen(relpath) + 1] = '\0';
     relpath[m_strlen(relpath)] = delim;
   }
@@ -552,11 +553,11 @@ static int browse_verify_namespace (IMAP_DATA * idata,
      * than invisible namespaces */
     if (nsi->delim)
       snprintf (buf, sizeof (buf), "%s \"\" \"%s%c%%\"",
-                option (OPTIMAPLSUB) ? "LSUB" : "LIST", nsi->prefix,
+                option (OPTIMAPLSUB) ? "LSUB" : "string_list_t", nsi->prefix,
                 nsi->delim);
     else
       snprintf (buf, sizeof (buf), "%s \"\" \"%s%%\"",
-                option (OPTIMAPLSUB) ? "LSUB" : "LIST", nsi->prefix);
+                option (OPTIMAPLSUB) ? "LSUB" : "string_list_t", nsi->prefix);
 
     imap_cmd_start (idata, buf);