Imported Upstream version 3.3.6
[platform/upstream/ccache.git] / src / envtoconfitems_lookup.c
1 /* ANSI-C code produced by gperf version 3.0.4 */
2 /* Command-line: gperf src/envtoconfitems.gperf  */
3 /* Computed positions: -k'1,5' */
4
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>."
30 #endif
31
32 #line 9 "src/envtoconfitems.gperf"
33 struct env_to_conf_item;
34 /* maximum key range = 42, duplicates = 0 */
35
36 #ifdef __GNUC__
37 __inline
38 #else
39 #ifdef __cplusplus
40 inline
41 #endif
42 #endif
43 static unsigned int
44 envtoconfitems_hash (register const char *str, register unsigned int len)
45 {
46   static const unsigned char asso_values[] =
47     {
48       44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
49       44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
50       44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
51       44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
52       44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
53       44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
54       44, 44, 44, 44, 44, 44, 20,  0,  0, 10,
55        0, 44,  5, 15,  0, 44, 10, 25,  9,  0,
56        5, 10,  5, 15, 10,  5, 44, 44, 44, 44,
57        0, 44, 44, 44, 44, 44, 44, 44, 44, 44,
58       44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
59       44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
60       44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
61       44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
62       44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
63       44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
64       44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
65       44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
66       44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
67       44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
68       44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
69       44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
70       44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
71       44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
72       44, 44, 44, 44, 44, 44, 44, 44, 44, 44,
73       44, 44, 44, 44, 44, 44, 44
74     };
75   register int hval = len;
76
77   switch (hval)
78     {
79       default:
80         hval += asso_values[(unsigned char)str[4]+1];
81       /*FALLTHROUGH*/
82       case 4:
83       case 3:
84       case 2:
85       case 1:
86         hval += asso_values[(unsigned char)str[0]];
87         break;
88     }
89   return hval;
90 }
91
92 static
93 #ifdef __GNUC__
94 __inline
95 #if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__
96 __attribute__ ((__gnu_inline__))
97 #endif
98 #endif
99 const struct env_to_conf_item *
100 envtoconfitems_get (register const char *str, register unsigned int len)
101 {
102   enum
103     {
104       TOTAL_KEYWORDS = 31,
105       MIN_WORD_LENGTH = 2,
106       MAX_WORD_LENGTH = 15,
107       MIN_HASH_VALUE = 2,
108       MAX_HASH_VALUE = 43
109     };
110
111   static const struct env_to_conf_item wordlist[] =
112     {
113       {"",""}, {"",""},
114 #line 12 "src/envtoconfitems.gperf"
115       {"CC", "compiler"},
116 #line 18 "src/envtoconfitems.gperf"
117       {"DIR", "cache_dir"},
118 #line 16 "src/envtoconfitems.gperf"
119       {"CPP2", "run_second_cpp"},
120       {"",""},
121 #line 19 "src/envtoconfitems.gperf"
122       {"DIRECT", "direct_mode"},
123 #line 20 "src/envtoconfitems.gperf"
124       {"DISABLE", "disable"},
125 #line 17 "src/envtoconfitems.gperf"
126       {"COMMENTS", "keep_comments_cpp"},
127 #line 31 "src/envtoconfitems.gperf"
128       {"PATH", "path"},
129 #line 41 "src/envtoconfitems.gperf"
130       {"UNIFY", "unify"},
131 #line 32 "src/envtoconfitems.gperf"
132       {"PREFIX", "prefix_command"},
133 #line 36 "src/envtoconfitems.gperf"
134       {"RECACHE", "recache"},
135 #line 13 "src/envtoconfitems.gperf"
136       {"COMPILERCHECK", "compiler_check"},
137       {"",""},
138 #line 33 "src/envtoconfitems.gperf"
139       {"PREFIX_CPP", "prefix_command_cpp"},
140 #line 30 "src/envtoconfitems.gperf"
141       {"NLEVELS", "cache_dir_levels"},
142 #line 27 "src/envtoconfitems.gperf"
143       {"LOGFILE", "log_file"},
144 #line 34 "src/envtoconfitems.gperf"
145       {"READONLY", "read_only"},
146 #line 21 "src/envtoconfitems.gperf"
147       {"EXTENSION", "cpp_extension"},
148 #line 40 "src/envtoconfitems.gperf"
149       {"UMASK", "umask"},
150       {"",""},
151 #line 24 "src/envtoconfitems.gperf"
152       {"HASHDIR", "hash_dir"},
153 #line 14 "src/envtoconfitems.gperf"
154       {"COMPRESS", "compression"},
155       {"",""},
156 #line 35 "src/envtoconfitems.gperf"
157       {"READONLY_DIRECT", "read_only_direct"},
158       {"",""},
159 #line 39 "src/envtoconfitems.gperf"
160       {"TEMPDIR", "temporary_dir"},
161 #line 15 "src/envtoconfitems.gperf"
162       {"COMPRESSLEVEL", "compression_level"},
163 #line 26 "src/envtoconfitems.gperf"
164       {"LIMIT_MULTIPLE", "limit_multiple"},
165 #line 38 "src/envtoconfitems.gperf"
166       {"STATS", "stats"},
167       {"",""},
168 #line 29 "src/envtoconfitems.gperf"
169       {"MAXSIZE", "max_size"},
170 #line 28 "src/envtoconfitems.gperf"
171       {"MAXFILES", "max_files"},
172       {"",""},
173 #line 37 "src/envtoconfitems.gperf"
174       {"SLOPPINESS", "sloppiness"},
175       {"",""},
176 #line 11 "src/envtoconfitems.gperf"
177       {"BASEDIR", "base_dir"},
178 #line 23 "src/envtoconfitems.gperf"
179       {"HARDLINK", "hard_link"},
180       {"",""},
181 #line 22 "src/envtoconfitems.gperf"
182       {"EXTRAFILES", "extra_files_to_hash"},
183       {"",""}, {"",""},
184 #line 25 "src/envtoconfitems.gperf"
185       {"IGNOREHEADERS", "ignore_headers_in_manifest"}
186     };
187
188   if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
189     {
190       register int key = envtoconfitems_hash (str, len);
191
192       if (key <= MAX_HASH_VALUE && key >= 0)
193         {
194           register const char *s = wordlist[key].env_name;
195
196           if (*str == *s && !strcmp (str + 1, s + 1))
197             return &wordlist[key];
198         }
199     }
200   return 0;
201 }
202 static const size_t ENVTOCONFITEMS_TOTAL_KEYWORDS = 31;