X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=attach.c;h=2b9fb0f6762bd4bd957735622a61770cabc5ad96;hp=8077ecf0400110216e06ba6e27f8d093f97fe583;hb=23976263ea635d42933503805f9eca006ae24daf;hpb=dd531b757dd6a43494d5cde51b2f0f24c6606a0e diff --git a/attach.c b/attach.c index 8077ecf..2b9fb0f 100644 --- a/attach.c +++ b/attach.c @@ -320,7 +320,7 @@ void mutt_check_lookup_list (BODY * b, char *type, int len) int mutt_is_autoview (BODY * b, const char *type) { string_list_t *t = AutoViewList; - char _type[SHORT_STRING]; + char _type[STRING]; int i; if (!type) @@ -851,6 +851,7 @@ int mutt_print_attachment (FILE * fp, BODY * a) pid_t thepid; FILE *ifp, *fpout; short unlink_newfile = 0; + int tok; snprintf (type, sizeof (type), "%s/%s", TYPE (a), a->subtype); @@ -922,8 +923,8 @@ int mutt_print_attachment (FILE * fp, BODY * a) return (1); } - 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)) {