]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
SourceFormat Enforcement (#399)
authorsquidadm <squidadm@users.noreply.github.com>
Sun, 5 May 2019 06:10:32 +0000 (06:10 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Mon, 6 May 2019 06:50:10 +0000 (06:50 +0000)
src/http/RegisteredHeadersHash.cci

index 3965ff3e0474d82b812b24cd5669d005f95443fe..52035cdd6ab2c1f453fb8a45248310caff419037 100644 (file)
@@ -3,28 +3,28 @@
 /* Computed positions: -k'1,9,$' */
 
 #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
-      && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
-      && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
-      && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \
-      && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \
-      && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \
-      && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \
-      && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \
-      && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \
-      && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \
-      && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \
-      && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \
-      && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \
-      && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \
-      && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \
-      && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \
-      && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \
-      && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \
-      && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \
-      && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \
-      && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \
-      && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
-      && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
+&& ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
+&& (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
+&& ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \
+&& ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \
+&& ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \
+&& ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \
+&& ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \
+&& ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \
+&& ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \
+&& ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \
+&& ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \
+&& ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \
+&& ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \
+&& ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \
+&& ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \
+&& ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \
+&& ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \
+&& ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \
+&& ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \
+&& ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \
+&& ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
+&& ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
 /* The character set is not based on ISO-646.  */
 #error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gperf@gnu.org>."
 #endif
  */
 #line 24 "RegisteredHeadersHash.gperf"
 struct HeaderTableRecord;
-enum
-  {
+        enum
+{
     TOTAL_KEYWORDS = 89,
     MIN_WORD_LENGTH = 2,
     MAX_WORD_LENGTH = 25,
     MIN_HASH_VALUE = 13,
     MAX_HASH_VALUE = 114
-  };
+};
 
 /* maximum key range = 102, duplicates = 0 */
 
 #ifndef GPERF_DOWNCASE
 #define GPERF_DOWNCASE 1
 static unsigned char gperf_downcase[256] =
-  {
-      0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,  14,
-     15,  16,  17,  18,  19,  20,  21,  22,  23,  24,  25,  26,  27,  28,  29,
-     30,  31,  32,  33,  34,  35,  36,  37,  38,  39,  40,  41,  42,  43,  44,
-     45,  46,  47,  48,  49,  50,  51,  52,  53,  54,  55,  56,  57,  58,  59,
-     60,  61,  62,  63,  64,  97,  98,  99, 100, 101, 102, 103, 104, 105, 106,
+{
+    0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,  14,
+    15,  16,  17,  18,  19,  20,  21,  22,  23,  24,  25,  26,  27,  28,  29,
+    30,  31,  32,  33,  34,  35,  36,  37,  38,  39,  40,  41,  42,  43,  44,
+    45,  46,  47,  48,  49,  50,  51,  52,  53,  54,  55,  56,  57,  58,  59,
+    60,  61,  62,  63,  64,  97,  98,  99, 100, 101, 102, 103, 104, 105, 106,
     107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
     122,  91,  92,  93,  94,  95,  96,  97,  98,  99, 100, 101, 102, 103, 104,
     105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
@@ -75,7 +75,7 @@ static unsigned char gperf_downcase[256] =
     225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
     240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254,
     255
-  };
+};
 #endif
 
 #ifndef GPERF_CASE_MEMCMP
@@ -83,97 +83,97 @@ static unsigned char gperf_downcase[256] =
 static int
 gperf_case_memcmp (const char *s1, const char *s2, size_t n)
 {
-  for (; n > 0;)
+    for (; n > 0;)
     {
-      unsigned char c1 = gperf_downcase[(unsigned char)*s1++];
-      unsigned char c2 = gperf_downcase[(unsigned char)*s2++];
-      if (c1 == c2)
+        unsigned char c1 = gperf_downcase[(unsigned char)*s1++];
+        unsigned char c2 = gperf_downcase[(unsigned char)*s2++];
+        if (c1 == c2)
         {
-          n--;
-          continue;
+            n--;
+            continue;
         }
-      return (int)c1 - (int)c2;
+        return (int)c1 - (int)c2;
     }
-  return 0;
+    return 0;
 }
 #endif
 
 class HttpHeaderHashTable
 {
 private:
-  static inline unsigned int HttpHeaderHash (const char *str, size_t len);
+    static inline unsigned int HttpHeaderHash (const char *str, size_t len);
 public:
-  static const struct HeaderTableRecord *lookup (const char *str, size_t len);
+    static const struct HeaderTableRecord *lookup (const char *str, size_t len);
 };
 
 inline unsigned int
 HttpHeaderHashTable::HttpHeaderHash (const char *str, size_t len)
 {
-  static const unsigned char asso_values[] =
+    static const unsigned char asso_values[] =
     {
-      115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
-      115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
-      115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
-      115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
-      115, 115,  27, 115, 115,   4, 115, 115, 115, 115,
-       26, 115, 115,  33, 115, 115, 115, 115,  25, 115,
-      115, 115, 115, 115, 115,  15,   7,   7,  10,   4,
-       33,  66,  42,  22, 115,  63,  10,  33,  18,  44,
-       11, 115,   4,  28,  10,  42,  23,  26,  31,  30,
-      115, 115, 115, 115, 115, 115, 115,  15,   7,   7,
-       10,   4,  33,  66,  42,  22, 115,  63,  10,  33,
-       18,  44,  11, 115,   4,  28,  10,  42,  23,  26,
-       31,  30, 115, 115, 115, 115, 115, 115, 115, 115,
-      115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
-      115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
-      115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
-      115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
-      115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
-      115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
-      115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
-      115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
-      115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
-      115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
-      115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
-      115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
-      115, 115, 115, 115, 115, 115
+        115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
+        115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
+        115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
+        115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
+        115, 115,  27, 115, 115,   4, 115, 115, 115, 115,
+        26, 115, 115,  33, 115, 115, 115, 115,  25, 115,
+        115, 115, 115, 115, 115,  15,   7,   7,  10,   4,
+        33,  66,  42,  22, 115,  63,  10,  33,  18,  44,
+        11, 115,   4,  28,  10,  42,  23,  26,  31,  30,
+        115, 115, 115, 115, 115, 115, 115,  15,   7,   7,
+        10,   4,  33,  66,  42,  22, 115,  63,  10,  33,
+        18,  44,  11, 115,   4,  28,  10,  42,  23,  26,
+        31,  30, 115, 115, 115, 115, 115, 115, 115, 115,
+        115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
+        115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
+        115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
+        115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
+        115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
+        115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
+        115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
+        115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
+        115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
+        115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
+        115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
+        115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
+        115, 115, 115, 115, 115, 115
     };
-  unsigned int hval = len;
+    unsigned int hval = len;
 
-  switch (hval)
+    switch (hval)
     {
-      default:
+    default:
         hval += asso_values[static_cast<unsigned char>(str[8])];
-      /*FALLTHROUGH*/
-      case 8:
-      case 7:
-      case 6:
-      case 5:
-      case 4:
-      case 3:
-      case 2:
-      case 1:
+    /*FALLTHROUGH*/
+    case 8:
+    case 7:
+    case 6:
+    case 5:
+    case 4:
+    case 3:
+    case 2:
+    case 1:
         hval += asso_values[static_cast<unsigned char>(str[0])];
         break;
     }
-  return hval + asso_values[static_cast<unsigned char>(str[len - 1])];
+    return hval + asso_values[static_cast<unsigned char>(str[len - 1])];
 }
 
 static const unsigned char lengthtable[] =
-  {
-     0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  5,
-     0,  7,  2,  6,  4,  5,  6,  7,  3,  0,  6, 13,  8,  9,
+{
+    0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  5,
+    0,  7,  2,  6,  4,  5,  6,  7,  3,  0,  6, 13,  8,  9,
     13, 11, 12,  6,  6, 12,  8,  9,  8, 16,  6,  7,  7,  3,
-     7, 18,  7, 13,  5, 18, 13, 15, 16, 16, 13,  7, 19, 13,
-     4,  4, 19, 17, 15, 13,  9, 16, 10, 17, 14, 19,  6, 11,
-     4, 13,  8, 14,  4,  6, 13,  4, 15, 10, 10, 14, 20, 18,
+    7, 18,  7, 13,  5, 18, 13, 15, 16, 16, 13,  7, 19, 13,
+    4,  4, 19, 17, 15, 13,  9, 16, 10, 17, 14, 19,  6, 11,
+    4, 13,  8, 14,  4,  6, 13,  4, 15, 10, 10, 14, 20, 18,
     11, 19, 15, 11, 12, 10, 25, 12,  0, 16, 14,  0,  3, 17,
-     0,  7, 10,  0,  0,  0,  0, 10,  0, 13,  0,  0, 13, 21,
-     0, 10, 15
-  };
+    0,  7, 10,  0,  0,  0,  0, 10,  0, 13,  0,  0, 13, 21,
+    0, 10, 15
+};
 
 static const struct HeaderTableRecord HttpHeaderDefinitionsTable[] =
-  {
+{
     {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""},
     {""}, {""}, {""}, {""},
 #line 79 "RegisteredHeadersHash.gperf"
@@ -363,25 +363,25 @@ static const struct HeaderTableRecord HttpHeaderDefinitionsTable[] =
     {"FTP-Status", Http::HdrType::FTP_STATUS, Http::HdrFieldType::ftInt, HdrKind::None},
 #line 28 "RegisteredHeadersHash.gperf"
     {"Accept-Encoding", Http::HdrType::ACCEPT_ENCODING, Http::HdrFieldType::ftStr, HdrKind::ListHeader|HdrKind::RequestHeader|HdrKind::ReplyHeader}
-  };
+};
 
 const struct HeaderTableRecord *
 HttpHeaderHashTable::lookup (const char *str, size_t len)
 {
-  if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
+    if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
     {
-      unsigned int key = HttpHeaderHash (str, len);
+        unsigned int key = HttpHeaderHash (str, len);
 
-      if (key <= MAX_HASH_VALUE)
-        if (len == lengthtable[key])
-          {
-            const char *s = HttpHeaderDefinitionsTable[key].name;
+        if (key <= MAX_HASH_VALUE)
+            if (len == lengthtable[key])
+            {
+                const char *s = HttpHeaderDefinitionsTable[key].name;
 
-            if ((((unsigned char)*str ^ (unsigned char)*s) & ~32) == 0 && !gperf_case_memcmp (str, s, len))
-              return &HttpHeaderDefinitionsTable[key];
-          }
+                if ((((unsigned char)*str ^ (unsigned char)*s) & ~32) == 0 && !gperf_case_memcmp (str, s, len))
+                    return &HttpHeaderDefinitionsTable[key];
+            }
     }
-  return 0;
+    return 0;
 }
 #line 115 "RegisteredHeadersHash.gperf"