1 /* ANSI-C code produced by gperf version 3.0.3 */
2 /* Command-line: gperf -m 10 ./iconv_open-solaris.gperf */
3 /* Computed positions: -k'10' */
5 #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
6 && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
7 && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
8 && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \
9 && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \
10 && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \
11 && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \
12 && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \
13 && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \
14 && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \
15 && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \
16 && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \
17 && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \
18 && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \
19 && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \
20 && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \
21 && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \
22 && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \
23 && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \
24 && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \
25 && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \
26 && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
27 && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
28 /* The character set is not based on ISO-646. */
29 #error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
32 #line 1 "./iconv_open-solaris.gperf"
33 struct mapping
{ int standard_name
; const char vendor_name
[10 + 1]; };
35 #define TOTAL_KEYWORDS 13
36 #define MIN_WORD_LENGTH 5
37 #define MAX_WORD_LENGTH 11
38 #define MIN_HASH_VALUE 5
39 #define MAX_HASH_VALUE 19
40 /* maximum key range = 15, duplicates = 0 */
50 mapping_hash (register const char *str
, register unsigned int len
)
52 static const unsigned char asso_values
[] =
54 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
55 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
56 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
57 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
58 20, 20, 20, 20, 20, 20, 20, 20, 20, 0,
59 9, 8, 7, 6, 5, 4, 3, 2, 20, 20,
60 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
61 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
62 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
63 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
64 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
65 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
66 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
67 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
68 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
69 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
70 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
71 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
72 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
73 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
74 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
75 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
76 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
77 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
78 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
79 20, 20, 20, 20, 20, 20
81 register int hval
= len
;
86 hval
+= asso_values
[(unsigned char)str
[9]];
100 char stringpool_str5
[sizeof("ASCII")];
101 char stringpool_str6
[sizeof("CP1251")];
102 char stringpool_str7
[sizeof("$ abc")];
103 char stringpool_str10
[sizeof("ISO-8859-1")];
104 char stringpool_str11
[sizeof("ISO-8859-15")];
105 char stringpool_str12
[sizeof("ISO-8859-9")];
106 char stringpool_str13
[sizeof("ISO-8859-8")];
107 char stringpool_str14
[sizeof("ISO-8859-7")];
108 char stringpool_str15
[sizeof("ISO-8859-6")];
109 char stringpool_str16
[sizeof("ISO-8859-5")];
110 char stringpool_str17
[sizeof("ISO-8859-4")];
111 char stringpool_str18
[sizeof("ISO-8859-3")];
112 char stringpool_str19
[sizeof("ISO-8859-2")];
114 static const struct stringpool_t stringpool_contents
=
130 #define stringpool ((const char *) &stringpool_contents)
132 static const struct mapping mappings
[] =
134 {-1}, {-1}, {-1}, {-1}, {-1},
135 #line 19 "./iconv_open-solaris.gperf"
136 {(int)(long)&((struct stringpool_t
*)0)->stringpool_str5
, "646"},
137 #line 30 "./iconv_open-solaris.gperf"
138 {(int)(long)&((struct stringpool_t
*)0)->stringpool_str6
, "ansi-1251"},
139 #line 18 "./iconv_open-solaris.gperf"
140 {(int)(long)&((struct stringpool_t
*)0)->stringpool_str7
},
142 #line 20 "./iconv_open-solaris.gperf"
143 {(int)(long)&((struct stringpool_t
*)0)->stringpool_str10
, "ISO8859-1"},
144 #line 29 "./iconv_open-solaris.gperf"
145 {(int)(long)&((struct stringpool_t
*)0)->stringpool_str11
, "ISO8859-15"},
146 #line 28 "./iconv_open-solaris.gperf"
147 {(int)(long)&((struct stringpool_t
*)0)->stringpool_str12
, "ISO8859-9"},
148 #line 27 "./iconv_open-solaris.gperf"
149 {(int)(long)&((struct stringpool_t
*)0)->stringpool_str13
, "ISO8859-8"},
150 #line 26 "./iconv_open-solaris.gperf"
151 {(int)(long)&((struct stringpool_t
*)0)->stringpool_str14
, "ISO8859-7"},
152 #line 25 "./iconv_open-solaris.gperf"
153 {(int)(long)&((struct stringpool_t
*)0)->stringpool_str15
, "ISO8859-6"},
154 #line 24 "./iconv_open-solaris.gperf"
155 {(int)(long)&((struct stringpool_t
*)0)->stringpool_str16
, "ISO8859-5"},
156 #line 23 "./iconv_open-solaris.gperf"
157 {(int)(long)&((struct stringpool_t
*)0)->stringpool_str17
, "ISO8859-4"},
158 #line 22 "./iconv_open-solaris.gperf"
159 {(int)(long)&((struct stringpool_t
*)0)->stringpool_str18
, "ISO8859-3"},
160 #line 21 "./iconv_open-solaris.gperf"
161 {(int)(long)&((struct stringpool_t
*)0)->stringpool_str19
, "ISO8859-2"}
166 #ifdef __GNUC_STDC_INLINE__
167 __attribute__ ((__gnu_inline__
))
170 const struct mapping
*
171 mapping_lookup (register const char *str
, register unsigned int len
)
173 if (len
<= MAX_WORD_LENGTH
&& len
>= MIN_WORD_LENGTH
)
175 register int key
= mapping_hash (str
, len
);
177 if (key
<= MAX_HASH_VALUE
&& key
>= 0)
179 register int o
= mappings
[key
].standard_name
;
182 register const char *s
= o
+ stringpool
;
184 if (*str
== *s
&& !strcmp (str
+ 1, s
+ 1))
185 return &mappings
[key
];