|
|
@ -13,38 +13,38 @@ public: |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
inline unsigned int |
|
|
|
inline unsigned int |
|
|
|
ColorHash::colornamehash (const char *str, unsigned int len) |
|
|
|
ColorHash::colornamehash ( const char *str, unsigned int len) |
|
|
|
{ |
|
|
|
{ |
|
|
|
static const unsigned short asso_values[] = |
|
|
|
static const unsigned short asso_values[] = |
|
|
|
{ |
|
|
|
{ |
|
|
|
2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, |
|
|
|
4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, |
|
|
|
2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, |
|
|
|
4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, |
|
|
|
2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, |
|
|
|
4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, |
|
|
|
2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, |
|
|
|
4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, |
|
|
|
2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 666, 27, |
|
|
|
4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 800, 25, |
|
|
|
26, 23, 22, 789, 588, 587, 501, 436, 2728, 2728, |
|
|
|
20, 5, 0, 845, 785, 780, 640, 620, 4084, 4084, |
|
|
|
2728, 2728, 2728, 2728, 2728, 61, 96, 222, 98, 22, |
|
|
|
4084, 4084, 4084, 4084, 4084, 80, 0, 686, 5, 0, |
|
|
|
117, 22, 561, 559, 22, 708, 179, 301, 42, 101, |
|
|
|
260, 0, 85, 770, 20, 950, 210, 95, 160, 195, |
|
|
|
242, 46, 23, 22, 116, 171, 821, 809, 2728, 169, |
|
|
|
995, 335, 0, 0, 135, 425, 55, 863, 4084, 60, |
|
|
|
2728, 2728, 2728, 2728, 2728, 2728, 2728, 61, 96, 222, |
|
|
|
4084, 4084, 4084, 4084, 4084, 4084, 4084, 80, 0, 686, |
|
|
|
98, 22, 117, 22, 561, 559, 22, 708, 179, 301, |
|
|
|
5, 0, 260, 0, 85, 770, 20, 950, 210, 95, |
|
|
|
42, 101, 242, 46, 23, 22, 116, 171, 821, 809, |
|
|
|
160, 195, 995, 335, 0, 0, 135, 425, 55, 863, |
|
|
|
2728, 169, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, |
|
|
|
4084, 60, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, |
|
|
|
2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, |
|
|
|
4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, |
|
|
|
2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, |
|
|
|
4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, |
|
|
|
2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, |
|
|
|
4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, |
|
|
|
2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, |
|
|
|
4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, |
|
|
|
2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, |
|
|
|
4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, |
|
|
|
2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, |
|
|
|
4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, |
|
|
|
2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, |
|
|
|
4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, |
|
|
|
2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, |
|
|
|
4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, |
|
|
|
2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, |
|
|
|
4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, |
|
|
|
2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, |
|
|
|
4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, |
|
|
|
2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, |
|
|
|
4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, |
|
|
|
2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, 2728, |
|
|
|
4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, 4084, |
|
|
|
2728, 2728, 2728, 2728, 2728, 2728 |
|
|
|
4084, 4084, 4084, 4084, 4084, 4084 |
|
|
|
}; |
|
|
|
}; |
|
|
|
int hval = len; |
|
|
|
int hval = len; |
|
|
|
|
|
|
|
|
|
|
|
switch (hval) |
|
|
|
switch (hval) |
|
|
|
{ |
|
|
|
{ |
|
|
|