1 /* ANSI-C code produced by gperf version 2.7.2 */
2 /* Command-line: gperf -acCgopt -k'1,2,5,9,$' -L ANSI-C -N locfile_hash programs/locfile-kw.gperf */
3 /* Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
4 This file is part of the GNU C Library.
5 Contributed by Ulrich Drepper <drepper@gnu.org>, 1996.
7 The GNU C Library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or (at your option) any later version.
12 The GNU C Library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
17 You should have received a copy of the GNU Lesser General Public
18 License along with the GNU C Library; if not, write to the Free
19 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
24 #include "locfile-token.h"
27 #define TOTAL_KEYWORDS 175
28 #define MIN_WORD_LENGTH 3
29 #define MAX_WORD_LENGTH 22
30 #define MIN_HASH_VALUE 3
31 #define MAX_HASH_VALUE 687
32 /* maximum key range = 685, duplicates = 0 */
42 hash (register const char *str
, register unsigned int len
)
44 static const unsigned short asso_values
[] =
46 688, 688, 688, 688, 688, 688, 688, 688, 688, 688,
47 688, 688, 688, 688, 688, 688, 688, 688, 688, 688,
48 688, 688, 688, 688, 688, 688, 688, 688, 688, 688,
49 688, 688, 688, 688, 688, 688, 688, 688, 688, 688,
50 688, 688, 688, 688, 688, 688, 688, 688, 688, 688,
51 5, 0, 688, 688, 688, 688, 688, 688, 688, 688,
52 688, 688, 688, 688, 688, 15, 688, 0, 0, 0,
53 5, 0, 0, 0, 688, 688, 0, 688, 0, 5,
54 688, 688, 15, 0, 5, 15, 688, 688, 688, 0,
55 688, 688, 688, 688, 688, 75, 688, 0, 0, 65,
56 5, 0, 85, 40, 5, 155, 688, 10, 105, 120,
57 125, 35, 5, 20, 5, 190, 0, 125, 35, 10,
58 30, 35, 0, 688, 688, 688, 688, 688, 688, 688,
59 688, 688, 688, 688, 688, 688, 688, 688, 688, 688,
60 688, 688, 688, 688, 688, 688, 688, 688, 688, 688,
61 688, 688, 688, 688, 688, 688, 688, 688, 688, 688,
62 688, 688, 688, 688, 688, 688, 688, 688, 688, 688,
63 688, 688, 688, 688, 688, 688, 688, 688, 688, 688,
64 688, 688, 688, 688, 688, 688, 688, 688, 688, 688,
65 688, 688, 688, 688, 688, 688, 688, 688, 688, 688,
66 688, 688, 688, 688, 688, 688, 688, 688, 688, 688,
67 688, 688, 688, 688, 688, 688, 688, 688, 688, 688,
68 688, 688, 688, 688, 688, 688, 688, 688, 688, 688,
69 688, 688, 688, 688, 688, 688, 688, 688, 688, 688,
70 688, 688, 688, 688, 688, 688, 688, 688, 688, 688,
71 688, 688, 688, 688, 688, 688
73 register int hval
= len
;
79 hval
+= asso_values
[(unsigned char)str
[8]];
84 hval
+= asso_values
[(unsigned char)str
[4]];
88 hval
+= asso_values
[(unsigned char)str
[1]];
90 hval
+= asso_values
[(unsigned char)str
[0]];
93 return hval
+ asso_values
[(unsigned char)str
[len
- 1]];
99 const struct keyword_t
*
100 locfile_hash (register const char *str
, register unsigned int len
)
102 static const struct keyword_t wordlist
[] =
107 {"LC_TIME", tok_lc_time
, 0},
109 {"date", tok_date
, 0},
110 {"LC_ADDRESS", tok_lc_address
, 0},
111 {"LC_MESSAGES", tok_lc_messages
, 0},
112 {"LC_TELEPHONE", tok_lc_telephone
, 0},
113 {"LC_CTYPE", tok_lc_ctype
, 0},
114 {"era_t_fmt", tok_era_t_fmt
, 0},
115 {"print", tok_print
, 0},
116 {"height", tok_height
, 0},
117 {"LC_IDENTIFICATION", tok_lc_identification
, 0},
119 {"era_d_fmt", tok_era_d_fmt
, 0},
120 {"LC_COLLATE", tok_lc_collate
, 0},
121 {"IGNORE", tok_ignore
, 0},
122 {"LC_NAME", tok_lc_name
, 0},
123 {"backward", tok_backward
, 0},
124 {"week", tok_week
, 0},
125 {"LC_NUMERIC", tok_lc_numeric
, 0},
126 {"reorder-end", tok_reorder_end
, 0},
128 {"reorder-after", tok_reorder_after
, 0},
129 {"UNDEFINED", tok_undefined
, 0},
131 {"LC_MONETARY", tok_lc_monetary
, 0},
133 {"repertoiremap", tok_repertoiremap
, 0},
134 {"LC_MEASUREMENT", tok_lc_measurement
, 0},
136 {"LC_PAPER", tok_lc_paper
, 0},
137 {""}, {""}, {""}, {""},
140 {"yesstr", tok_yesstr
, 0},
141 {""}, {""}, {""}, {""}, {""},
142 {"toupper", tok_toupper
, 0},
143 {"era_year", tok_era_year
, 0},
145 {"order_start", tok_order_start
, 0},
146 {"tolower", tok_tolower
, 0},
148 {"graph", tok_graph
, 0},
150 {"order_end", tok_order_end
, 0},
151 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
153 {"abday", tok_abday
, 0},
155 {"yesexpr", tok_yesexpr
, 0},
157 {"t_fmt", tok_t_fmt
, 0},
158 {""}, {""}, {""}, {""},
159 {"d_fmt", tok_d_fmt
, 0},
161 {"date_fmt", tok_date_fmt
, 0},
162 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
163 {"grouping", tok_grouping
, 0},
165 {"tel_dom_fmt", tok_tel_dom_fmt
, 0},
166 {""}, {""}, {""}, {""},
167 {"era_d_t_fmt", tok_era_d_t_fmt
, 0},
168 {"contact", tok_contact
, 0},
170 {"else", tok_else
, 0},
171 {"alpha", tok_alpha
, 0},
172 {"country_ab3", tok_country_ab3
, 0},
173 {""}, {""}, {""}, {""},
174 {"country_ab2", tok_country_ab2
, 0},
175 {"country_post", tok_country_post
, 0},
177 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
180 {"blank", tok_blank
, 0},
182 {"forward", tok_forward
, 0},
183 {"audience", tok_audience
, 0},
185 {"punct", tok_punct
, 0},
186 {"define", tok_define
, 0},
187 {"abbreviation", tok_abbreviation
, 0},
189 {"copy", tok_copy
, 0},
191 {"decimal_point", tok_decimal_point
, 0},
193 {"upper", tok_upper
, 0},
195 {"category", tok_category
, 0},
197 {"conversion_rate", tok_conversion_rate
, 0},
198 {""}, {""}, {""}, {""},
199 {"lower", tok_lower
, 0},
201 {"collating-element", tok_collating_element
, 0},
202 {"duo_p_sep_by_space", tok_duo_p_sep_by_space
, 0},
204 {"title", tok_title
, 0},
206 {"timezone", tok_timezone
, 0},
208 {"digit", tok_digit
, 0},
209 {""}, {""}, {""}, {""},
210 {"postal_fmt", tok_postal_fmt
, 0},
212 {"d_t_fmt", tok_d_t_fmt
, 0},
213 {"position", tok_position
, 0},
214 {"p_sep_by_space", tok_p_sep_by_space
, 0},
215 {"nostr", tok_nostr
, 0},
216 {"noexpr", tok_noexpr
, 0},
218 {"charconv", tok_charconv
, 0},
220 {"width", tok_width
, 0},
221 {"country_car", tok_country_car
, 0},
222 {"comment_char", tok_comment_char
, 0},
223 {""}, {""}, {""}, {""},
224 {"lang_ab", tok_lang_ab
, 0},
225 {"lang_lib", tok_lang_lib
, 0},
226 {"lang_name", tok_lang_name
, 0},
227 {""}, {""}, {""}, {""},
228 {"elif", tok_elif
, 0},
230 {"xdigit", tok_xdigit
, 0},
232 {"space", tok_space
, 0},
234 {"address", tok_address
, 0},
235 {""}, {""}, {""}, {""}, {""},
236 {"name_fmt", tok_name_fmt
, 0},
238 {"t_fmt_ampm", tok_t_fmt_ampm
, 0},
240 {"name_mr", tok_name_mr
, 0},
242 {"from", tok_from
, 0},
244 {"escape_char", tok_escape_char
, 0},
245 {"duo_valid_to", tok_duo_valid_to
, 0},
246 {""}, {""}, {""}, {""}, {""}, {""}, {""},
247 {"reorder-sections-end", tok_reorder_sections_end
, 0},
249 {"reorder-sections-after", tok_reorder_sections_after
, 0},
250 {""}, {""}, {""}, {""}, {""}, {""},
251 {"territory", tok_territory
, 0},
253 {"country_name", tok_country_name
, 0},
254 {"language", tok_language
, 0},
255 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
257 {"tel_int_fmt", tok_tel_int_fmt
, 0},
258 {"mon_grouping", tok_mon_grouping
, 0},
259 {"positive_sign", tok_positive_sign
, 0},
261 {"abmon", tok_abmon
, 0},
262 {"measurement", tok_measurement
, 0},
264 {"coll_weight_max", tok_coll_weight_max
, 0},
265 {"collating-symbol", tok_collating_symbol
, 0},
266 {""}, {""}, {""}, {""},
267 {"script", tok_script
, 0},
268 {""}, {""}, {""}, {""}, {""}, {""},
269 {"cal_direction", tok_cal_direction
, 0},
270 {""}, {""}, {""}, {""},
271 {"duo_n_sep_by_space", tok_duo_n_sep_by_space
, 0},
272 {""}, {""}, {""}, {""},
274 {"translit_start", tok_translit_start
, 0},
275 {"translit_ignore", tok_translit_ignore
, 0},
277 {"translit_end", tok_translit_end
, 0},
278 {"first_weekday", tok_first_weekday
, 0},
280 {"p_sign_posn", tok_p_sign_posn
, 0},
282 {"first_workday", tok_first_workday
, 0},
283 {"n_sep_by_space", tok_n_sep_by_space
, 0},
285 {"source", tok_source
, 0},
286 {"mon_decimal_point", tok_mon_decimal_point
, 0},
287 {"symbol-equivalence", tok_symbol_equivalence
, 0},
289 {"endif", tok_endif
, 0},
291 {"duo_valid_from", tok_duo_valid_from
, 0},
292 {"default_missing", tok_default_missing
, 0},
294 {"int_p_sep_by_space", tok_int_p_sep_by_space
, 0},
296 {"alt_digits", tok_alt_digits
, 0},
298 {"duo_int_p_sep_by_space", tok_duo_int_p_sep_by_space
, 0},
300 {"duo_p_sign_posn", tok_duo_p_sign_posn
, 0},
302 {"duo_currency_symbol", tok_duo_currency_symbol
, 0},
304 {"outdigit", tok_outdigit
, 0},
305 {""}, {""}, {""}, {""},
306 {"revision", tok_revision
, 0},
307 {""}, {""}, {""}, {""},
308 {"name_gen", tok_name_gen
, 0},
310 {"email", tok_email
, 0},
312 {"uno_valid_to", tok_uno_valid_to
, 0},
313 {"negative_sign", tok_negative_sign
, 0},
314 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
316 {"alnum", tok_alnum
, 0},
317 {""}, {""}, {""}, {""}, {""},
318 {"country_num", tok_country_num
, 0},
319 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
320 {"am_pm", tok_am_pm
, 0},
322 {"mon_thousands_sep", tok_mon_thousands_sep
, 0},
323 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
324 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
325 {"currency_symbol", tok_currency_symbol
, 0},
326 {""}, {""}, {""}, {""}, {""}, {""},
327 {"country_isbn", tok_country_isbn
, 0},
328 {""}, {""}, {""}, {""},
329 {"name_ms", tok_name_ms
, 0},
330 {"name_mrs", tok_name_mrs
, 0},
331 {""}, {""}, {""}, {""},
332 {"thousands_sep", tok_thousands_sep
, 0},
334 {"cntrl", tok_cntrl
, 0},
335 {""}, {""}, {""}, {""}, {""},
336 {"n_sign_posn", tok_n_sign_posn
, 0},
337 {"include", tok_include
, 0},
339 {"ifdef", tok_ifdef
, 0},
341 {"duo_p_cs_precedes", tok_duo_p_cs_precedes
, 0},
342 {""}, {""}, {""}, {""}, {""},
343 {"p_cs_precedes", tok_p_cs_precedes
, 0},
344 {"uno_valid_from", tok_uno_valid_from
, 0},
345 {"undef", tok_undef
, 0},
347 {"int_n_sep_by_space", tok_int_n_sep_by_space
, 0},
348 {"lang_term", tok_lang_term
, 0},
350 {"duo_int_n_sep_by_space", tok_duo_int_n_sep_by_space
, 0},
352 {"duo_int_p_sign_posn", tok_duo_int_p_sign_posn
, 0},
353 {"duo_n_sign_posn", tok_duo_n_sign_posn
, 0},
354 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
355 {""}, {""}, {""}, {""}, {""}, {""},
356 {"application", tok_application
, 0},
357 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
358 {""}, {""}, {""}, {""},
359 {"int_p_sign_posn", tok_int_p_sign_posn
, 0},
360 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
361 {"duo_int_curr_symbol", tok_duo_int_curr_symbol
, 0},
362 {""}, {""}, {""}, {""}, {""},
363 {"int_prefix", tok_int_prefix
, 0},
364 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
365 {""}, {""}, {""}, {""}, {""},
366 {"duo_frac_digits", tok_duo_frac_digits
, 0},
367 {""}, {""}, {""}, {""}, {""},
368 {"duo_int_p_cs_precedes", tok_duo_int_p_cs_precedes
, 0},
369 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
370 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
372 {"frac_digits", tok_frac_digits
, 0},
374 {"charclass", tok_charclass
, 0},
375 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
377 {"duo_n_cs_precedes", tok_duo_n_cs_precedes
, 0},
379 {"int_curr_symbol", tok_int_curr_symbol
, 0},
381 {"n_cs_precedes", tok_n_cs_precedes
, 0},
383 {"int_select", tok_int_select
, 0},
384 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
385 {"duo_int_n_sign_posn", tok_duo_int_n_sign_posn
, 0},
386 {"class", tok_class
, 0},
387 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
389 {"int_p_cs_precedes", tok_int_p_cs_precedes
, 0},
390 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
392 {"duo_int_frac_digits", tok_duo_int_frac_digits
, 0},
393 {""}, {""}, {""}, {""}, {""},
394 {"int_n_sign_posn", tok_int_n_sign_posn
, 0},
396 {"name_miss", tok_name_miss
, 0},
397 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
398 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
399 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
400 {""}, {""}, {""}, {""},
401 {"duo_int_n_cs_precedes", tok_duo_int_n_cs_precedes
, 0},
402 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
403 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
404 {""}, {""}, {""}, {""}, {""},
405 {"int_frac_digits", tok_int_frac_digits
, 0},
406 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
407 {"section-symbol", tok_section_symbol
, 0},
408 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
409 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
410 {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
411 {""}, {""}, {""}, {""}, {""},
412 {"int_n_cs_precedes", tok_int_n_cs_precedes
, 0}
415 if (len
<= MAX_WORD_LENGTH
&& len
>= MIN_WORD_LENGTH
)
417 register int key
= hash (str
, len
);
419 if (key
<= MAX_HASH_VALUE
&& key
>= 0)
421 register const char *s
= wordlist
[key
].name
;
423 if (*str
== *s
&& !strncmp (str
+ 1, s
+ 1, len
- 1) && s
[len
] == '\0')
424 return &wordlist
[key
];