line |
true |
false |
branch |
31
|
0 |
43 |
const char hex_add = (upper_case ? 'A' - 10 : 'a' - 10); |
32
|
1180 |
43 |
for (; length > 0; src++, length--) { |
35
|
446 |
734 |
*dst++ = (hi > 9 ? hi + hex_add : hi + '0'); |
36
|
442 |
738 |
*dst++ = (lo > 9 ? lo + hex_add : lo + '0'); |
51
|
0 |
8 |
const char a = (upper_case ? 'A' : 'a'); |
55
|
252 |
8 |
while (src < e) { |
56
|
128 |
124 |
if (shift > 3) { |
60
|
123 |
5 |
if (src + 1 < e) |
66
|
28 |
96 |
if (shift == 0) src++; |
68
|
181 |
71 |
*dst++ = ( word < 26 ? word + a : word + '2' - 26 ); |
87
|
11 |
1 |
while (src < e) { |
88
|
6 |
5 |
if (shift > 2) { |
92
|
5 |
1 |
if (src + 1 < e) |
98
|
2 |
3 |
if (shift == 0) src++; |
100
|
10 |
1 |
*dst++ = ( word < 52 ? (word < 26 ? word + 'A' : word - 26 + 'a') : tail[word - 52]); |
|
4 |
6 |
*dst++ = ( word < 52 ? (word < 26 ? word + 'A' : word - 26 + 'a') : tail[word - 52]); |
102
|
1 |
0 |
if (shift > 0) { |
104
|
0 |
1 |
if (shift == 4) *dst++ = '='; |
115
|
0 |
1 |
if (url_encode) { |
117
|
0 |
0 |
for (; length > 0; src += B64_CHUNK_SIZE) { |
150
|
1 |
1 |
if (!dst) { |
152
|
8 |
1 |
for (i = 0; i < size; i++) |
153
|
8 |
0 |
if (!IS_URL_GOOD_CHAR(src[i])) |
|
0 |
8 |
if (!IS_URL_GOOD_CHAR(src[i])) |
157
|
0 |
1 |
const char hex_add = (upper_case ? 'A' - 10 : 'a' - 10); |
160
|
8 |
1 |
for (i = 0; i < size; i++) { |
161
|
8 |
0 |
if (IS_URL_GOOD_CHAR(src[i])) { |
|
8 |
0 |
if (IS_URL_GOOD_CHAR(src[i])) { |
167
|
0 |
0 |
*dst++ = (hi > 9 ? hi + hex_add : hi + '0'); |
168
|
0 |
0 |
*dst++ = (lo > 9 ? lo + hex_add : lo + '0'); |
191
|
0 |
9 |
if (dst == NULL) { |
193
|
0 |
0 |
if (number == 0) return 1; |
194
|
0 |
0 |
for (length = 0; number != 0; number /= 10) length++; |
200
|
0 |
9 |
if (number == 0) { |
203
|
46 |
0 |
for (; p >= buf && number != 0; number /= 10) { |
|
37 |
9 |
for (; p >= buf && number != 0; number /= 10) { |