line |
true |
false |
branch |
13
|
0 |
3 |
return PerlIO_push(aTHX_ f, encoding, mode, NULL) == f ? 0 : -1; |
19
|
0 |
12 |
return PerlIO_push(aTHX_ f, layer , mode, encoding) == f ? 0 : -1; |
25
|
10 |
0 |
if (!arg || !SvOK(arg)) |
|
0 |
10 |
if (!arg || !SvOK(arg)) |
|
0 |
0 |
if (!arg || !SvOK(arg)) |
|
0 |
0 |
if (!arg || !SvOK(arg)) |
29
|
10 |
0 |
const char* fallback = SvPV(arg, len); |
30
|
10 |
0 |
return len >= 4 && |
31
|
10 |
0 |
(memcmp(fallback, "utf", 3) == 0 || memcmp(fallback, "UTF", 3) == 0) && |
|
10 |
0 |
(memcmp(fallback, "utf", 3) == 0 || memcmp(fallback, "UTF", 3) == 0) && |
32
|
10 |
0 |
fallback[3] == '8' || (len >= 5 && fallback[3] == '-' && fallback[4] == '8'); |
|
10 |
0 |
fallback[3] == '8' || (len >= 5 && fallback[3] == '-' && fallback[4] == '8'); |
|
10 |
0 |
fallback[3] == '8' || (len >= 5 && fallback[3] == '-' && fallback[4] == '8'); |
|
8 |
2 |
fallback[3] == '8' || (len >= 5 && fallback[3] == '-' && fallback[4] == '8'); |
37
|
15 |
0 |
if (!PerlIOValid(f)) |
|
15 |
0 |
if (!PerlIOValid(f)) |
39
|
0 |
15 |
else if (!PerlIO_fast_gets(f)) { |
42
|
0 |
0 |
if (!f) { |
47
|
5 |
10 |
if (mode[0] == 'r' || mode[0] == 'w' && mode[1] == '+') { |
|
5 |
0 |
if (mode[0] == 'r' || mode[0] == 'w' && mode[1] == '+') { |
|
0 |
5 |
if (mode[0] == 'r' || mode[0] == 'w' && mode[1] == '+') { |
51
|
10 |
0 |
if (count >= 3 && memcmp(buffer, "\xEF\xBB\xBF", 3) == 0) { |
|
1 |
9 |
if (count >= 3 && memcmp(buffer, "\xEF\xBB\xBF", 3) == 0) { |
55
|
9 |
0 |
else if (count >= 4 && memcmp(buffer, "\x00\x00\xFE\xFF", 4) == 0) { |
|
1 |
8 |
else if (count >= 4 && memcmp(buffer, "\x00\x00\xFE\xFF", 4) == 0) { |
59
|
8 |
0 |
else if (count >= 4 && memcmp(buffer, "\xFF\xFE\x00\x00", 4) == 0) { |
|
1 |
7 |
else if (count >= 4 && memcmp(buffer, "\xFF\xFE\x00\x00", 4) == 0) { |
63
|
7 |
0 |
else if (count >= 2 && memcmp(buffer, "\xFE\xFF", 2) == 0) { |
|
1 |
6 |
else if (count >= 2 && memcmp(buffer, "\xFE\xFF", 2) == 0) { |
67
|
6 |
0 |
else if (count >= 2 && memcmp(buffer, "\xFF\xFE", 2) == 0) { |
|
1 |
5 |
else if (count >= 2 && memcmp(buffer, "\xFF\xFE", 2) == 0) { |
71
|
1 |
4 |
if (is_utf8(arg)) |
76
|
5 |
0 |
else if (mode[0] == 'w') { |
77
|
5 |
0 |
if (!arg || SvOK(arg) && !is_utf8(arg)) |
|
0 |
5 |
if (!arg || SvOK(arg) && !is_utf8(arg)) |
|
0 |
0 |
if (!arg || SvOK(arg) && !is_utf8(arg)) |
|
0 |
0 |
if (!arg || SvOK(arg) && !is_utf8(arg)) |
|
4 |
1 |
if (!arg || SvOK(arg) && !is_utf8(arg)) |
82
|
0 |
5 |
return PerlIO_write(f, "\xEF\xBB\xBF", 3) == 3 ? 0 : -1; |