int hi = 1;
int hi = 0;
int mh_open_new_message (MESSAGE *msg, CONTEXT *dest, HEADER *hdr){  int hi = 1;  int fd, n;  char *cp;  char path[_POSIX_PATH_MAX];  DIR *dirp;  struct dirent *de;  do  {    if ((dirp = opendir (dest->path)) == NULL)    {      mutt_perror (dest->path);      return (-1);    }    /* figure out what the next message number is */    while ((de = readdir (dirp)) != NULL)    {      cp = de->d_name;      while (*cp)      {	if (!isdigit ((unsigned char) *cp))	  break;	cp++;      }      if (!*cp)      {	n = atoi (de->d_name);	if (n > hi)	  hi = n;      }    }    closedir (dirp);    hi++;    snprintf (path, sizeof (path), "%s/%d", dest->path, hi);    if ((fd = open (path, O_WRONLY | O_EXCL | O_CREAT, 0600)) == -1)    {      if (errno != EEXIST)      {	mutt_perror (path);	return (-1);      }    }  }  while (fd < 0);  if ((msg->fp = fdopen (fd, "w")) == NULL)    return (-1);  return 0;}