return IMAP_CMD_DONE;
return imap_code (idata->buf) ? IMAP_CMD_DONE : IMAP_CMD_NO;
int imap_cmd_step (IMAP_DATA* idata){  unsigned int len = 0;  int c;  if (idata->status == IMAP_FATAL)  {    cmd_handle_fatal (idata);    return IMAP_CMD_FAIL;  }  /* read into buffer, expanding buffer as necessary until we have a full   * line */  do  {    if (len == idata->blen)    {      safe_realloc ((void**) &idata->buf, idata->blen + IMAP_CMD_BUFSIZE);      idata->blen = idata->blen + IMAP_CMD_BUFSIZE;      dprint (3, (debugfile, "imap_cmd_step: grew buffer to %u bytes\n", idata->blen));    }    if ((c = mutt_socket_readln (idata->buf + len, idata->blen - len,      idata->conn)) < 0)    {      dprint (1, (debugfile, "imap_cmd_step: Error while reading server response, closing connection.\n"));      mutt_socket_close (idata->conn);      idata->status = IMAP_FATAL;      return IMAP_CMD_FAIL;    }    len += c;  }  /* if we've read all the way to the end of the buffer, we haven't read a   * full line (mutt_socket_readln strips the \r, so we always have at least   * one character free when we've read a full line) */  while (len == idata->blen);  /* don't let one large string make idata->buf hog memory forever */  if ((idata->blen > IMAP_CMD_BUFSIZE) && (len <= IMAP_CMD_BUFSIZE))  {    safe_realloc ((void**) &idata->buf, IMAP_CMD_BUFSIZE);    idata->blen = IMAP_CMD_BUFSIZE;    dprint (3, (debugfile, "imap_cmd_step: shrank buffer to %u bytes\n", idata->blen));  }    /* handle untagged messages. The caller still gets its shot afterwards. */  if (!strncmp (idata->buf, "* ", 2) &&      cmd_handle_untagged (idata))    return IMAP_CMD_FAIL;  /* server demands a continuation response from us */  if (!strncmp (idata->buf, "+ ", 2))    return IMAP_CMD_RESPOND;  /* tagged completion code */  if (!mutt_strncmp (idata->buf, idata->seq, SEQLEN))  {    cmd_finish (idata);    return IMAP_CMD_DONE;  }  return IMAP_CMD_CONTINUE;}