if (stat (path, &s) < 0) { mutt_error (_("%s: stat: %s"), path, strerror (errno)); return (NULL); } if (!S_ISREG (s.st_mode)) { mutt_error (_("%s: not a regular file"), path); return (NULL); }
FILE *mutt_open_read (const char *path, pid_t *thepid){  FILE *f;  int len = mutt_strlen (path);  if (path[len - 1] == '|')  {    /* read from a pipe */    char *s = safe_strdup (path);    s[len - 1] = 0;    mutt_endwin (NULL);    *thepid = mutt_create_filter (s, NULL, &f, NULL);    FREE (&s);  }  else  {    f = fopen (path, "r");    *thepid = -1;  }  return (f);}