CTX_DATA->mailbox = safe_strdup (pc);
CTX_DATA->mailbox = safe_strdup (*pc?pc:"INBOX");
int imap_open_mailbox (CONTEXT *ctx){  CONNECTION *conn;  char buf[LONG_STRING];  char bufout[LONG_STRING];  char host[SHORT_STRING];  char seq[16];  char *pc = NULL;  int count = 0;  int n;  if (imap_parse_path (ctx->path, host, sizeof (host), &pc))    return (-1);  /* create IMAP-specific state struct */  ctx->data = safe_malloc (sizeof (IMAP_DATA));  memset (ctx->data, 0, sizeof (IMAP_DATA));  CTX_DATA->mailbox = safe_strdup (pc);  conn = mutt_socket_select_connection (host, IMAP_PORT, M_NEW_SOCKET);  CTX_DATA->conn = conn;  if (conn->uses == 0)  {    if (imap_open_connection (ctx, conn))      return (-1);    conn->data = (void *)ctx;  }  conn->uses++;  mutt_message (_("Selecting %s..."), CTX_DATA->mailbox);  imap_quote_string(buf, sizeof(buf), CTX_DATA->mailbox);  imap_make_sequence (seq, sizeof (seq));  snprintf (bufout, sizeof (bufout), "%s SELECT %s\r\n", seq, buf);  mutt_socket_write (CTX_DATA->conn, bufout);  do  {    if (mutt_socket_read_line_d (buf, sizeof (buf), CTX_DATA->conn) < 0)      break;    if (buf[0] == '*')    {      pc = buf + 2;      if (isdigit (*pc))      {	char *pn = pc;	while (*pc && isdigit (*pc))	  pc++;	*pc++ = 0;	n = atoi (pn);	SKIPWS (pc);	if (mutt_strncasecmp ("EXISTS", pc, 6) == 0)	  count = n;      }      else if (imap_handle_untagged (ctx, buf) != 0)	return (-1);    }  }  while (mutt_strncmp (seq, buf, mutt_strlen (seq)) != 0);  ctx->hdrmax = count;  ctx->hdrs = safe_malloc (count * sizeof (HEADER *));  ctx->v2r = safe_malloc (count * sizeof (int));  ctx->msgcount = 0;  count=imap_read_headers (ctx, 0, count - 1) + 1;  dprint (1, (debugfile, "imap_open_mailbox(): msgcount is %d\n", ctx->msgcount));  return 0;}