RegisteredHeadersHash.cci
Go to the documentation of this file.
1 /* C++ code produced by gperf version 3.0.4 */
2 /* Command-line: gperf --output-file=RegisteredHeadersHash.cci -m 100000 RegisteredHeadersHash.gperf */
3 /* Computed positions: -k'1,9,$' */
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 "RegisteredHeadersHash.gperf"
33 
34 /* AUTO GENERATED FROM RegisteredHeadersHash.gperf. DO NOT EDIT */
35 
36 /*
37  * Copyright (C) 1996-2017 The Squid Software Foundation and contributors
38  *
39  * Squid software is distributed under GPLv2+ license and includes
40  * contributions from numerous individuals and organizations.
41  * Please see the COPYING and CONTRIBUTORS files for details.
42  */
43 #line 24 "RegisteredHeadersHash.gperf"
44 struct HeaderTableRecord;
45  enum
46 {
52 };
53 
54 /* maximum key range = 107, duplicates = 0 */
55 
56 #ifndef GPERF_DOWNCASE
57 #define GPERF_DOWNCASE 1
58 static unsigned char gperf_downcase[256] =
59 {
60  0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
61  15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
62  30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
63  45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
64  60, 61, 62, 63, 64, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
65  107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
66  122, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
67  105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
68  120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
69  135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
70  150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
71  165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179,
72  180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
73  195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209,
74  210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224,
75  225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
76  240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254,
77  255
78 };
79 #endif
80 
81 #ifndef GPERF_CASE_MEMCMP
82 #define GPERF_CASE_MEMCMP 1
83 static int
84 gperf_case_memcmp (const char *s1, const char *s2, unsigned int n)
85 {
86  for (; n > 0;)
87  {
88  unsigned char c1 = gperf_downcase[(unsigned char)*s1++];
89  unsigned char c2 = gperf_downcase[(unsigned char)*s2++];
90  if (c1 == c2)
91  {
92  n--;
93  continue;
94  }
95  return (int)c1 - (int)c2;
96  }
97  return 0;
98 }
99 #endif
100 
102 {
103 private:
104  static inline unsigned int HttpHeaderHash (const char *str, unsigned int len);
105 public:
106  static const struct HeaderTableRecord *lookup (const char *str, unsigned int len);
107 };
108 
109 inline unsigned int
110 HttpHeaderHashTable::HttpHeaderHash (const char *str, unsigned int len)
111 {
112  static const unsigned char asso_values[] =
113  {
114  114, 114, 114, 114, 114, 114, 114, 114, 114, 114,
115  114, 114, 114, 114, 114, 114, 114, 114, 114, 114,
116  114, 114, 114, 114, 114, 114, 114, 114, 114, 114,
117  114, 114, 114, 114, 114, 114, 114, 114, 114, 114,
118  114, 114, 14, 114, 114, 5, 114, 114, 114, 114,
119  64, 114, 114, 14, 114, 114, 114, 114, 1, 114,
120  114, 114, 114, 114, 114, 4, 5, 15, 29, 1,
121  17, 60, 35, 19, 114, 51, 15, 42, 8, 50,
122  11, 114, 1, 19, 7, 28, 4, 41, 33, 15,
123  114, 114, 114, 114, 114, 114, 114, 4, 5, 15,
124  29, 1, 17, 60, 35, 19, 114, 51, 15, 42,
125  8, 50, 11, 114, 1, 19, 7, 28, 4, 41,
126  33, 15, 114, 114, 114, 114, 114, 114, 114, 114,
127  114, 114, 114, 114, 114, 114, 114, 114, 114, 114,
128  114, 114, 114, 114, 114, 114, 114, 114, 114, 114,
129  114, 114, 114, 114, 114, 114, 114, 114, 114, 114,
130  114, 114, 114, 114, 114, 114, 114, 114, 114, 114,
131  114, 114, 114, 114, 114, 114, 114, 114, 114, 114,
132  114, 114, 114, 114, 114, 114, 114, 114, 114, 114,
133  114, 114, 114, 114, 114, 114, 114, 114, 114, 114,
134  114, 114, 114, 114, 114, 114, 114, 114, 114, 114,
135  114, 114, 114, 114, 114, 114, 114, 114, 114, 114,
136  114, 114, 114, 114, 114, 114, 114, 114, 114, 114,
137  114, 114, 114, 114, 114, 114, 114, 114, 114, 114,
138  114, 114, 114, 114, 114, 114, 114, 114, 114, 114,
139  114, 114, 114, 114, 114, 114
140  };
141  int hval = len;
142 
143  switch (hval)
144  {
145  default:
146  hval += asso_values[(unsigned char)str[8]];
147  /*FALLTHROUGH*/
148  case 8:
149  case 7:
150  case 6:
151  case 5:
152  case 4:
153  case 3:
154  case 2:
155  case 1:
156  hval += asso_values[(unsigned char)str[0]];
157  break;
158  }
159  return hval + asso_values[(unsigned char)str[len - 1]];
160 }
161 
162 static const unsigned char lengthtable[] =
163 {
164  0, 0, 0, 0, 0, 0, 0, 5, 3, 7, 2, 3, 0, 5,
165  6, 7, 13, 6, 9, 9, 11, 6, 6, 4, 15, 7, 6, 7,
166  8, 13, 13, 8, 6, 12, 4, 12, 7, 18, 18, 10, 13, 7,
167  13, 16, 0, 19, 4, 16, 13, 10, 5, 13, 17, 10, 16, 20,
168  17, 6, 19, 16, 14, 11, 8, 4, 6, 4, 10, 18, 15, 3,
169  4, 19, 13, 14, 10, 14, 13, 12, 15, 14, 15, 12, 11, 10,
170  9, 10, 7, 15, 19, 17, 0, 13, 16, 25, 0, 0, 0, 0,
171  0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 7, 13, 0, 0,
172  0, 11
173 };
174 
175 static const struct HeaderTableRecord HttpHeaderDefinitionsTable[] =
176 {
177  {""}, {""}, {""}, {""}, {""}, {""}, {""},
178 #line 78 "RegisteredHeadersHash.gperf"
180 #line 31 "RegisteredHeadersHash.gperf"
182 #line 79 "RegisteredHeadersHash.gperf"
184 #line 85 "RegisteredHeadersHash.gperf"
186 #line 94 "RegisteredHeadersHash.gperf"
188  {""},
189 #line 86 "RegisteredHeadersHash.gperf"
191 #line 51 "RegisteredHeadersHash.gperf"
193 #line 87 "RegisteredHeadersHash.gperf"
195 #line 80 "RegisteredHeadersHash.gperf"
197 #line 26 "RegisteredHeadersHash.gperf"
199 #line 89 "RegisteredHeadersHash.gperf"
201 #line 69 "RegisteredHeadersHash.gperf"
203 #line 81 "RegisteredHeadersHash.gperf"
205 #line 71 "RegisteredHeadersHash.gperf"
207 #line 47 "RegisteredHeadersHash.gperf"
209 #line 93 "RegisteredHeadersHash.gperf"
211 #line 29 "RegisteredHeadersHash.gperf"
213 #line 109 "RegisteredHeadersHash.gperf"
215 #line 82 "RegisteredHeadersHash.gperf"
217 #line 52 "RegisteredHeadersHash.gperf"
219 #line 60 "RegisteredHeadersHash.gperf"
221 #line 35 "RegisteredHeadersHash.gperf"
223 #line 45 "RegisteredHeadersHash.gperf"
225 #line 66 "RegisteredHeadersHash.gperf"
227 #line 77 "RegisteredHeadersHash.gperf"
229 #line 38 "RegisteredHeadersHash.gperf"
231 #line 49 "RegisteredHeadersHash.gperf"
233 #line 46 "RegisteredHeadersHash.gperf"
235 #line 91 "RegisteredHeadersHash.gperf"
237 #line 72 "RegisteredHeadersHash.gperf"
239 #line 33 "RegisteredHeadersHash.gperf"
241 #line 113 "RegisteredHeadersHash.gperf"
243 #line 30 "RegisteredHeadersHash.gperf"
245 #line 97 "RegisteredHeadersHash.gperf"
247 #line 76 "RegisteredHeadersHash.gperf"
249 #line 75 "RegisteredHeadersHash.gperf"
251  {""},
252 #line 74 "RegisteredHeadersHash.gperf"
254 #line 55 "RegisteredHeadersHash.gperf"
256 #line 41 "RegisteredHeadersHash.gperf"
258 #line 101 "RegisteredHeadersHash.gperf"
260 #line 83 "RegisteredHeadersHash.gperf"
262 #line 32 "RegisteredHeadersHash.gperf"
264 #line 36 "RegisteredHeadersHash.gperf"
266 #line 105 "RegisteredHeadersHash.gperf"
268 #line 92 "RegisteredHeadersHash.gperf"
270 #line 43 "RegisteredHeadersHash.gperf"
272 #line 104 "RegisteredHeadersHash.gperf"
274 #line 58 "RegisteredHeadersHash.gperf"
276 #line 112 "RegisteredHeadersHash.gperf"
278 #line 61 "RegisteredHeadersHash.gperf"
280 #line 96 "RegisteredHeadersHash.gperf"
282 #line 27 "RegisteredHeadersHash.gperf"
284 #line 107 "RegisteredHeadersHash.gperf"
286 #line 57 "RegisteredHeadersHash.gperf"
288 #line 54 "RegisteredHeadersHash.gperf"
290 #line 70 "RegisteredHeadersHash.gperf"
292 #line 50 "RegisteredHeadersHash.gperf"
294 #line 62 "RegisteredHeadersHash.gperf"
296 #line 102 "RegisteredHeadersHash.gperf"
298 #line 103 "RegisteredHeadersHash.gperf"
300 #line 63 "RegisteredHeadersHash.gperf"
302 #line 65 "RegisteredHeadersHash.gperf"
304 #line 39 "RegisteredHeadersHash.gperf"
306 #line 100 "RegisteredHeadersHash.gperf"
308 #line 98 "RegisteredHeadersHash.gperf"
310 #line 110 "RegisteredHeadersHash.gperf"
312 #line 56 "RegisteredHeadersHash.gperf"
314 #line 64 "RegisteredHeadersHash.gperf"
316 #line 67 "RegisteredHeadersHash.gperf"
318 #line 99 "RegisteredHeadersHash.gperf"
320 #line 42 "RegisteredHeadersHash.gperf"
322 #line 106 "RegisteredHeadersHash.gperf"
324 #line 68 "RegisteredHeadersHash.gperf"
326 #line 44 "RegisteredHeadersHash.gperf"
328 #line 37 "RegisteredHeadersHash.gperf"
330 #line 53 "RegisteredHeadersHash.gperf"
332 #line 111 "RegisteredHeadersHash.gperf"
334 #line 48 "RegisteredHeadersHash.gperf"
336 #line 28 "RegisteredHeadersHash.gperf"
338 #line 34 "RegisteredHeadersHash.gperf"
340 #line 88 "RegisteredHeadersHash.gperf"
342  {""},
343 #line 108 "RegisteredHeadersHash.gperf"
345 #line 40 "RegisteredHeadersHash.gperf"
347 #line 73 "RegisteredHeadersHash.gperf"
349  {""}, {""}, {""}, {""}, {""}, {""},
350 #line 90 "RegisteredHeadersHash.gperf"
352  {""}, {""}, {""}, {""}, {""}, {""}, {""},
353 #line 95 "RegisteredHeadersHash.gperf"
355 #line 59 "RegisteredHeadersHash.gperf"
357  {""}, {""}, {""},
358 #line 84 "RegisteredHeadersHash.gperf"
360 };
361 
362 const struct HeaderTableRecord *
363 HttpHeaderHashTable::lookup (const char *str, unsigned int len)
364 {
365  if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
366  {
367  int key = HttpHeaderHash (str, len);
368 
369  if (key <= MAX_HASH_VALUE && key >= 0)
370  if (len == lengthtable[key])
371  {
372  const char *s = HttpHeaderDefinitionsTable[key].name;
373 
374  if ((((unsigned char)*str ^ (unsigned char)*s) & ~32) == 0 && !gperf_case_memcmp (str, s, len))
376  }
377  }
378  return 0;
379 }
380 #line 114 "RegisteredHeadersHash.gperf"
381 
static int gperf_case_memcmp(const char *s1, const char *s2, unsigned int n)
static const struct HeaderTableRecord * lookup(const char *str, unsigned int len)
static unsigned char gperf_downcase[256]
Definition: cf_gen.cc:55
static unsigned int HttpHeaderHash(const char *str, unsigned int len)
int unsigned int const char *desc STUB void int len
Definition: stub_fd.cc:20
bool SIGHDLR int STUB void int
Definition: stub_tools.cc:68
void const cache_key * key
#define TRANSLATE(d)
Definition: GnuRegex.c:771
static const unsigned char lengthtable[]
static const struct HeaderTableRecord HttpHeaderDefinitionsTable[]

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors