Changeset 708:117b3e2df651 for attach.c

Show
Ignore:
Timestamp:
1999-01-07 02:45:47 (10 years ago)
Author:
Thomas Roessler <roessler@…>
Branch:
HEAD
Message:

Updated implicit autoview handling from stable.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • attach.c

    r705 r708  
    321321} 
    322322 
    323 int mutt_is_autoview (char *type) 
     323int mutt_is_autoview (BODY *b, const char *type) 
    324324{ 
    325325  LIST *t = AutoViewList; 
     326  char _type[SHORT_STRING]; 
    326327  int i; 
    327328 
    328   if (option (OPTIMPLICITAUTOVIEW)) 
    329     return 1; 
    330  
    331   if (is_mmnoask (type)) 
    332     return 1; 
    333    
    334   while (t) 
     329  if (!type) 
     330  { 
     331    snprintf (_type, sizeof (_type), "%s/%s", TYPE (b), b->subtype); 
     332    type = _type; 
     333  } 
     334 
     335  if (mutt_needs_mailcap (b)) 
     336  { 
     337    if (option (OPTIMPLICITAUTOVIEW)) 
     338      return 1; 
     339     
     340    if (is_mmnoask (type)) 
     341      return 1; 
     342  } 
     343 
     344  for (; t; t = t->next) 
    335345  { 
    336346    i = mutt_strlen (t->data) - 1; 
     
    339349          mutt_strcasecmp (type, t->data) == 0) 
    340350      return 1; 
    341     t = t->next; 
    342351  } 
    343352