1 /* C code produced by gperf version 3.0.3 */
2 /* Command-line: gperf -S 1 -t -H wpres_key_phash -N wpres_get_key wpres.gperf  */
3 /* Computed positions: -k'4-5,7' */
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 1 "wpres.gperf"
33 
34 enum {
35 	WPRES_job_id,
36 	WPRES_type,
37 	WPRES_command,
38 	WPRES_timeout,
39 	WPRES_wait_status,
40 	WPRES_start,
41 	WPRES_stop,
42 	WPRES_outstd,
43 	WPRES_outerr,
44 	WPRES_exited_ok,
45 	WPRES_error_msg,
46 	WPRES_error_code,
47 	WPRES_runtime,
48 	WPRES_ru_utime,
49 	WPRES_ru_stime,
50 	WPRES_ru_maxrss,
51 	WPRES_ru_ixrss,
52 	WPRES_ru_idrss,
53 	WPRES_ru_isrss,
54 	WPRES_ru_minflt,
55 	WPRES_ru_majflt,
56 	WPRES_ru_nswap,
57 	WPRES_ru_inblock,
58 	WPRES_ru_oublock,
59 	WPRES_ru_msgsnd,
60 	WPRES_ru_msgrcv,
61 	WPRES_ru_nsignals,
62 	WPRES_ru_nvcsw,
63 	WPRES_ru_nivcsw,
64 };
65 #include <string.h> /* for strcmp() */
66 #line 35 "wpres.gperf"
67 struct wpres_key {
68 	const char *name;
69 	int code;
70 };
71 
72 #define TOTAL_KEYWORDS 29
73 #define MIN_WORD_LENGTH 4
74 #define MAX_WORD_LENGTH 11
75 #define MIN_HASH_VALUE 4
76 #define MAX_HASH_VALUE 64
77 /* maximum key range = 61, duplicates = 0 */
78 
79 #ifdef __GNUC__
80 __inline
81 #else
82 #ifdef __cplusplus
83 inline
84 #endif
85 #endif
86 static unsigned int
wpres_key_phash(str,len)87 wpres_key_phash (str, len)
88      register const char *str;
89      register unsigned int len;
90 {
91   static unsigned char asso_values[] =
92     {
93       65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
94       65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
95       65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
96       65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
97       65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
98       65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
99       65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
100       65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
101       65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
102       65, 65, 65, 65, 65, 15, 65, 25, 65,  3,
103       10,  0, 30,  0, 65,  0, 65, 65,  0,  0,
104        0, 20,  5, 65,  0,  5,  0,  0, 30, 65,
105       15, 65, 65, 65, 65, 65, 65, 65, 65, 65,
106       65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
107       65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
108       65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
109       65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
110       65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
111       65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
112       65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
113       65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
114       65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
115       65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
116       65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
117       65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
118       65, 65, 65, 65, 65, 65
119     };
120   register int hval = len;
121 
122   switch (hval)
123     {
124       default:
125         hval += asso_values[(unsigned char)str[6]];
126       /*FALLTHROUGH*/
127       case 6:
128       case 5:
129         hval += asso_values[(unsigned char)str[4]];
130       /*FALLTHROUGH*/
131       case 4:
132         hval += asso_values[(unsigned char)str[3]];
133         break;
134     }
135   return hval;
136 }
137 
138 #ifdef __GNUC__
139 __inline
140 #ifdef __GNUC_STDC_INLINE__
141 __attribute__ ((__gnu_inline__))
142 #endif
143 #endif
144 struct wpres_key *
wpres_get_key(str,len)145 wpres_get_key (str, len)
146      register const char *str;
147      register unsigned int len;
148 {
149   static struct wpres_key wordlist[] =
150     {
151 #line 41 "wpres.gperf"
152       {"type", WPRES_type},
153 #line 45 "wpres.gperf"
154       {"start", WPRES_start},
155 #line 48 "wpres.gperf"
156       {"outerr", WPRES_outerr},
157 #line 52 "wpres.gperf"
158       {"runtime", WPRES_runtime},
159 #line 53 "wpres.gperf"
160       {"ru_utime", WPRES_ru_utime},
161 #line 46 "wpres.gperf"
162       {"stop", WPRES_stop},
163 #line 62 "wpres.gperf"
164       {"ru_inblock", WPRES_ru_inblock},
165 #line 47 "wpres.gperf"
166       {"outstd", WPRES_outstd},
167 #line 68 "wpres.gperf"
168       {"ru_nivcsw", WPRES_ru_nivcsw},
169 #line 54 "wpres.gperf"
170       {"ru_stime", WPRES_ru_stime},
171 #line 65 "wpres.gperf"
172       {"ru_msgrcv", WPRES_ru_msgrcv},
173 #line 66 "wpres.gperf"
174       {"ru_nsignals", WPRES_ru_nsignals},
175 #line 58 "wpres.gperf"
176       {"ru_isrss", WPRES_ru_isrss},
177 #line 64 "wpres.gperf"
178       {"ru_msgsnd", WPRES_ru_msgsnd},
179 #line 40 "wpres.gperf"
180       {"job_id", WPRES_job_id},
181 #line 57 "wpres.gperf"
182       {"ru_idrss", WPRES_ru_idrss},
183 #line 49 "wpres.gperf"
184       {"exited_ok", WPRES_exited_ok},
185 #line 44 "wpres.gperf"
186       {"wait_status", WPRES_wait_status},
187 #line 43 "wpres.gperf"
188       {"timeout", WPRES_timeout},
189 #line 56 "wpres.gperf"
190       {"ru_ixrss", WPRES_ru_ixrss},
191 #line 50 "wpres.gperf"
192       {"error_msg", WPRES_error_msg},
193 #line 63 "wpres.gperf"
194       {"ru_oublock", WPRES_ru_oublock},
195 #line 51 "wpres.gperf"
196       {"error_code", WPRES_error_code},
197 #line 55 "wpres.gperf"
198       {"ru_maxrss", WPRES_ru_maxrss},
199 #line 61 "wpres.gperf"
200       {"ru_nswap", WPRES_ru_nswap},
201 #line 59 "wpres.gperf"
202       {"ru_minflt", WPRES_ru_minflt},
203 #line 42 "wpres.gperf"
204       {"command", WPRES_command},
205 #line 67 "wpres.gperf"
206       {"ru_nvcsw", WPRES_ru_nvcsw},
207 #line 60 "wpres.gperf"
208       {"ru_majflt", WPRES_ru_majflt}
209     };
210 
211   if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
212     {
213       register int key = wpres_key_phash (str, len);
214 
215       if (key <= MAX_HASH_VALUE && key >= MIN_HASH_VALUE)
216         {
217           register struct wpres_key *resword;
218 
219           switch (key - 4)
220             {
221               case 0:
222                 resword = &wordlist[0];
223                 goto compare;
224               case 1:
225                 resword = &wordlist[1];
226                 goto compare;
227               case 2:
228                 resword = &wordlist[2];
229                 goto compare;
230               case 3:
231                 resword = &wordlist[3];
232                 goto compare;
233               case 4:
234                 resword = &wordlist[4];
235                 goto compare;
236               case 5:
237                 resword = &wordlist[5];
238                 goto compare;
239               case 6:
240                 resword = &wordlist[6];
241                 goto compare;
242               case 7:
243                 resword = &wordlist[7];
244                 goto compare;
245               case 8:
246                 resword = &wordlist[8];
247                 goto compare;
248               case 9:
249                 resword = &wordlist[9];
250                 goto compare;
251               case 10:
252                 resword = &wordlist[10];
253                 goto compare;
254               case 12:
255                 resword = &wordlist[11];
256                 goto compare;
257               case 14:
258                 resword = &wordlist[12];
259                 goto compare;
260               case 15:
261                 resword = &wordlist[13];
262                 goto compare;
263               case 17:
264                 resword = &wordlist[14];
265                 goto compare;
266               case 19:
267                 resword = &wordlist[15];
268                 goto compare;
269               case 20:
270                 resword = &wordlist[16];
271                 goto compare;
272               case 22:
273                 resword = &wordlist[17];
274                 goto compare;
275               case 23:
276                 resword = &wordlist[18];
277                 goto compare;
278               case 24:
279                 resword = &wordlist[19];
280                 goto compare;
281               case 25:
282                 resword = &wordlist[20];
283                 goto compare;
284               case 26:
285                 resword = &wordlist[21];
286                 goto compare;
287               case 29:
288                 resword = &wordlist[22];
289                 goto compare;
290               case 30:
291                 resword = &wordlist[23];
292                 goto compare;
293               case 34:
294                 resword = &wordlist[24];
295                 goto compare;
296               case 35:
297                 resword = &wordlist[25];
298                 goto compare;
299               case 38:
300                 resword = &wordlist[26];
301                 goto compare;
302               case 39:
303                 resword = &wordlist[27];
304                 goto compare;
305               case 60:
306                 resword = &wordlist[28];
307                 goto compare;
308             }
309           return 0;
310         compare:
311           {
312             register const char *s = resword->name;
313 
314             if (*str == *s && !strcmp (str + 1, s + 1))
315               return resword;
316           }
317         }
318     }
319   return 0;
320 }
321