while (count > ctx->hdrmax) mx_alloc_memory (ctx);
while (count > selctx->hdrmax) mx_alloc_memory (selctx);
static int imap_exec (char *buf, size_t buflen,		      CONTEXT *ctx, const char *seq, const char *cmd, int flags){  int count;  mutt_socket_write (CTX_DATA->conn, cmd);  do  {    if (mutt_socket_read_line_d (buf, buflen, CTX_DATA->conn) < 0)      return (-1);    if (buf[0] == '*' && imap_handle_untagged (ctx, buf) != 0)      return (-1);  }  while (mutt_strncmp (buf, seq, SEQLEN) != 0);  if (!ctx->closing &&       (CTX_DATA->status == IMAP_NEW_MAIL || CTX_DATA->status == IMAP_EXPUNGE))  {    count = CTX_DATA->newMailCount;    if (CTX_DATA->status == IMAP_NEW_MAIL && count > ctx->msgcount)    {      /* read new mail messages */      dprint (1, (debugfile, "imap_exec(): new mail detected\n"));      while (count > ctx->hdrmax)	mx_alloc_memory (ctx);      count = imap_read_headers (ctx, ctx->msgcount, count - 1) + 1;    }    else    {      imap_reopen_mailbox (ctx, NULL);    }    CTX_DATA->status = 0;    mutt_clear_error ();  }  if (!imap_code (buf))  {    char *pc;    if (flags == IMAP_OK_FAIL)      return (-2);    dprint (1, (debugfile, "imap_exec(): command failed: %s\n", buf));    pc = buf + SEQLEN;    SKIPWS (pc);    pc = imap_next_word (pc);    mutt_error (pc);    sleep (1);    return (-1);  }  return 0;}