* malloc/malloc.c [MALLOC_DEBUG]: Keep track of current maximum
[glibc.git] / locale / programs / charmap-kw.h
blobd7d85774da925184b1ded59a864d1b084b9fc5a0
1 /* ANSI-C code produced by gperf version 3.0.1 */
2 /* Command-line: gperf -acCgopt -k'1,2,5,9,$' -L ANSI-C -N charmap_hash charmap-kw.gperf */
4 #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
5 && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
6 && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
7 && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \
8 && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \
9 && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \
10 && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \
11 && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \
12 && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \
13 && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \
14 && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \
15 && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \
16 && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \
17 && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \
18 && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \
19 && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \
20 && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \
21 && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \
22 && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \
23 && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \
24 && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \
25 && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
26 && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
27 /* The character set is not based on ISO-646. */
28 #error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
29 #endif
31 #line 1 "charmap-kw.gperf"
33 /* Copyright (C) 1995,1996,1997,1998,1999,2005 Free Software Foundation, Inc.
34 This file is part of the GNU C Library.
35 Contributed by Ulrich Drepper, <drepper@gnu.org>.
37 This program is free software; you can redistribute it and/or modify
38 it under the terms of the GNU General Public License version 2 as
39 published by the Free Software Foundation.
41 This program is distributed in the hope that it will be useful,
42 but WITHOUT ANY WARRANTY; without even the implied warranty of
43 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
44 GNU General Public License for more details.
46 You should have received a copy of the GNU General Public License
47 along with this program; if not, write to the Free Software Foundation,
48 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
50 #include <string.h>
52 #include "locfile-token.h"
53 #line 23 "charmap-kw.gperf"
54 struct keyword_t ;
56 #define TOTAL_KEYWORDS 17
57 #define MIN_WORD_LENGTH 3
58 #define MAX_WORD_LENGTH 14
59 #define MIN_HASH_VALUE 3
60 #define MAX_HASH_VALUE 35
61 /* maximum key range = 33, duplicates = 0 */
63 #ifdef __GNUC__
64 __inline
65 #else
66 #ifdef __cplusplus
67 inline
68 #endif
69 #endif
70 static unsigned int
71 hash (register const char *str, register unsigned int len)
73 static const unsigned char asso_values[] =
75 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
76 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
77 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
78 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
79 36, 36, 36, 36, 36, 36, 36, 36, 25, 20,
80 15, 10, 36, 36, 36, 36, 36, 36, 36, 36,
81 36, 36, 36, 36, 36, 36, 36, 5, 0, 0,
82 5, 36, 0, 0, 36, 36, 36, 5, 0, 36,
83 0, 36, 0, 36, 0, 36, 36, 0, 36, 36,
84 36, 36, 36, 36, 36, 0, 36, 5, 0, 0,
85 5, 0, 36, 5, 0, 0, 36, 36, 36, 0,
86 0, 0, 0, 0, 0, 0, 0, 0, 36, 36,
87 0, 36, 36, 36, 36, 36, 36, 36, 36, 36,
88 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
89 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
90 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
91 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
92 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
93 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
94 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
95 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
96 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
97 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
98 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
99 36, 36, 36, 36, 36, 36, 36, 36, 36, 36,
100 36, 36, 36, 36, 36, 36
102 register int hval = len;
104 switch (hval)
106 default:
107 hval += asso_values[(unsigned char)str[8]];
108 /*FALLTHROUGH*/
109 case 8:
110 case 7:
111 case 6:
112 case 5:
113 hval += asso_values[(unsigned char)str[4]];
114 /*FALLTHROUGH*/
115 case 4:
116 case 3:
117 case 2:
118 hval += asso_values[(unsigned char)str[1]];
119 /*FALLTHROUGH*/
120 case 1:
121 hval += asso_values[(unsigned char)str[0]];
122 break;
124 return hval + asso_values[(unsigned char)str[len - 1]];
127 #ifdef __GNUC__
128 __inline
129 #endif
130 const struct keyword_t *
131 charmap_hash (register const char *str, register unsigned int len)
133 static const struct keyword_t wordlist[] =
135 {""}, {""}, {""},
136 #line 38 "charmap-kw.gperf"
137 {"END", tok_end, 0},
138 {""},
139 #line 39 "charmap-kw.gperf"
140 {"WIDTH", tok_width, 0},
141 #line 34 "charmap-kw.gperf"
142 {"escseq", tok_escseq, 1},
143 #line 36 "charmap-kw.gperf"
144 {"include", tok_include, 1},
145 {""}, {""},
146 #line 27 "charmap-kw.gperf"
147 {"mb_cur_min", tok_mb_cur_min, 1},
148 #line 28 "charmap-kw.gperf"
149 {"escape_char", tok_escape_char, 1},
150 #line 29 "charmap-kw.gperf"
151 {"comment_char", tok_comment_char, 1},
152 #line 25 "charmap-kw.gperf"
153 {"code_set_name", tok_code_set_name, 1},
154 #line 40 "charmap-kw.gperf"
155 {"WIDTH_VARIABLE", tok_width_variable, 0},
156 #line 26 "charmap-kw.gperf"
157 {"mb_cur_max", tok_mb_cur_max, 1},
158 #line 35 "charmap-kw.gperf"
159 {"addset", tok_addset, 1},
160 #line 37 "charmap-kw.gperf"
161 {"CHARMAP", tok_charmap, 0},
162 #line 41 "charmap-kw.gperf"
163 {"WIDTH_DEFAULT", tok_width_default, 0},
164 {""},
165 #line 33 "charmap-kw.gperf"
166 {"g3esc", tok_g3esc, 1},
167 {""}, {""}, {""}, {""},
168 #line 32 "charmap-kw.gperf"
169 {"g2esc", tok_g2esc, 1},
170 {""}, {""}, {""}, {""},
171 #line 31 "charmap-kw.gperf"
172 {"g1esc", tok_g1esc, 1},
173 {""}, {""}, {""}, {""},
174 #line 30 "charmap-kw.gperf"
175 {"g0esc", tok_g0esc, 1}
178 if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
180 register int key = hash (str, len);
182 if (key <= MAX_HASH_VALUE && key >= 0)
184 register const char *s = wordlist[key].name;
186 if (*str == *s && !strncmp (str + 1, s + 1, len - 1) && s[len] == '\0')
187 return &wordlist[key];
190 return 0;