denyhosts/clamscan/libclamav/iana_cctld.h

506 lines
11 KiB
C
Raw Normal View History

2022-10-22 18:41:00 +08:00
/* ANSI-C code produced by gperf version 3.0.3 */
/* Command-line: gperf -C -l -L ANSI-C -E -C -H cctld_hash -N in_cctld_set */
/* Computed positions: -k'1-2' */
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
&& ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
&& (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
&& ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \
&& ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \
&& ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \
&& ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \
&& ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \
&& ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \
&& ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \
&& ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \
&& ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \
&& ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \
&& ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \
&& ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \
&& ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \
&& ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \
&& ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \
&& ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \
&& ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \
&& ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \
&& ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
&& ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
/* The character set is not based on ISO-646. */
#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
#endif
/* maximum key range = 472, duplicates = 0 */
#ifdef __GNUC__
__inline
#else
#ifdef __cplusplus
inline
#endif
#endif
static unsigned int
cctld_hash (const char *str, unsigned int len)
{
static const unsigned short asso_values[] =
{
476, 476, 476, 476, 476, 476, 476, 476, 476, 476,
476, 476, 476, 476, 476, 476, 476, 476, 476, 476,
476, 476, 476, 476, 476, 476, 476, 476, 476, 476,
476, 476, 476, 476, 476, 476, 476, 476, 476, 476,
476, 476, 476, 476, 476, 476, 476, 476, 476, 476,
476, 476, 476, 476, 476, 476, 476, 476, 476, 476,
476, 476, 476, 476, 476, 476, 476, 476, 476, 476,
476, 476, 476, 476, 476, 476, 476, 476, 476, 476,
476, 476, 476, 476, 476, 476, 476, 476, 476, 476,
476, 476, 476, 476, 476, 476, 476, 119, 97, 33,
103, 4, 59, 115, 210, 149, 169, 143, 175, 55,
145, 89, 178, 37, 85, 18, 34, 239, 2, 73,
112, 3, 25, 10, 15, 117, 209, 229, 150, 223,
200, 78, 225, 54, 5, 215, 215, 190, 25, 23,
0, 20, 233, 234, 14, 476, 33, 204, 476, 476,
476, 476, 476, 476, 476, 476, 476, 476, 476, 476,
476, 476, 476, 476, 476, 476, 476, 476, 476, 476,
476, 476, 476, 476, 476, 476, 476, 476, 476, 476,
476, 476, 476, 476, 476, 476, 476, 476, 476, 476,
476, 476, 476, 476, 476, 476, 476, 476, 476, 476,
476, 476, 476, 476, 476, 476, 476, 476, 476, 476,
476, 476, 476, 476, 476, 476, 476, 476, 476, 476,
476, 476, 476, 476, 476, 476, 476, 476, 476, 476,
476, 476, 476, 476, 476, 476, 476, 476, 476, 476,
476, 476, 476, 476, 476, 476, 476, 476, 476, 476,
476, 476, 476, 476, 476, 476, 476, 476, 476, 476,
476, 476, 476, 476, 476, 476, 476, 476, 476, 476,
476, 476, 476, 476, 476, 476, 476, 476, 476, 476,
476
};
return len + asso_values[(unsigned char)str[1]] + asso_values[(unsigned char)str[0]+25];
}
#ifdef __GNUC__
__inline
#ifdef __GNUC_STDC_INLINE__
__attribute__ ((__gnu_inline__))
#endif
#endif
static const char *
in_cctld_set (const char *str, unsigned int len)
{
enum
{
TOTAL_KEYWORDS = 252,
MIN_WORD_LENGTH = 2,
MAX_WORD_LENGTH = 2,
MIN_HASH_VALUE = 4,
MAX_HASH_VALUE = 475
};
static const unsigned char lengthtable[] =
{
0, 0, 0, 0, 2, 2, 2, 0, 0, 2, 2, 2, 0, 0,
2, 2, 2, 0, 0, 2, 2, 0, 0, 0, 2, 2, 0, 2,
0, 2, 2, 2, 2, 0, 2, 2, 2, 2, 0, 2, 2, 2,
2, 2, 2, 2, 2, 2, 0, 0, 2, 0, 2, 0, 0, 2,
2, 2, 2, 2, 2, 2, 2, 0, 2, 0, 2, 2, 0, 2,
0, 2, 2, 0, 2, 2, 2, 2, 0, 0, 2, 2, 2, 0,
2, 2, 2, 2, 0, 2, 2, 2, 2, 0, 0, 2, 2, 2,
2, 2, 2, 2, 2, 0, 0, 2, 2, 2, 0, 2, 2, 2,
2, 0, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 0, 2,
2, 2, 0, 2, 2, 2, 2, 0, 0, 2, 2, 2, 0, 2,
0, 2, 2, 0, 2, 2, 2, 2, 0, 0, 2, 2, 2, 2,
0, 2, 2, 2, 0, 0, 2, 2, 2, 0, 0, 2, 2, 2,
0, 2, 2, 2, 2, 0, 2, 2, 2, 2, 0, 0, 0, 2,
2, 0, 0, 2, 2, 2, 0, 2, 0, 2, 2, 0, 0, 2,
2, 2, 0, 2, 2, 0, 2, 0, 0, 2, 2, 2, 2, 0,
2, 2, 2, 0, 0, 2, 0, 2, 0, 0, 2, 2, 2, 0,
0, 2, 2, 2, 0, 2, 2, 2, 2, 0, 0, 0, 2, 2,
2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 0, 2, 2, 2,
2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2,
2, 2, 0, 2, 0, 2, 2, 0, 2, 0, 2, 2, 0, 2,
2, 0, 2, 0, 0, 0, 2, 2, 2, 0, 2, 2, 0, 0,
0, 2, 2, 2, 0, 0, 2, 2, 2, 0, 0, 2, 2, 2,
0, 0, 2, 2, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0,
0, 0, 0, 2, 2, 2, 0, 0, 2, 0, 2, 0, 0, 2,
2, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0,
2, 2, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 2, 0,
0, 0, 2, 2, 2, 0, 2, 0, 2, 0, 2, 0, 2, 2,
2, 0, 2, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2,
2, 0, 0, 2, 0, 0, 0, 0, 2, 0, 2, 0, 0, 2,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0,
0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2
};
static const char * const wordlist[] =
{
"", "", "", "",
"sv",
"sy",
"se",
"", "",
"mv",
"my",
"me",
"", "",
"bv",
"by",
"be",
"", "",
"cv",
"cy",
"", "", "",
"tv",
"ms",
"",
"sz",
"",
"re",
"bs",
"ae",
"mz",
"",
"ws",
"sc",
"st",
"bz",
"",
"ye",
"mc",
"mt",
"cz",
"rs",
"mq",
"as",
"bt",
"tz",
"", "",
"cc",
"",
"az",
"", "",
"tc",
"tt",
"sm",
"lv",
"ly",
"ac",
"at",
"mm",
"",
"aq",
"",
"mf",
"bm",
"",
"yt",
"",
"bf",
"cm",
"",
"ls",
"wf",
"cf",
"tm",
"", "",
"mw",
"tf",
"am",
"",
"je",
"bw",
"af",
"sr",
"",
"lc",
"lt",
"so",
"mr",
"", "",
"tw",
"mo",
"br",
"rw",
"sb",
"aw",
"bo",
"cr",
"", "",
"sd",
"co",
"tr",
"",
"bb",
"md",
"to",
"ar",
"",
"ro",
"bd",
"ao",
"sg",
"",
"mx",
"cd",
"sa",
"mg",
"de",
"",
"td",
"ma",
"bg",
"",
"cx",
"ad",
"ba",
"cg",
"", "",
"jm",
"ca",
"tg",
"",
"ax",
"",
"lr",
"ag",
"",
"dz",
"sk",
"qa",
"sn",
"", "",
"mk",
"si",
"mn",
"lb",
"",
"gy",
"ge",
"bn",
"", "",
"ck",
"bi",
"cn",
"", "",
"tk",
"ci",
"tn",
"",
"jo",
"gs",
"sj",
"an",
"",
"dm",
"la",
"ai",
"sl",
"", "", "",
"bj",
"ml",
"", "",
"mp",
"gt",
"bl",
"",
"gq",
"",
"tj",
"cl",
"", "",
"py",
"pe",
"tl",
"",
"lk",
"tp",
"",
"al",
"", "",
"li",
"ie",
"gm",
"do",
"",
"ps",
"gf",
"sh",
"", "",
"ee",
"",
"mh",
"", "",
"is",
"ne",
"bh",
"", "",
"gw",
"pt",
"ch",
"",
"es",
"ky",
"ke",
"th",
"", "", "",
"it",
"gr",
"uy",
"iq",
"ve",
"su",
"nz",
"",
"ec",
"et",
"mu",
"pm",
"",
"gb",
"nc",
"pf",
"kz",
"us",
"",
"gd",
"cu",
"im",
"jp",
"ht",
"uz",
"zm",
"dk",
"",
"ru",
"pw",
"au",
"gg",
"",
"vc",
"",
"ga",
"om",
"",
"yu",
"",
"nf",
"pr",
"",
"zw",
"hm",
"",
"km",
"", "", "",
"fm",
"ir",
"dj",
"",
"um",
"io",
"", "", "",
"lu",
"er",
"gn",
"", "",
"kw",
"gi",
"nr",
"", "",
"id",
"no",
"pg",
"", "",
"hr",
"pa",
"kr",
"", "", "",
"fr",
"", "", "",
"fo",
"", "", "", "",
"za",
"eg",
"gl",
"", "",
"gp",
"",
"ng",
"", "",
"pk",
"na",
"pn",
"", "", "", "",
"kg",
"", "", "", "",
"in",
"", "",
"ug",
"vg",
"", "",
"ua",
"va",
"", "", "", "", "", "",
"gh",
"", "", "",
"ni",
"pl",
"hk",
"",
"hn",
"",
"kn",
"",
"fk",
"",
"ki",
"il",
"uk",
"",
"fi",
"vn",
"", "", "",
"vi",
"", "", "", "", "",
"gu",
"nl",
"", "",
"np",
"", "", "", "",
"fj",
"",
"ph",
"", "",
"kp",
"", "", "", "", "", "", "", "", "",
"", "", "", "", "", "",
"eh",
"", "", "", "", "", "", "", "", "",
"", "", "", "", "", "",
"kh",
"", "", "", "", "", "", "", "", "",
"", "", "",
"eu",
"", "", "", "", "",
"nu",
"", "", "", "", "", "", "",
"hu",
"", "", "", "", "", "", "", "", "",
"",
"vu"
};
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
{
int key = cctld_hash (str, len);
if (key <= MAX_HASH_VALUE && key >= 0)
if (len == lengthtable[key])
{
const char *s = wordlist[key];
if (*str == *s && !memcmp (str + 1, s + 1, len - 1))
return s;
}
}
return 0;
}