#include <lib-lib/ascii.h>
#include <lib-lib/str.h>
#include <lib-lib/buffer.h>
+#include <lib-lib/debug.h>
+
+#include <lib-ui/curses.h>
#include "mutt.h"
-#include "mutt_curses.h"
#include "imap_private.h"
#include "message.h"
#include "mx.h"
#endif
#include <lib-lib/macros.h>
-#include "lib/debug.h"
+#include <lib-lib/file.h>
#if HAVE_STDINT_H
#include <stdint.h>
fputs ("\n\n", fp);
/* update context with message header */
- ctx->hdrs[msgno] = mutt_new_header ();
+ ctx->hdrs[msgno] = header_new();
ctx->hdrs[msgno]->index = h.sid - 1;
if (h.sid != ctx->msgcount + 1)
debug_print (1, ("command failed: %s\n", idata->cmd.buf));
- pc = idata->cmd.buf + SEQLEN;
- SKIPWS (pc);
+ pc = vskipspaces(idata->cmd.buf + SEQLEN);
pc = imap_next_word (pc);
mutt_error ("%s", pc);
mutt_sleep (1);
char *pc;
debug_print (1, ("command failed: %s\n", idata->cmd.buf));
- pc = idata->cmd.buf + SEQLEN;
- SKIPWS (pc);
+ pc = vskipspaces(idata->cmd.buf + SEQLEN);
pc = imap_next_word (pc);
mutt_error ("%s", pc);
mutt_sleep (1);
while (keywords) {
if (msg_has_flag (mailbox_flags, keywords->data)) {
- str_cat (s, slen, keywords->data);
- str_cat (s, slen, " ");
+ m_strcat(s, slen, keywords->data);
+ m_strcat(s, slen, " ");
}
keywords = keywords->next;
}
return -1;
while (*s) {
- SKIPWS (s);
+ s = vskipspaces(s);
if (ascii_strncasecmp ("FLAGS", s, 5) == 0) {
if ((s = msg_parse_flags (h, s)) == NULL)
return -1;
}
else if (ascii_strncasecmp ("UID", s, 3) == 0) {
- s += 3;
- SKIPWS (s);
+ s = vskipspaces(s + 3);
h->data->uid = (unsigned int) atoi (s);
s = imap_next_word (s);
}
else if (ascii_strncasecmp ("INTERNALDATE", s, 12) == 0) {
- s += 12;
- SKIPWS (s);
+ s = vskipspaces(s + 12);
if (*s != '\"') {
debug_print (1, ("bogus INTERNALDATE entry: %s\n", s));
return -1;
h->received = imap_parse_date (tmp);
}
else if (ascii_strncasecmp ("RFC822.SIZE", s, 11) == 0) {
- s += 11;
- SKIPWS (s);
+ s = vskipspaces(s + 11);
ptmp = tmp;
while (isdigit ((unsigned char) *s))
*ptmp++ = *s++;
debug_print (1, ("not a FLAGS response: %s\n", s));
return NULL;
}
- s += 5;
- SKIPWS (s);
+ s = vskipspaces(s + 5);
if (*s != '(') {
debug_print (1, ("bogus FLAGS response: %s\n", s));
return NULL;
mutt_add_list (h->data->keywords, flag_word);
*s = ctmp;
}
- SKIPWS (s);
+ s = vskipspaces(s);
}
/* wrap up, or note bad flags response */