SVN commit 675314 by orlovich: Be a bit more trusting of some tags when trying to autodetect the mimetype... ... which not uncommonly happens due to sucky servers (Common with ads -- there are some on digg.com, sports.yahoo.com...) CCBUG:61483 M +8 -5 kmimemagic.cpp --- branches/KDE/3.5/kdelibs/kio/kio/kmimemagic.cpp #675313:675314 @@ -230,6 +230,9 @@ #define L_DIFF 0x400 /* Output of diff */ #define L_OBJC 0x800 /* Objective C */ +// Note: this is not a type, it's just used to mark items that should count more +#define FLAG_STRONG 0x1000 + #define P_HTML 0 /* HTML */ #define P_C 1 /* first and foremost on UNIX */ #define P_MAKE 2 /* Makefiles */ @@ -271,10 +274,10 @@ short type; } const names[] = { { - "type) typecount[i]++; + if ((1 << i) & p->type) typecount[i]+= p->type & FLAG_STRONG ? 2 : 1; } } }