if (rfc1524_expand_command (a, newfile, type,
command, sizeof (command))) {
/* For now, editing requires a file, no piping */
mutt_error _("Mailcap compose entry requires %%s");
if (rfc1524_expand_command (a, newfile, type,
command, sizeof (command))) {
/* For now, editing requires a file, no piping */
mutt_error _("Mailcap compose entry requires %%s");
rfc1524_entry_delete(&entry);
mutt_message (_("No mailcap compose entry for %s, creating empty file."),
type);
rfc1524_entry_delete(&entry);
mutt_message (_("No mailcap compose entry for %s, creating empty file."),
type);
if (rfc1524_expand_command (a, newfile, type,
command, sizeof (command))) {
/* For now, editing requires a file, no piping */
mutt_error _("Mailcap Edit entry requires %%s");
goto bailout;
if (rfc1524_expand_command (a, newfile, type,
command, sizeof (command))) {
/* For now, editing requires a file, no piping */
mutt_error _("Mailcap Edit entry requires %%s");
goto bailout;
mutt_endwin (NULL);
if (mutt_system (command) == -1) {
mutt_error (_("Error running \"%s\"!"), command);
mutt_endwin (NULL);
if (mutt_system (command) == -1) {
mutt_error (_("Error running \"%s\"!"), command);
else if (a->type == TYPETEXT) {
/* On text, default to editor */
mutt_edit_file (NONULL (Editor), a->filename);
else if (a->type == TYPETEXT) {
/* On text, default to editor */
mutt_edit_file (NONULL (Editor), a->filename);
rfc1524_entry_delete(&entry);
mutt_error (_("No mailcap edit entry for %s"), type);
return 0;
rfc1524_entry_delete(&entry);
mutt_error (_("No mailcap edit entry for %s"), type);
return 0;
int mutt_is_autoview (BODY * b, const char *type)
{
string_list_t *t = AutoViewList;
int mutt_is_autoview (BODY * b, const char *type)
{
string_list_t *t = AutoViewList;
- snprintf (_type, sizeof (_type), "%s/%s", TYPE (b), b->subtype);
+ snprintf(_type, sizeof(_type), "%s/%s", TYPE(b), b->subtype);
if (is_message && a->hdr && (a->hdr->security & ENCRYPT) &&
!crypt_valid_passphrase (a->hdr->security))
return (rc);
if (is_message && a->hdr && (a->hdr->security & ENCRYPT) &&
!crypt_valid_passphrase (a->hdr->security))
return (rc);
snprintf (type, sizeof (type), "%s/%s", TYPE (a), a->subtype);
snprintf (type, sizeof (type), "%s/%s", TYPE (a), a->subtype);
- if (!ascii_strcasecmp ("text/plain", type) ||
- !ascii_strcasecmp ("application/postscript", type)) {
+ tok = mime_which_token(type, -1);
+ if (tok == MIME_TEXT_PLAIN || tok == MIME_APPLICATION_POSTSCRIPT) {
return (mutt_pipe_attachment (fp, a, NONULL (PrintCmd), NULL));
}
else if (mutt_can_decode (a)) {
return (mutt_pipe_attachment (fp, a, NONULL (PrintCmd), NULL));
}
else if (mutt_can_decode (a)) {