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)) 29 #error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>." 42 #include <glog/logging.h> 66 #ifndef GPERF_DOWNCASE 67 #define GPERF_DOWNCASE 1 70 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
71 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
72 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
73 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
74 60, 61, 62, 63, 64, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
75 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
76 122, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104,
77 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
78 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
79 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149,
80 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164,
81 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179,
82 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
83 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209,
84 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224,
85 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
86 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254,
91 #ifndef GPERF_CASE_MEMCMP 92 #define GPERF_CASE_MEMCMP 1 94 gperf_case_memcmp (
register const char *s1,
register const char *s2,
register unsigned int n)
98 unsigned char c1 = gperf_downcase[(
unsigned char)*s1++];
99 unsigned char c2 = gperf_downcase[(
unsigned char)*s2++];
105 return (
int)c1 - (int)c2;
114 static inline unsigned int hash (
const char *str,
unsigned int len);
122 static const unsigned char asso_values[] =
124 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
125 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
126 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
127 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
128 134, 134, 134, 134, 134, 6, 134, 134, 134, 134,
129 134, 134, 134, 6, 134, 134, 134, 134, 44, 134,
130 134, 134, 134, 134, 134, 0, 134, 4, 32, 2,
131 64, 58, 20, 17, 134, 77, 15, 31, 16, 39,
132 51, 134, 8, 0, 2, 45, 59, 38, 10, 55,
133 31, 134, 134, 134, 134, 134, 134, 0, 134, 4,
134 32, 2, 64, 58, 20, 17, 134, 77, 15, 31,
135 16, 39, 51, 134, 8, 0, 2, 45, 59, 38,
136 10, 55, 31, 134, 134, 134, 134, 134, 134, 134,
137 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
138 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
139 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
140 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
141 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
142 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
143 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
144 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
145 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
146 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
147 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
148 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
149 134, 134, 134, 134, 134, 134
151 register int hval = len;
156 hval += asso_values[(
unsigned char)str[21]];
172 hval += asso_values[(
unsigned char)str[7]];
181 hval += asso_values[(
unsigned char)str[0]];
184 return hval + asso_values[(
unsigned char)str[len - 1]];
189 0, 0, 0, 0, 0, 3, 2, 0, 6, 7, 6, 7, 6, 0,
190 6, 5, 0, 7, 0, 0, 14, 13, 20, 7, 12, 13, 4, 11,
191 16, 8, 22, 15, 15, 13, 16, 7, 30, 3, 4, 29, 32, 15,
192 16, 5, 14, 19, 16, 10, 22, 15, 16, 7, 28, 7, 7, 8,
193 13, 6, 15, 10, 13, 6, 3, 28, 4, 8, 0, 29, 0, 5,
194 19, 13, 17, 0, 17, 15, 16, 17, 0, 12, 0, 12, 0, 7,
195 16, 17, 27, 9, 0, 10, 25, 11, 13, 9, 0, 15, 4, 0,
196 0, 4, 17, 0, 0, 7, 0, 3, 10, 9, 0, 0, 0, 0,
197 0, 3, 0, 0, 18, 0, 4, 0, 0, 0, 16, 0, 0, 0,
198 10, 0, 0, 0, 0, 19, 0, 37
203 {
""}, {
""}, {
""}, {
""}, {
""},
304 {
""}, {
""}, {
""}, {
""}, {
""},
314 {
""}, {
""}, {
""}, {
""},
325 register int key = hash (str, len);
327 if (key <= MAX_HASH_VALUE && key >= 0)
328 if (len == lengthtable[key])
330 register const char *
s = wordlist[key].
name;
332 if ((((
unsigned char)*str ^ (
unsigned char)*s) & ~32) == 0 && !
gperf_case_memcmp (str, s, len))
333 return &wordlist[key];
356 && wordlist[j].
name[0] !=
'\0') {
359 headerNames[
code] = wordlist[j].
name;
362 headerNames[code].
size());
377 static const std::string* camelcaseTable = initHeaderNames(type);
378 return camelcaseTable;
380 static const std::string* lowercaseTable = initHeaderNames(type);
381 return lowercaseTable;
HTTPCommonHeaderTableType
constexpr auto size(C const &c) -> decltype(c.size())
static const struct HTTPCommonHeaderName wordlist[]
void toLowerAscii(char *str, size_t length)
static const unsigned char lengthtable[]
static int gperf_case_memcmp(register const char *s1, register const char *s2, register unsigned int n)
static unsigned char gperf_downcase[256]
static constexpr uint64_t data[1]
#define FOLLY_FALLTHROUGH