snprintf (mesg, sizeof (buffer), "[-- Autoview stderr of %s --]\n",
snprintf (mesg, sizeof (buffer), _("[-- Autoview stderr of %s --]\n"),
void autoview_handler (BODY *a, STATE *s){  rfc1524_entry *entry = rfc1524_new_entry ();  char buffer[LONG_STRING];  char type[STRING];  char command[LONG_STRING];  char tempfile[_POSIX_PATH_MAX] = "";  char *fname;  FILE *fpin = NULL;  FILE *fpout = NULL;  FILE *fperr = NULL;  int piped = FALSE;  pid_t thepid;  snprintf (type, sizeof (type), "%s/%s", TYPE (a), a->subtype);  rfc1524_mailcap_lookup (a, type, entry, M_AUTOVIEW);  fname = safe_strdup (a->filename);  mutt_sanitize_filename (fname);  rfc1524_expand_filename (entry->nametemplate, fname, tempfile, sizeof (tempfile));  FREE (&fname);  if (entry->command)  {    strfcpy (command, entry->command, sizeof (command));    /* rfc1524_expand_command returns 0 if the file is required */    piped = rfc1524_expand_command (a, tempfile, type, command, sizeof (command));    if (s->flags & M_DISPLAY)    {      char mesg[STRING];      snprintf (mesg, sizeof (buffer), "[-- Autoview using %s --]\n", command);      state_puts (mesg, s);      mutt_message("Invoking autoview command: %s",command);    }    if (piped)    {      thepid = mutt_create_filter (command, &fpin, &fpout, &fperr);      mutt_copy_bytes (s->fpin, fpin, a->length);      fclose (fpin);    }    else    {      if ((fpin = safe_fopen (tempfile, "w")) == NULL)      {        mutt_perror ("fopen");	rfc1524_free_entry (&entry);        return;      }      mutt_copy_bytes (s->fpin, fpin, a->length);      fclose (fpin);      thepid = mutt_create_filter (command, NULL, &fpout, &fperr);    }    if (s->prefix)    {      while (fgets (buffer, sizeof(buffer), fpout) != NULL)      {        state_puts (s->prefix, s);        state_puts (buffer, s);      }      /* check for data on stderr */      if (fgets (buffer, sizeof(buffer), fperr))       {	if (s->flags & M_DISPLAY) 	{	  char mesg[STRING];	  snprintf (mesg, sizeof (buffer), "[-- Autoview stderr of %s --]\n", 	      command);	  state_puts (mesg, s);	}	state_puts (s->prefix, s);	state_puts (buffer, s);	while (fgets (buffer, sizeof(buffer), fperr) != NULL)	{	  state_puts (s->prefix, s);	  state_puts (buffer, s);	}      }    }    else    {      mutt_copy_stream (fpout, s->fpout);      /* Check for stderr messages */      if (fgets (buffer, sizeof(buffer), fperr))      {	if (s->flags & M_DISPLAY)	{	  char mesg[STRING];	  snprintf (mesg, sizeof (buffer), "[-- Autoview stderr of %s --]\n", 	      command);	  state_puts (mesg, s);	}	state_puts (buffer, s);	mutt_copy_stream (fperr, s->fpout);      }    }    fclose (fpout);    fclose (fperr);    mutt_wait_filter (thepid);    mutt_unlink (tempfile);    if (s->flags & M_DISPLAY)       mutt_clear_error ();  }  rfc1524_free_entry (&entry);}