Regenerate extensions hash.

This commit is contained in:
Moinak Ghosh 2014-09-12 17:00:36 +05:30
parent 3e9a46a602
commit 5a875f3174
5 changed files with 155 additions and 152 deletions

View file

@ -1689,7 +1689,7 @@ detect_type_by_data(uchar_t *buf, size_t len)
// PNM files
if (identify_pnm_type(buf, len)) {
return (TYPE_TEXT|TYPE_PNM);
return (TYPE_BINARY|TYPE_PNM);
}
// MSDOS COM types, two byte and one byte magic numbers are checked

View file

@ -23,7 +23,6 @@ struct ext_entry {
{"htm" , TYPE_TEXT|TYPE_MARKUP, 3},
{"xml" , TYPE_TEXT|TYPE_MARKUP, 3},
{"info" , TYPE_TEXT, 4},
{"ppm" , TYPE_TEXT, 3},
{"svg" , TYPE_TEXT, 3},
{"conf" , TYPE_TEXT, 4},
{"py" , TYPE_TEXT, 2},
@ -148,5 +147,10 @@ struct ext_entry {
{"3DM" , TYPE_BINARY, 3},
{"chm" , TYPE_BINARY, 3},
{"CHM" , TYPE_BINARY, 3},
{"ppm" , TYPE_BINARY|TYPE_PNM, 3},
{"pbm" , TYPE_BINARY|TYPE_PNM, 3},
{"pgm" , TYPE_BINARY|TYPE_PNM, 3},
{"pnm" , TYPE_BINARY|TYPE_PNM, 3},
{"ppn" , TYPE_BINARY|TYPE_COMPRESSED|TYPE_PACKPNM, 3},
};
#endif

View file

@ -10,7 +10,6 @@ html,TYPE_TEXT|TYPE_MARKUP
htm,TYPE_TEXT|TYPE_MARKUP
xml,TYPE_TEXT|TYPE_MARKUP
info,TYPE_TEXT
ppm,TYPE_TEXT
svg,TYPE_TEXT
conf,TYPE_TEXT
py,TYPE_TEXT
@ -138,8 +137,8 @@ ODT,TYPE_BINARY,TYPE_COMPRESSED|TYPE_COMPRESSED_ZIP
3DM,TYPE_BINARY
chm,TYPE_BINARY
CHM,TYPE_BINARY
ppm,TYPE_BINARY|TYPE_COMPRESSED|TYPE_PNM
pbm,TYPE_BINARY|TYPE_COMPRESSED|TYPE_PNM
pgm,TYPE_BINARY|TYPE_COMPRESSED|TYPE_PNM
pnm,TYPE_BINARY|TYPE_COMPRESSED|TYPE_PNM
ppm,TYPE_BINARY|TYPE_PNM
pbm,TYPE_BINARY|TYPE_PNM
pgm,TYPE_BINARY|TYPE_PNM
pnm,TYPE_BINARY|TYPE_PNM
ppn,TYPE_BINARY|TYPE_COMPRESSED|TYPE_PACKPNM

View file

@ -12,14 +12,14 @@
/* small adjustments to _a_ to make values distinct */
ub1 tab[] = {
125,0,0,220,125,0,82,82,113,0,0,113,0,0,113,125,
0,0,7,32,0,113,82,0,0,183,0,131,0,7,220,120,
0,0,0,0,85,0,0,0,0,113,125,113,0,7,22,0,
82,0,7,113,125,125,0,0,0,113,113,85,220,0,0,85,
0,82,0,0,113,0,85,183,82,88,11,85,55,113,0,0,
124,0,113,125,0,125,0,235,0,82,125,55,0,22,0,92,
0,125,113,7,0,40,0,0,82,61,0,42,0,11,177,15,
0,0,0,0,0,6,0,0,56,11,0,0,164,47,0,0,
125,0,0,220,85,0,82,87,113,0,0,113,0,0,82,125,
0,0,7,87,0,113,82,0,0,183,0,131,0,7,0,253,
0,0,0,0,85,0,113,0,0,113,125,113,0,7,22,0,
82,0,7,113,125,125,0,0,0,113,113,131,220,0,0,85,
0,87,0,0,113,0,85,183,82,88,7,88,58,113,0,0,
124,0,168,125,0,125,0,116,0,82,125,55,0,22,116,12,
0,125,113,113,0,40,0,0,42,232,0,124,0,92,183,61,
0,0,221,0,0,234,0,0,97,11,0,0,164,91,0,0,
};
/* The hash function */

View file

@ -8,7 +8,7 @@
extern ub1 tab[];
#define PHASHLEN 0x80 /* length of hash mapping table */
#define PHASHNKEYS 137 /* How many keys were hashed */
#define PHASHNKEYS 141 /* How many keys were hashed */
#define PHASHRANGE 256 /* Range any input might map to */
#define PHASHSALT 0x9e3779b9 /* internal, initialize normal hash */