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