Ejemplo n.º 1
0
void mutt_pipe_message (HEADER *h)
{
  char buffer[LONG_STRING];

  buffer[0] = 0;
  if (mutt_get_field (_("Pipe to command: "), buffer, sizeof (buffer), M_CMD)
      != 0 || !buffer[0])
    return;

  mutt_expand_path (buffer, sizeof (buffer));
  _mutt_pipe_message (h, buffer,
		      option (OPTPIPEDECODE),
		      0, 
		      option (OPTPIPESPLIT),
		      PipeSep);
}
Ejemplo n.º 2
0
void mutt_print_message (HEADER *h)
{

        if (quadoption (OPT_PRINT) && (!PrintCmd || !*PrintCmd)) {
                mutt_message (_("No printing command has been defined."));
                return;
        }

        if (query_quadoption (OPT_PRINT,
                h ? _("Print message?") : _("Print tagged messages?"))
                != M_YES)
                return;

        if (_mutt_pipe_message (h, PrintCmd,
                option (OPTPRINTDECODE),
                1,
                option (OPTPRINTSPLIT),
                "\f") == 0)
                mutt_message (h ? _("Message printed") : _("Messages printed"));
        else
                mutt_message (h ? _("Message could not be printed") :
                _("Messages could not be printed"));
}