-2009-01-05 12:19 -0800 Brendan Cully <brendan@kublai.com> (1cdc8d64b55c)
+2009-01-05 15:37 -0800 Brendan Cully <brendan@kublai.com> (55a58914feb1)
+
+ * browser.c: Style fixes
+
+ * browser.c: Leave error message on screen if imap_mailbox_create
+ fails
* doc/mutt.man: Add pointer to the full manual to the front of mutt.1
2009-01-04 18:32 -0800 Emanuele Giaquinta <e.giaquinta@glauco.it> (e47d05dc2633)
- * ChangeLog, imap/util.c: Indentation fix
+ * imap/util.c: Indentation fix
2009-01-04 18:12 -0800 Brendan Cully <brendan@kublai.com> (1947c370fcd9)
return cmd_status (s) == IMAP_CMD_OK;
}
+/* imap_cmd_trailer: extra information after tagged command response if any */
+const char* imap_cmd_trailer (IMAP_DATA* idata)
+{
+ static const char* notrailer = "";
+ const char* s = idata->buf;
+
+ if (!s)
+ {
+ dprint (2, (debugfile, "imap_cmd_trailer: not a tagged response"));
+ return notrailer;
+ }
+
+ s = imap_next_word ((char *)s);
+ if (!s || (ascii_strncasecmp (s, "OK", 2) &&
+ ascii_strncasecmp (s, "NO", 2) &&
+ ascii_strncasecmp (s, "BAD", 3)))
+ {
+ dprint (2, (debugfile, "imap_cmd_trailer: not a command completion: %s",
+ idata->buf));
+ return notrailer;
+ }
+
+ s = imap_next_word ((char *)s);
+ if (!s)
+ return notrailer;
+
+ return s;
+}
+
/* imap_exec: execute a command, and wait for the response from the server.
* Also, handle untagged responses.
* Flags:
snprintf (buf, sizeof (buf), "CREATE %s", mbox);
if (imap_exec (idata, buf, 0) != 0)
+ {
+ mutt_error (_("CREATE failed: %s"), imap_cmd_trailer (idata));
return -1;
+ }
return 0;
}
int imap_cmd_step (IMAP_DATA* idata);
void imap_cmd_finish (IMAP_DATA* idata);
int imap_code (const char* s);
+const char* imap_cmd_trailer (IMAP_DATA* idata);
int imap_exec (IMAP_DATA* idata, const char* cmd, int flags);
int imap_cmd_idle (IMAP_DATA* idata);