/* The file is autogenerated from aiohttp/hdrs.py
Run ./tools/gen.py to update it after the origin changing. */
#include "_find_header.h"
#define NEXT_CHAR() \
{ \
count++; \
if (count == size) { \
/* end of search */ \
return -1; \
} \
pchar++; \
ch = *pchar; \
last = (count == size -1); \
} while(0);
int
find_header(const char *str, int size)
{
char *pchar = str;
int last;
char ch;
int count = -1;
pchar--;
INITIAL:
NEXT_CHAR();
switch (ch) {
case 'A':
if (last) {
return -1;
}
goto A;
case 'a':
if (last) {
return -1;
}
goto A;
case 'C':
if (last) {
return -1;
}
goto C;
case 'c':
if (last) {
return -1;
}
goto C;
case 'D':
if (last) {
return -1;
}
goto D;
case 'd':
if (last) {
return -1;
}
goto D;
case 'E':
if (last) {
return -1;
}
goto E;
case 'e':
if (last) {
return -1;
}
goto E;
case 'F':
if (last) {
return -1;
}
goto F;
case 'f':
if (last) {
return -1;
}
goto F;
case 'H':
if (last) {
return -1;
}
goto H;
case 'h':
if (last) {
return -1;
}
goto H;
case 'I':
if (last) {
return -1;
}
goto I;
case 'i':
if (last) {
return -1;
}
goto I;
case 'K':
if (last) {
return -1;
}
goto K;
case 'k':
if (last) {
return -1;
}
goto K;
case 'L':
if (last) {
return -1;
}
goto L;
case 'l':
if (last) {
return -1;
}
goto L;
case 'M':
if (last) {
return -1;
}
goto M;
case 'm':
if (last) {
return -1;
}
goto M;
case 'O':
if (last) {
return -1;
}
goto O;
case 'o':
if (last) {
return -1;
}
goto O;
case 'P':
if (last) {
return -1;
}
goto P;
case 'p':
if (last) {
return -1;
}
goto P;
case 'R':
if (last) {
return -1;
}
goto R;
case 'r':
if (last) {
return -1;
}
goto R;
case 'S':
if (last) {
return -1;
}
goto S;
case 's':
if (last) {
return -1;
}
goto S;
case 'T':
if (last) {
return -1;
}
goto T;
case 't':
if (last) {
return -1;
}
goto T;
case 'U':
if (last) {
return -1;
}
goto U;
case 'u':
if (last) {
return -1;
}
goto U;
case 'V':
if (last) {
return -1;
}
goto V;
case 'v':
if (last) {
return -1;
}
goto V;
case 'W':
if (last) {
return -1;
}
goto W;
case 'w':
if (last) {
return -1;
}
goto W;
case 'X':
if (last) {
return -1;
}
goto X;
case 'x':
if (last) {
return -1;
}
goto X;
default:
return -1;
}
A:
NEXT_CHAR();
switch (ch) {
case 'C':
if (last) {
return -1;
}
goto AC;
case 'c':
if (last) {
return -1;
}
goto AC;
case 'G':
if (last) {
return -1;
}
goto AG;
case 'g':
if (last) {
return -1;
}
goto AG;
case 'L':
if (last) {
return -1;
}
goto AL;
case 'l':
if (last) {
return -1;
}
goto AL;
case 'U':
if (last) {
return -1;
}
goto AU;
case 'u':
if (last) {
return -1;
}
goto AU;
default:
return -1;
}
AC:
NEXT_CHAR();
switch (ch) {
case 'C':
if (last) {
return -1;
}
goto ACC;
case 'c':
if (last) {
return -1;
}
goto ACC;
default:
return -1;
}
ACC:
NEXT_CHAR();
switch (ch) {
case 'E':
if (last) {
return -1;
}
goto ACCE;
case 'e':
if (last) {
return -1;
}
goto ACCE;
default:
return -1;
}
ACCE:
NEXT_CHAR();
switch (ch) {
case 'P':
if (last) {
return -1;
}
goto ACCEP;
case 'p':
if (last) {
return -1;
}
goto ACCEP;
case 'S':
if (last) {
return -1;
}
goto ACCES;
case 's':
if (last) {
return -1;
}
goto ACCES;
default:
return -1;
}
ACCEP:
NEXT_CHAR();
switch (ch) {
case 'T':
if (last) {
return 0;
}
goto ACCEPT;
case 't':
if (last) {
return 0;
}
goto ACCEPT;
default:
Loading ...