char *p;
void mh_parse_message (CONTEXT *ctx,		       const char *subdir,		       const char *fname,		       int *count,		       int isOld){  char path[_POSIX_PATH_MAX];  char *p;  FILE *f;  HEADER *h;  struct stat st;  if (subdir)    snprintf (path, sizeof (path), "%s/%s/%s", ctx->path, subdir, fname);  else    snprintf (path, sizeof (path), "%s/%s", ctx->path, fname);  if ((f = fopen (path, "r")) != NULL)  {    (*count)++;    if (!ctx->quiet && ReadInc && ((*count % ReadInc) == 0 || *count == 1))      mutt_message ("Reading %s... %d", ctx->path, *count);    if (ctx->msgcount == ctx->hdrmax)      mx_alloc_memory (ctx);    h = ctx->hdrs[ctx->msgcount] = mutt_new_header ();    if (subdir)    {      snprintf (path, sizeof (path), "%s/%s", subdir, fname);      h->path = safe_strdup (path);    }    else      h->path = safe_strdup (fname);    h->env = mutt_read_rfc822_header (f, h);    fstat (fileno (f), &st);    fclose (f);    if (!h->received)      h->received = h->date_sent;    if (h->content->length <= 0)      h->content->length = st.st_size - h->content->offset;    /* index doesn't have a whole lot of meaning for MH and maildir mailboxes,     * but this is used to find the current message after a resort in      * the `index' event loop.     */    h->index = ctx->msgcount;    if (ctx->magic == M_MAILDIR)    {      /* maildir stores its flags in the filename, so ignore the flags in       * the header of the message       */      h->old = isOld;      if ((p = strchr (h->path, ':')) != NULL && strncmp (p + 1, "2,", 2) == 0)      {	p += 3;	while (*p)	{	  switch (*p)	  {	    case 'F':	      h->flagged = 1;	      break;	    case 'S': /* seen */	      h->read = 1;	      break;	    case 'R': /* replied */	      h->replied = 1;	      break;	  }	  p++;	}      }    }    /* set flags and update context info */    mx_update_context (ctx);  }}