| line |
true |
false |
branch |
|
21
|
1982 |
21 |
if (c < 0x80) { *adv = 1; return c; } |
|
22
|
18 |
3 |
if ((c & 0xE0) == 0xC0 && i + 1 < n && |
|
|
18 |
0 |
if ((c & 0xE0) == 0xC0 && i + 1 < n && |
|
23
|
18 |
0 |
((unsigned char)s[i+1] & 0xC0) == 0x80) { |
|
27
|
3 |
0 |
if ((c & 0xF0) == 0xE0 && i + 2 < n && |
|
|
3 |
0 |
if ((c & 0xF0) == 0xE0 && i + 2 < n && |
|
28
|
3 |
0 |
((unsigned char)s[i+1] & 0xC0) == 0x80 && |
|
29
|
3 |
0 |
((unsigned char)s[i+2] & 0xC0) == 0x80) { |
|
35
|
0 |
0 |
if ((c & 0xF8) == 0xF0 && i + 3 < n && |
|
|
0 |
0 |
if ((c & 0xF8) == 0xF0 && i + 3 < n && |
|
36
|
0 |
0 |
((unsigned char)s[i+1] & 0xC0) == 0x80 && |
|
37
|
0 |
0 |
((unsigned char)s[i+2] & 0xC0) == 0x80 && |
|
38
|
0 |
0 |
((unsigned char)s[i+3] & 0xC0) == 0x80) { |
|
51
|
1982 |
18 |
if (cp < 0x80) { out[0] = (char)cp; return 1; } |
|
52
|
18 |
0 |
if (cp < 0x800) { |
|
57
|
0 |
0 |
if (cp < 0x10000) { |
|
77
|
3 |
2000 |
if (cp == 0x1E9E) { out[0] = 's'; out[1] = 's'; return 2; } /* ẞ */ |
|
80
|
1875 |
125 |
if (cp >= 'A' && cp <= 'Z') cp = cp + 0x20; |
|
|
108 |
1767 |
if (cp >= 'A' && cp <= 'Z') cp = cp + 0x20; |
|
81
|
0 |
1892 |
else if (cp == 0xB5) cp = 0x3BC; /* µ -> μ */ |
|
82
|
18 |
1874 |
else if (cp >= 0xC0 && cp <= 0xDE && cp != 0xD7) cp += 0x20; |
|
|
0 |
18 |
else if (cp >= 0xC0 && cp <= 0xDE && cp != 0xD7) cp += 0x20; |
|
|
0 |
0 |
else if (cp >= 0xC0 && cp <= 0xDE && cp != 0xD7) cp += 0x20; |
|
83
|
18 |
1874 |
else if (cp >= 0x391 && cp <= 0x3A1) cp += 0x20; /* Α..Ρ */ |
|
|
6 |
12 |
else if (cp >= 0x391 && cp <= 0x3A1) cp += 0x20; /* Α..Ρ */ |
|
84
|
12 |
1874 |
else if (cp >= 0x3A3 && cp <= 0x3AB) cp += 0x20; /* Σ..Ϋ */ |
|
|
3 |
9 |
else if (cp >= 0x3A3 && cp <= 0x3AB) cp += 0x20; /* Σ..Ϋ */ |
|
85
|
1883 |
0 |
else if (cp == 0x3A2) { /* reserved, leave */ } |
|
86
|
0 |
1883 |
else if (cp >= 0x400 && cp <= 0x40F) cp += 0x50; /* Cyrillic Ѐ..Џ */ |
|
|
0 |
0 |
else if (cp >= 0x400 && cp <= 0x40F) cp += 0x50; /* Cyrillic Ѐ..Џ */ |
|
87
|
0 |
1883 |
else if (cp >= 0x410 && cp <= 0x42F) cp += 0x20; /* Cyrillic А..Я */ |
|
|
0 |
0 |
else if (cp >= 0x410 && cp <= 0x42F) cp += 0x20; /* Cyrillic А..Я */ |
|
104
|
515 |
6 |
while (a < b && (s[a] == ' ' || s[a] == '\t' || s[a] == '\n')) a++; |
|
|
0 |
515 |
while (a < b && (s[a] == ' ' || s[a] == '\t' || s[a] == '\n')) a++; |
|
|
0 |
515 |
while (a < b && (s[a] == ' ' || s[a] == '\t' || s[a] == '\n')) a++; |
|
|
3 |
512 |
while (a < b && (s[a] == ' ' || s[a] == '\t' || s[a] == '\n')) a++; |
|
105
|
515 |
6 |
while (b > a && (s[b-1] == ' ' || s[b-1] == '\t' || s[b-1] == '\n')) b--; |
|
|
0 |
515 |
while (b > a && (s[b-1] == ' ' || s[b-1] == '\t' || s[b-1] == '\n')) b--; |
|
|
0 |
515 |
while (b > a && (s[b-1] == ' ' || s[b-1] == '\t' || s[b-1] == '\n')) b--; |
|
|
3 |
512 |
while (b > a && (s[b-1] == ' ' || s[b-1] == '\t' || s[b-1] == '\n')) b--; |
|
107
|
2084 |
518 |
while (i < b) { |
|
109
|
2006 |
78 |
if (c == ' ' || c == '\t' || c == '\n') { |
|
|
2006 |
0 |
if (c == ' ' || c == '\t' || c == '\n') { |
|
|
3 |
2003 |
if (c == ' ' || c == '\t' || c == '\n') { |
|
110
|
81 |
0 |
if (!in_ws) { out[j++] = ' '; in_ws = 1; } |
|
136
|
359 |
3 |
if (n) memcpy(d, s, n); |
|
156
|
0 |
256 |
if (llen > sizeof buf / 4 - 4) return NULL; |
|
158
|
274 |
30 |
for (i = 0; i < t->len; i++) { |
|
159
|
259 |
15 |
if (t->entries[i].klen == nlen && |
|
|
259 |
0 |
if (t->entries[i].klen == nlen && |
|
160
|
226 |
33 |
(nlen == 0 || memcmp(t->entries[i].key, buf, nlen) == 0)) |
|
176
|
24 |
256 |
for (i = 0; i < t->len; i++) { |
|
177
|
24 |
0 |
if (t->entries[i].klen == nlen && |
|
178
|
24 |
0 |
(nlen == 0 || memcmp(t->entries[i].key, key, nlen) == 0)) |
|
|
6 |
18 |
(nlen == 0 || memcmp(t->entries[i].key, key, nlen) == 0)) |
|
181
|
241 |
15 |
if (t->len == t->cap) { |
|
182
|
0 |
241 |
size_t nc = t->cap ? t->cap * 2 : 8; |
|
189
|
106 |
150 |
e->title = tlen ? arena_dup(t->arena, title, tlen) : NULL; |