Branch Coverage

perlio.c
Criterion Covered Total %
branch 871 1464 59.5


line true false branch
185 3207 66 const int result = rawmode & O_ACCMODE;
200 3273 0 if (writing)
203 38 3235 if (result == O_RDONLY) {
207 0 3235 else if (rawmode & O_APPEND) {
209 0 0 if (result != O_WRONLY)
214 28 3207 if (result == O_WRONLY)
458 12353 27865005 if (!PL_perlio_debug_fd) {
460 12266 0 PerlProc_getuid() == PerlProc_geteuid() &&
463 0 12266 if (s && *s)
0 0 if (s && *s)
474 0 27877358 if (PL_perlio_debug_fd > 0) {
483 0 0 const char *s = CopFILE(PL_curcop);
485 0 0 SV * const sv = Perl_newSVpvf(aTHX_ "%s:%" IVdf " ", s ? s : "(none)",
489 0 0 s = SvPV_const(sv, len);
537 12353 0 if (PL_perlio)
554 1956768 0 while ((f = *last)) {
557 9042320 0 for (i = 1; i < PERLIO_TABLE_SIZE; i++) {
558 1956768 7085552 if (!((++f)->next)) {
567 0 0 if (!f) {
581 5611 0 if (PerlIOValid(f)) {
5611 0 if (PerlIOValid(f)) {
584 5611 0 if (tab && tab->Dup)
5611 0 if (tab && tab->Dup)
600 12351 12351 if (table) {
603 778113 12351 for (i = PERLIO_TABLE_SIZE - 1; i > 0; i--) {
605 37026 741087 if (f->next) {
628 2825656 0 if (list) {
629 339830 2485826 if (--list->refcnt == 0) {
630 339827 3 if (list->array) {
632 749889 339827 for (i = 0; i < list->cur; i++)
648 339933 409976 if (list->cur >= list->len) {
650 102 339831 if (list->array)
651 0 102 Renew(list->array, list->len, PerlIO_pair_t);
653 0 339831 Newx(list->array, list->len, PerlIO_pair_t);
657 650982 98927 if ((p->arg = arg)) {
666 307180 0 if (proto) {
669 614360 307180 for (i=0; i < proto->cur; i++) {
720 12353 12353 while ((f = *table)) {
723 778239 12353 for (i = 1; i < PERLIO_TABLE_SIZE; i++) {
726 85182 778239 while ((l = *x)) {
727 85180 2 if (l->tab && l->tab->kind & PERLIO_K_DESTRUCT) {
72 85108 if (l->tab && l->tab->kind & PERLIO_K_DESTRUCT) {
746 3915447 0 if (l) {
747 3915445 2 PerlIO_debug("PerlIO_pop f=%p %s\n", (void*)f,
749 3915445 2 if (l->tab && l->tab->Popped) {
3915445 0 if (l->tab && l->tab->Popped) {
755 3915445 0 if ((*l->tab->Popped) (aTHX_ f) != 0)
758 4 3915443 if (PerlIO_lockcnt(f)) {
783 3050 0 if (PerlIOValid(f)) {
3050 0 if (PerlIOValid(f)) {
786 6133 3050 while (l) {
792 6133 0 SV * const name = l->tab && l->tab->name ?
793 6133 0 newSVpv(l->tab->name, 0) : &PL_sv_undef;
794 21 6112 SV * const arg = l->tab && l->tab->Getarg ?
795 6133 0 (*l->tab->Getarg)(aTHX_ &l, 0, 0) : &PL_sv_undef;
816 24674 12329 if ((SSize_t) len <= 0)
818 108164 98 for (i = 0; i < PL_known_layers->cur; i++) {
821 45343 62821 if (this_len == len && memEQ(f->name, name, len)) {
36905 8438 if (this_len == len && memEQ(f->name, name, len)) {
826 89 9 if (load && PL_subname && PL_def_layerlist
89 0 if (load && PL_subname && PL_def_layerlist
89 0 if (load && PL_subname && PL_def_layerlist
827 89 0 && PL_def_layerlist->cur >= 2) {
828 1 88 if (PL_in_load_module) {
837 88 0 if (cv) {
952 11 0 if (items)
953 11 0 PerlIO_debug("warning:%s\n",SvPV_nolen_const(ST(0)));
962 0 285 if (items < 2)
966 285 0 const char * const name = SvPV_const(ST(1), len);
967 212 73 const bool load = (items > 2) ? SvTRUE(ST(2)) : 0;
212 0 const bool load = (items > 2) ? SvTRUE(ST(2)) : 0;
0 212 const bool load = (items > 2) ? SvTRUE(ST(2)) : 0;
0 0 const bool load = (items > 2) ? SvTRUE(ST(2)) : 0;
0 212 const bool load = (items > 2) ? SvTRUE(ST(2)) : 0;
0 0 const bool load = (items > 2) ? SvTRUE(ST(2)) : 0;
0 0 const bool load = (items > 2) ? SvTRUE(ST(2)) : 0;
0 212 const bool load = (items > 2) ? SvTRUE(ST(2)) : 0;
0 0 const bool load = (items > 2) ? SvTRUE(ST(2)) : 0;
0 0 const bool load = (items > 2) ? SvTRUE(ST(2)) : 0;
0 0 const bool load = (items > 2) ? SvTRUE(ST(2)) : 0;
0 0 const bool load = (items > 2) ? SvTRUE(ST(2)) : 0;
0 0 const bool load = (items > 2) ? SvTRUE(ST(2)) : 0;
212 0 const bool load = (items > 2) ? SvTRUE(ST(2)) : 0;
212 0 const bool load = (items > 2) ? SvTRUE(ST(2)) : 0;
0 212 const bool load = (items > 2) ? SvTRUE(ST(2)) : 0;
0 0 const bool load = (items > 2) ? SvTRUE(ST(2)) : 0;
0 0 const bool load = (items > 2) ? SvTRUE(ST(2)) : 0;
212 0 const bool load = (items > 2) ? SvTRUE(ST(2)) : 0;
0 0 const bool load = (items > 2) ? SvTRUE(ST(2)) : 0;
970 283 2 (layer) ? sv_2mortal(PerlIO_tab_sv(aTHX_ layer)) :
980 12353 86574 if (!PL_known_layers)
990 312977 0 if (names) {
992 316038 312964 while (*s) {
993 40 631221 while (isSPACE(*s) || *s == ':')
315183 316038 while (isSPACE(*s) || *s == ':')
995 9768 306270 if (*s) {
1000 5 9763 if (!isIDFIRST(*s)) {
1006 5 0 const char q = ((*s == '\'') ? '"' : '\'');
1015 33123 9763 } while (isWORDCHAR(*e));
1017 217 9546 if (*e == '(') {
1020 1789 215 while (nesting) {
1023 215 0 if (--nesting == 0)
1035 0 0 if (*e++) {
1055 9761 0 if (e > s) {
1058 9755 6 if (layer) {
1060 215 9540 if (as)
1062 215 9540 PerlIO_list_push(aTHX_ av, layer,
1087 0 12321 if (PerlIO_stdio.Set_ptrcnt)
1104 8391635 0 if (n >= 0 && n < av->cur) {
8391635 0 if (n >= 0 && n < av->cur) {
1109 0 0 if (!def)
1120 14 0 if (PerlIOValid(f)) {
14 0 if (PerlIOValid(f)) {
1163 12353 5576663 if (!PL_def_layerlist) {
1164 12266 87 const char * const s = TAINTING_get ? NULL : PerlEnv_getenv("PERLIO");
1184 32 12321 if (s) {
1191 0 5589016 if (PL_def_layerlist->cur < 2) {
1213 0 2793815 if (n < 0)
1225 12353 0 if (!PL_perlio) {
1237 0 5474278 if (tab->fsize != sizeof(PerlIO_funcs)) {
1243 3915457 1558821 if (tab->size) {
1245 0 3915457 if (tab->size < sizeof(PerlIOl)) {
1252 3915457 0 if (f) {
1256 3915457 0 if (l) {
1261 3911354 4103 PerlIO_debug("PerlIO_push f=%p %s %s %p\n",
1275 1558821 0 else if (f) {
1277 816 1558005 PerlIO_debug("PerlIO_push f=%p %s %s %p\n", (void*)f, tab->name,
1293 821 0 if (tab && tab->Open) {
821 0 if (tab && tab->Open) {
1295 811 10 if (ret && PerlIO_push(aTHX_ ret, self, mode, PerlIOArg) == NULL) {
0 811 if (ret && PerlIO_push(aTHX_ ret, self, mode, PerlIOArg) == NULL) {
1308 3112792 0 if (PerlIOValid(f)) {
3112792 0 if (PerlIOValid(f)) {
1310 3112792 0 if (PerlIOBase(f)->tab && PerlIOBase(f)->tab->kind & PERLIO_K_RAW) {
3112792 0 if (PerlIOBase(f)->tab && PerlIOBase(f)->tab->kind & PERLIO_K_RAW) {
1330 1556395 0 if (PerlIOValid(f)) {
1556395 0 if (PerlIOValid(f)) {
1338 4669204 0 while (t && (l = *t)) {
3112809 1556395 while (t && (l = *t)) {
1339 3112809 0 if (l->tab && l->tab->Binmode) {
3112795 14 if (l->tab && l->tab->Binmode) {
1341 3112795 0 if ((*l->tab->Binmode)(aTHX_ t) == 0) {
1342 3112792 3 if (*t == l) {
1356 1556395 0 if (PerlIOValid(f)) {
1556395 0 if (PerlIOValid(f)) {
1357 1556395 0 PerlIO_debug(":raw f=%p :%s\n", (void*)f,
1370 8812 5753 while (n < max) {
1372 8812 0 if (tab) {
1373 8812 0 if (!PerlIO_push(aTHX_ f, tab, mode, PerlIOArg)) {
1389 5755 0 if (f && names) {
1392 5753 2 if (code == 0) {
1410 5733 1553301 PerlIO_debug("PerlIO_binmode f=%p %s %c %x %s\n", (void*)f,
1559034 0 PerlIO_debug("PerlIO_binmode f=%p %s %c %x %s\n", (void*)f,
1411 1559034 0 (PerlIOBase(f) && PerlIOBase(f)->tab) ?
1415 5733 1553301 if (names) {
1469 1956761 0 if (PerlIOValid(f)) {
1956751 10 if (PerlIOValid(f)) {
1471 1956749 2 if (tab && tab->Close)
1956749 0 if (tab && tab->Close)
1486 5872078 0 while (PerlIOValid(f)) {
3915320 1956758 while (PerlIOValid(f)) {
1488 4 3915316 if (PerlIO_lockcnt(f))
1499 13836504 0 Perl_PerlIO_or_Base(f, Fileno, fileno, -1, (aTHX_ f));
13836503 1 Perl_PerlIO_or_Base(f, Fileno, fileno, -1, (aTHX_ f));
13836503 0 Perl_PerlIO_or_Base(f, Fileno, fileno, -1, (aTHX_ f));
13836503 0 Perl_PerlIO_or_Base(f, Fileno, fileno, -1, (aTHX_ f));
1510 2196 0 if (SvTYPE(sv) < SVt_PVAV && (!isGV_with_GP(sv) || SvFAKE(sv))) {
5 2191 if (SvTYPE(sv) < SVt_PVAV && (!isGV_with_GP(sv) || SvFAKE(sv))) {
5 0 if (SvTYPE(sv) < SVt_PVAV && (!isGV_with_GP(sv) || SvFAKE(sv))) {
4 1 if (SvTYPE(sv) < SVt_PVAV && (!isGV_with_GP(sv) || SvFAKE(sv))) {
0 0 if (SvTYPE(sv) < SVt_PVAV && (!isGV_with_GP(sv) || SvFAKE(sv))) {
0 0 if (SvTYPE(sv) < SVt_PVAV && (!isGV_with_GP(sv) || SvFAKE(sv))) {
0 0 if (SvTYPE(sv) < SVt_PVAV && (!isGV_with_GP(sv) || SvFAKE(sv))) {
0 0 if (SvTYPE(sv) < SVt_PVAV && (!isGV_with_GP(sv) || SvFAKE(sv))) {
1544 12263 2782938 if (!PL_perlio)
1546 2743938 51263 if (narg) {
1552 2201 2741737 if (SvROK(arg) && !sv_isobject(arg)) {
2196 5 if (SvROK(arg) && !sv_isobject(arg)) {
1554 2193 1 if (handler) {
1566 1532656 1262543 if (!layers || !*layers)
1225521 307135 if (!layers || !*layers)
1568 307190 2488009 if (layers && *layers) {
307190 0 if (layers && *layers) {
1570 307180 10 if (incdef) {
1576 11 307179 if (PerlIO_parse_layers(aTHX_ av, layers) == 0) {
1585 2485826 2183 if (incdef)
1596 2743944 51263 if (!f && narg == 1 && *args == &PL_sv_undef) {
6 2743938 if (!f && narg == 1 && *args == &PL_sv_undef) {
1597 6 0 if ((f = PerlIO_tmpfile())) {
1598 6 0 if (!layers || !*layers)
6 0 if (!layers || !*layers)
1600 0 6 if (layers && *layers)
0 0 if (layers && *layers)
1608 0 2795201 if (PerlIOValid(f)) {
0 0 if (PerlIOValid(f)) {
1615 0 0 while (l) {
1617 0 0 if (l->tab && l->tab->Getarg)
0 0 if (l->tab && l->tab->Getarg)
1619 0 0 PerlIO_list_push(aTHX_ layera, l->tab,
1627 2795188 11 if (!layera) {
1635 2795188 0 while (n >= 0) {
1637 2795188 0 if (t && t->Open) {
0 2795188 if (t && t->Open) {
1643 2795188 0 if (tab) {
1647 0 2795188 if (narg > 1 && !(tab->kind & PERLIO_K_MULTIARG)) {
0 0 if (narg > 1 && !(tab->kind & PERLIO_K_MULTIARG)) {
1650 1532645 1262543 PerlIO_debug("openn(%s,'%s','%s',%d,%x,%o,%p,%d,%p)\n",
1653 2795188 0 if (tab->Open)
1660 1951144 844044 if (f) {
1661 0 1951144 if (n + 1 < layera->cur) {
1666 0 0 if (PerlIO_apply_layera(aTHX_ f, mode, layera, n + 1, layera->cur) != 0) {
1685 1213142128 0 Perl_PerlIO_or_Base(f, Read, read, -1, (aTHX_ f, vbuf, count));
1213142128 0 Perl_PerlIO_or_Base(f, Read, read, -1, (aTHX_ f, vbuf, count));
1213142128 0 Perl_PerlIO_or_Base(f, Read, read, -1, (aTHX_ f, vbuf, count));
1213142128 0 Perl_PerlIO_or_Base(f, Read, read, -1, (aTHX_ f, vbuf, count));
1693 346651 0 Perl_PerlIO_or_Base(f, Unread, unread, -1, (aTHX_ f, vbuf, count));
346651 0 Perl_PerlIO_or_Base(f, Unread, unread, -1, (aTHX_ f, vbuf, count));
346651 0 Perl_PerlIO_or_Base(f, Unread, unread, -1, (aTHX_ f, vbuf, count));
346648 3 Perl_PerlIO_or_Base(f, Unread, unread, -1, (aTHX_ f, vbuf, count));
1701 228093759 0 Perl_PerlIO_or_fail(f, Write, -1, (aTHX_ f, vbuf, count));
228093756 3 Perl_PerlIO_or_fail(f, Write, -1, (aTHX_ f, vbuf, count));
228093756 0 Perl_PerlIO_or_fail(f, Write, -1, (aTHX_ f, vbuf, count));
228093756 0 Perl_PerlIO_or_fail(f, Write, -1, (aTHX_ f, vbuf, count));
1707 277260 0 Perl_PerlIO_or_fail(f, Seek, -1, (aTHX_ f, offset, whence));
277260 0 Perl_PerlIO_or_fail(f, Seek, -1, (aTHX_ f, offset, whence));
277260 0 Perl_PerlIO_or_fail(f, Seek, -1, (aTHX_ f, offset, whence));
277260 0 Perl_PerlIO_or_fail(f, Seek, -1, (aTHX_ f, offset, whence));
1713 19813917 0 Perl_PerlIO_or_fail(f, Tell, -1, (aTHX_ f));
19813917 0 Perl_PerlIO_or_fail(f, Tell, -1, (aTHX_ f));
19813917 0 Perl_PerlIO_or_fail(f, Tell, -1, (aTHX_ f));
19813917 0 Perl_PerlIO_or_fail(f, Tell, -1, (aTHX_ f));
1720 18929925 25103 if (f) {
1721 18929923 2 if (*f) {
1724 18929919 4 if (tab && tab->Flush)
18929919 0 if (tab && tab->Flush)
1746 25103 25103 while ((ff = *table)) {
1749 1581489 25103 for (i = 1; i < PERLIO_TABLE_SIZE; i++) {
1750 95632 1485857 if (ff->next && PerlIO_flush(&(ff->next)) != 0)
1 95631 if (ff->next && PerlIO_flush(&(ff->next)) != 0)
1765 229 229 while ((f = *table)) {
1768 14427 229 for (i = 1; i < PERLIO_TABLE_SIZE; i++) {
1769 1395 13032 if (f->next
1770 0 1395 && (PerlIOBase(&(f->next))->
1782 3879965 0 Perl_PerlIO_or_fail(f, Fill, -1, (aTHX_ f));
3879965 0 Perl_PerlIO_or_fail(f, Fill, -1, (aTHX_ f));
3879965 0 Perl_PerlIO_or_fail(f, Fill, -1, (aTHX_ f));
3879965 0 Perl_PerlIO_or_fail(f, Fill, -1, (aTHX_ f));
1788 127153838 0 if (PerlIOValid(f))
127153836 2 if (PerlIOValid(f))
1799 166951 0 Perl_PerlIO_or_Base(f, Eof, eof, -1, (aTHX_ f));
166951 0 Perl_PerlIO_or_Base(f, Eof, eof, -1, (aTHX_ f));
166951 0 Perl_PerlIO_or_Base(f, Eof, eof, -1, (aTHX_ f));
166951 0 Perl_PerlIO_or_Base(f, Eof, eof, -1, (aTHX_ f));
1805 4724892 1 Perl_PerlIO_or_Base(f, Error, error, -1, (aTHX_ f));
4724881 11 Perl_PerlIO_or_Base(f, Error, error, -1, (aTHX_ f));
4724880 1 Perl_PerlIO_or_Base(f, Error, error, -1, (aTHX_ f));
4724880 0 Perl_PerlIO_or_Base(f, Error, error, -1, (aTHX_ f));
1811 29911 20 Perl_PerlIO_or_Base_void(f, Clearerr, clearerr, (aTHX_ f));
29911 0 Perl_PerlIO_or_Base_void(f, Clearerr, clearerr, (aTHX_ f));
29911 0 Perl_PerlIO_or_Base_void(f, Clearerr, clearerr, (aTHX_ f));
29911 0 Perl_PerlIO_or_Base_void(f, Clearerr, clearerr, (aTHX_ f));
1817 0 0 Perl_PerlIO_or_Base_void(f, Setlinebuf, setlinebuf, (aTHX_ f));
0 0 Perl_PerlIO_or_Base_void(f, Setlinebuf, setlinebuf, (aTHX_ f));
0 0 Perl_PerlIO_or_Base_void(f, Setlinebuf, setlinebuf, (aTHX_ f));
0 0 Perl_PerlIO_or_Base_void(f, Setlinebuf, setlinebuf, (aTHX_ f));
1823 19 0 if (PerlIOValid(f)) {
19 0 if (PerlIOValid(f)) {
1826 19 0 if (tab)
1836 120138572 0 if (PerlIOValid(f)) {
120138572 0 if (PerlIOValid(f)) {
1837 116259816 3878756 if (PerlIOBase(f)->flags & PERLIO_F_FASTGETS) {
1840 116259816 0 if (tab)
1851 17557 0 if (PerlIOValid(f)) {
17557 0 if (PerlIOValid(f)) {
1854 17557 0 if (tab)
1855 17557 0 return (tab->Get_ptr != NULL && tab->Get_cnt != NULL);
0 17557 return (tab->Get_ptr != NULL && tab->Get_cnt != NULL);
1864 55 0 if (PerlIOValid(f)) {
55 0 if (PerlIOValid(f)) {
1867 55 0 if (tab)
1877 5383867 0 Perl_PerlIO_or_fail(f, Get_base, NULL, (aTHX_ f));
5383867 0 Perl_PerlIO_or_fail(f, Get_base, NULL, (aTHX_ f));
5383867 0 Perl_PerlIO_or_fail(f, Get_base, NULL, (aTHX_ f));
5383867 0 Perl_PerlIO_or_fail(f, Get_base, NULL, (aTHX_ f));
1883 15 0 Perl_PerlIO_or_fail(f, Get_bufsiz, -1, (aTHX_ f));
15 0 Perl_PerlIO_or_fail(f, Get_bufsiz, -1, (aTHX_ f));
15 0 Perl_PerlIO_or_fail(f, Get_bufsiz, -1, (aTHX_ f));
15 0 Perl_PerlIO_or_fail(f, Get_bufsiz, -1, (aTHX_ f));
1889 1326308561 0 Perl_PerlIO_or_fail(f, Get_ptr, NULL, (aTHX_ f));
1326308561 0 Perl_PerlIO_or_fail(f, Get_ptr, NULL, (aTHX_ f));
1326308561 0 Perl_PerlIO_or_fail(f, Get_ptr, NULL, (aTHX_ f));
1326308561 0 Perl_PerlIO_or_fail(f, Get_ptr, NULL, (aTHX_ f));
1895 1331703722 0 Perl_PerlIO_or_fail(f, Get_cnt, -1, (aTHX_ f));
1331703722 0 Perl_PerlIO_or_fail(f, Get_cnt, -1, (aTHX_ f));
1331703722 0 Perl_PerlIO_or_fail(f, Get_cnt, -1, (aTHX_ f));
1331703722 0 Perl_PerlIO_or_fail(f, Get_cnt, -1, (aTHX_ f));
1901 0 0 Perl_PerlIO_or_fail_void(f, Set_ptrcnt, (aTHX_ f, NULL, cnt));
0 0 Perl_PerlIO_or_fail_void(f, Set_ptrcnt, (aTHX_ f, NULL, cnt));
0 0 Perl_PerlIO_or_fail_void(f, Set_ptrcnt, (aTHX_ f, NULL, cnt));
0 0 Perl_PerlIO_or_fail_void(f, Set_ptrcnt, (aTHX_ f, NULL, cnt));
1907 1326308553 0 Perl_PerlIO_or_fail_void(f, Set_ptrcnt, (aTHX_ f, ptr, cnt));
1326308553 0 Perl_PerlIO_or_fail_void(f, Set_ptrcnt, (aTHX_ f, ptr, cnt));
1326308553 0 Perl_PerlIO_or_fail_void(f, Set_ptrcnt, (aTHX_ f, ptr, cnt));
1326308553 0 Perl_PerlIO_or_fail_void(f, Set_ptrcnt, (aTHX_ f, ptr, cnt));
1922 2412 0 if (PerlIOValid(f)) {
2412 0 if (PerlIOValid(f)) {
1923 2412 0 if (tab && tab->kind & PERLIO_K_UTF8)
2345 67 if (tab && tab->kind & PERLIO_K_UTF8)
2033 6920546 0 return PerlIOValid(f) ? PerlIO_fileno(PerlIONext(f)) : -1;
6920546 0 return PerlIOValid(f) ? PerlIO_fileno(PerlIONext(f)) : -1;
2040 11224 0 if (PerlIOValid(f)) {
11224 0 if (PerlIOValid(f)) {
2042 0 11224 if (flags & PERLIO_F_APPEND) {
2044 0 0 if (flags & PERLIO_F_CANREAD) {
2048 365 10859 else if (flags & PERLIO_F_CANREAD) {
2050 1 364 if (flags & PERLIO_F_CANWRITE)
2053 10859 0 else if (flags & PERLIO_F_CANWRITE) {
2055 0 10859 if (flags & PERLIO_F_CANREAD) {
2078 3915455 0 if (tab && tab->Set_ptrcnt != NULL)
1960886 1954569 if (tab && tab->Set_ptrcnt != NULL)
2080 3911352 4103 if (mode) {
2081 40280 3871072 if (*mode == IoTYPE_NUMERIC || *mode == IoTYPE_IMPLICIT)
2097 7412 3911352 while (*mode) {
2115 4103 0 if (l->next) {
2153 1209263279 0 if (f) {
2154 1209263267 12 if (!(PerlIOBase(f)->flags & PERLIO_F_CANREAD)) {
2159 1212253622 1208374930 while (count > 0) {
2164 1208912428 5351764 if (avail > 0)
2165 1206901858 2010570 take = (((SSize_t) count >= 0) && ((SSize_t)count < avail)) ? (SSize_t)count : avail;
2166 1208912022 5352170 if (take > 0) {
2172 2010570 1206901452 if (avail == 0) /* set_ptrcnt could have reset avail */
2175 3879023 1208374599 if (count > 0 && avail <= 0) {
2176 2990686 888334 if (PerlIO_fill(f) != 0)
2206 1960767 0 if (PerlIOValid(f)) {
1960767 0 if (PerlIOValid(f)) {
2211 1960766 0 while (PerlIOValid(n)) {
1958571 2195 while (PerlIOValid(n)) {
2213 1958571 0 if (tab && tab->Close) {
1958571 0 if (tab && tab->Close) {
2214 2 1958569 if ((*tab->Close)(aTHX_ n) != 0)
2235 166949 0 if (PerlIOValid(f)) {
166949 0 if (PerlIOValid(f)) {
0 0 if (PerlIOValid(f)) {
0 0 if (PerlIOValid(f)) {
2245 4724852 0 if (PerlIOValid(f)) {
4724852 0 if (PerlIOValid(f)) {
1 0 if (PerlIOValid(f)) {
1 0 if (PerlIOValid(f)) {
2254 29903 0 if (PerlIOValid(f)) {
29903 0 if (PerlIOValid(f)) {
2257 29903 0 if (PerlIOValid(n))
15057 14846 if (PerlIOValid(n))
2266 0 0 if (PerlIOValid(f)) {
0 0 if (PerlIOValid(f)) {
0 0 if (PerlIOValid(f)) {
0 0 if (PerlIOValid(f)) {
2274 4 0 if (!arg)
2295 11224 0 if (PerlIOValid(nexto)) {
5613 5611 if (PerlIOValid(nexto)) {
2297 5613 0 if (tab && tab->Dup)
5613 0 if (tab && tab->Dup)
2302 11224 0 if (f) {
2306 11224 0 PerlIO_debug("PerlIOBase_dup %s f=%p o=%p param=%p\n",
2309 11224 0 if (self && self->Getarg)
6 11218 if (self && self->Getarg)
2312 15 11209 if (PerlIOBase(o)->flags & PERLIO_F_UTF8)
2332 12353 0 if (new_fd < old_max) {
2342 0 12353 if (!new_array) {
2356 0 12353 Zero(new_array + old_max, new_max - old_max, int);
2371 1991622 0 if (fd >= 0) {
2377 12353 1979269 if (fd >= PL_perlio_fd_refcnt_size)
2381 0 1991622 if (PL_perlio_fd_refcnt[fd] <= 0) {
2402 1991608 0 if (fd >= 0) {
2407 0 1991608 if (fd >= PL_perlio_fd_refcnt_size) {
2412 0 1991608 if (PL_perlio_fd_refcnt[fd] <= 0) {
2434 10300 0 if (fd >= 0) {
2439 0 10300 if (fd >= PL_perlio_fd_refcnt_size) {
2444 0 10300 if (PL_perlio_fd_refcnt[fd] <= 0) {
2472 37053 12351 for (i=0; i < 3; i++)
2476 37053 12351 for (i=0; i < 3; i++)
2479 12351 0 if (PL_known_layers) {
2483 12351 0 if (PL_def_layerlist) {
2521 12351 0 if (PL_perlio_fd_refcnt_size /* Assuming initial size of zero. */
2522 12351 0 && PL_perlio_fd_refcnt) {
2555 7 0 PERL_ASYNC_CHECK();
2556 2 0 if ( !(PerlIOBase(f)->flags & PERLIO_F_CLEARED) ) {
2564 4 0 while (PerlIOValid(f) &&
2 2 while (PerlIOValid(f) &&
2 0 while (PerlIOValid(f) &&
2579 0 2738435 if (*mode == IoTYPE_IMPLICIT || *mode == IoTYPE_NUMERIC)
2584 183 2551857 if (*++mode == '+') {
2592 129 24102 if (*++mode == '+') {
2602 1 162163 if (*++mode == '+') {
2610 0 2738435 if (*mode == 'b') {
2615 0 2738435 else if (*mode == 't') {
2629 0 2738435 if (*mode || oflags == -1) {
2669 2 1954499 if (*PerlIONext(f)) {
2677 0 2 PerlIOUnix_setfd(aTHX_ f, PerlIO_fileno(PerlIONext(f)),
2691 0 408464 if (PerlIOBase(f)->flags & PERLIO_F_NOTREG) {
2700 408418 46 if (new_loc == (Off_t) - 1)
2711 5 2792918 if (PerlIOValid(f)) {
0 5 if (PerlIOValid(f)) {
2712 0 0 if (PerlIOBase(f)->tab && PerlIOBase(f)->flags & PERLIO_F_OPEN)
0 0 if (PerlIOBase(f)->tab && PerlIOBase(f)->flags & PERLIO_F_OPEN)
2715 2741708 51215 if (narg > 0) {
2716 3273 2738435 if (*mode == IoTYPE_NUMERIC)
2726 2741708 0 if (imode != -1) {
2727 2741680 28 const char *path = SvPV_nolen_const(*args);
2728 2741704 4 if (!IS_SAFE_PATHNAME(*args, "open"))
2733 1948890 844029 if (fd >= 0) {
2734 37011 1911879 if (*mode == IoTYPE_IMPLICIT)
2736 1948886 4 if (!f) {
2739 1948890 0 if (!PerlIOValid(f)) {
1948890 0 if (!PerlIOValid(f)) {
2740 1948890 0 if (!(f = PerlIO_push(aTHX_ f, self, mode, PerlIOArg))) {
2746 162163 1786727 if (*mode == IoTYPE_APPEND)
2766 5604 5 if (flags & PERLIO_DUP_FD) {
2769 5609 0 if (fd >= 0) {
2771 5609 0 if (f) {
2786 3878748 0 if (PerlIO_lockcnt(f)) /* in use: abort ungracefully */
2793 3494851 383897 if (!(PerlIOBase(f)->flags & PERLIO_F_CANREAD) ||
2799 288 3494563 if (len >= 0 || errno != EINTR) {
284 4 if (len >= 0 || errno != EINTR) {
2800 284 3494563 if (len < 0) {
2801 284 0 if (errno != EAGAIN) {
2805 504147 2990416 else if (len == 0 && count != 0) {
2812 0 4 if (PL_sig_pending && S_perlio_async_run(aTHX_ f))
0 1 if (PL_sig_pending && S_perlio_async_run(aTHX_ f))
2823 653220 1 if (PerlIO_lockcnt(f)) /* in use: abort ungracefully */
2832 9 653211 if (len >= 0 || errno != EINTR) {
6 3 if (len >= 0 || errno != EINTR) {
2833 6 653211 if (len < 0) {
2834 6 0 if (errno != EAGAIN) {
2841 0 3 if (PL_sig_pending && S_perlio_async_run(aTHX_ f))
0 1 if (PL_sig_pending && S_perlio_async_run(aTHX_ f))
2862 1954490 0 if (PerlIOBase(f)->flags & PERLIO_F_OPEN) {
2863 37486 1917004 if (PerlIOUnix_refcnt_dec(fd) > 0) {
2872 2 1917002 while (PerlLIO_close(fd) != 0) {
2873 0 2 if (errno != EINTR) {
2878 0 0 if (PL_sig_pending && S_perlio_async_run(aTHX_ f))
0 0 if (PL_sig_pending && S_perlio_async_run(aTHX_ f))
2881 1917002 2 if (code == 0) {
2941 51 0 if (PerlIOValid(f)) {
51 0 if (PerlIOValid(f)) {
2943 51 0 if (s)
2954 0 0 if (mode) {
19 0 if (mode) {
0 0 if (mode) {
0 0 if (mode) {
0 0 if (mode) {
2955 0 0 while (*mode) {
19 19 while (*mode) {
0 0 while (*mode) {
0 0 while (*mode) {
0 0 while (*mode) {
2970 68 0 if (PerlIOValid(f) && PerlIOValid(n = PerlIONext(f))) {
68 0 if (PerlIOValid(f) && PerlIOValid(n = PerlIONext(f))) {
68 0 if (PerlIOValid(f) && PerlIOValid(n = PerlIONext(f))) {
0 68 if (PerlIOValid(f) && PerlIOValid(n = PerlIONext(f))) {
2972 0 0 if (toptab == tab) {
2980 0 0 if (fd >= 0 && (stdio = PerlSIO_fdopen(fd,
0 0 if (fd >= 0 && (stdio = PerlSIO_fdopen(fd,
3000 1 0 if (stdio) {
3002 0 1 if (!mode || !*mode) {
0 0 if (!mode || !*mode) {
3012 1 0 if (!f2) {
3015 0 1 if (!f2) {
3018 0 1 if (!f2) {
3025 1 0 if ((f = PerlIO_push(aTHX_(f = PerlIO_allocate(aTHX)), PERLIO_FUNCS_CAST(&PerlIO_stdio), mode, NULL))) {
3040 0 67 if (PerlIOValid(f)) {
0 0 if (PerlIOValid(f)) {
3041 0 0 const char * const path = SvPV_nolen_const(*args);
3044 0 0 if (!IS_SAFE_PATHNAME(*args, "open"))
3049 0 0 if (!s->stdio)
3056 19 48 if (narg > 0) {
3057 16 3 const char * const path = SvPV_nolen_const(*args);
3058 19 0 if (!IS_SAFE_PATHNAME(*args, "open"))
3060 0 19 if (*mode == IoTYPE_NUMERIC) {
3073 19 0 if (stdio) {
3074 19 0 if (!f) {
3080 19 0 if (f) {
3093 48 0 if (fd >= 0) {
3096 48 0 if (*mode == IoTYPE_IMPLICIT) {
3100 48 0 if (init) {
3117 48 0 if (stdio) {
3118 48 0 if (!f) {
3121 48 0 if ((f = PerlIO_push(aTHX_ f, self, mode, PerlIOArg))) {
3138 0 0 if ((f = PerlIOBase_dup(aTHX_ f, o, param, flags))) {
3142 0 0 if (flags & PERLIO_DUP_FD) {
3144 0 0 if (dfd >= 0) {
3158 0 0 if(stdio) {
3248 0 64 if (!stdio) {
3276 64 0 if (fd != -1 && PerlIOUnix_refcnt_dec(fd) > 0) {
48 16 if (fd != -1 && PerlIOUnix_refcnt_dec(fd) > 0) {
3280 48 16 if (invalidate) {
3282 32 16 if (stdio == stdin) /* Some stdios are buggy fflush-ing inputs */
3284 16 16 if (stdio == stdout || stdio == stderr)
16 0 if (stdio == stdout || stdio == stderr)
3331 0 16 if (invalidate && result != 0) {
3356 27 0 if (PerlIO_lockcnt(f)) /* in use: abort ungracefully */
3360 12 15 if (count == 1) {
3367 9 3 if (ch != EOF) {
3374 9 18 if (got == 0 && PerlSIO_ferror(s))
0 9 if (got == 0 && PerlSIO_ferror(s))
3376 0 27 if (got >= 0 || errno != EINTR)
0 0 if (got >= 0 || errno != EINTR)
3378 0 0 if (PL_sig_pending && S_perlio_async_run(aTHX_ f))
0 0 if (PL_sig_pending && S_perlio_async_run(aTHX_ f))
3413 0 0 if (PerlIO_has_cntptr(f)) {
3420 0 0 while (count > 0) {
3422 0 0 if (ungetc(ch,s) != ch) {
3426 0 0 if ((STDCHAR*)PerlSIO_get_ptr(s) != --eptr || ((*eptr & 0xFF) != ch)) {
0 0 if ((STDCHAR*)PerlSIO_get_ptr(s) != --eptr || ((*eptr & 0xFF) != ch)) {
3437 0 0 if (count > 0) {
3448 20 0 if (PerlIO_lockcnt(f)) /* in use: abort ungracefully */
3453 0 20 if (got >= 0 || errno != EINTR)
0 0 if (got >= 0 || errno != EINTR)
3455 0 0 if (PL_sig_pending && S_perlio_async_run(aTHX_ f))
0 0 if (PL_sig_pending && S_perlio_async_run(aTHX_ f))
3486 64 19 if (PerlIOBase(f)->flags & PERLIO_F_CANWRITE) {
3580 0 0 if (ptr != NULL) {
3621 0 0 if (PerlIO_lockcnt(f)) /* in use: abort ungracefully */
3628 0 0 if ((PerlIOBase(f)->flags & PERLIO_F_CANWRITE)) {
3629 0 0 if (PerlSIO_fflush(stdio) != 0)
3634 0 0 if (c != EOF)
3636 0 0 if (! PerlSIO_ferror(stdio) || errno != EINTR)
0 0 if (! PerlSIO_ferror(stdio) || errno != EINTR)
3638 0 0 if (PL_sig_pending && S_perlio_async_run(aTHX_ f))
0 0 if (PL_sig_pending && S_perlio_async_run(aTHX_ f))
3663 0 0 if (PerlIO_has_cntptr(f)) {
3665 0 0 if (PerlIOStdio_unread(aTHX_ f,&ch,1) == 1) {
3682 0 0 if (PerlSIO_ungetc(c, stdio) != c)
3743 0 0 if (PerlIOValid(f)) {
0 0 if (PerlIOValid(f)) {
3746 0 0 if (!mode || !*mode) {
0 0 if (!mode || !*mode) {
3750 0 0 if (stdio) {
3755 0 0 if ((f2 = PerlIO_push(aTHX_ f, PERLIO_FUNCS_CAST(&PerlIO_stdio), buf, NULL))) {
3777 2 0 while (l) {
3778 2 0 if (l->tab == &PerlIO_stdio) {
3792 0 0 if (stdio) {
3794 0 0 if (fd >= 0)
3806 1 0 while ((l = *p)) {
3807 1 0 if (l->tab == &PerlIO_stdio) {
3809 1 0 if (s->stdio == f) { /* not in a loop */
3811 1 0 if (fd >= 0)
3835 1958667 8 if (fd >= 0 && PerlLIO_isatty(fd)) {
9464 1949203 if (fd >= 0 && PerlLIO_isatty(fd)) {
3838 1958675 0 if (*PerlIONext(f)) {
3840 1917877 40798 if (posn != (Off_t) - 1) {
3852 5 2792989 if (PerlIOValid(f)) {
0 5 if (PerlIOValid(f)) {
3856 0 0 if (tab && tab->Open)
0 0 if (tab && tab->Open)
3860 0 0 if (!next || (*PerlIOBase(f)->tab->Pushed) (aTHX_ f, mode, PerlIOArg, self) != 0) {
0 0 if (!next || (*PerlIOBase(f)->tab->Pushed) (aTHX_ f, mode, PerlIOArg, self) != 0) {
3867 37011 2755983 if (*mode == IoTYPE_IMPLICIT) {
3873 2792994 0 if (tab && tab->Open)
2792994 0 if (tab && tab->Open)
3878 1948961 844033 if (f) {
3879 2 1948959 if (PerlIO_push(aTHX_ f, self, mode, PerlIOArg) == 0) {
3887 12337 1936622 if (init && fd == 2) {
3939 888983 8698228 if (PerlIOBase(f)->flags & PERLIO_F_WRBUF) {
3945 888983 888973 while (p < b->ptr) {
3947 888973 8 if (count > 0) {
3950 0 8 else if (count < 0 || PerlIO_error(n)) {
0 0 else if (count < 0 || PerlIO_error(n)) {
3958 3474619 5223609 else if (PerlIOBase(f)->flags & PERLIO_F_RDBUF) {
3964 215401 3259218 if (b->ptr < b->end) {
3968 215401 0 if (PerlIOValid(n) && PerlIO_seek(n, b->posn, SEEK_SET) == 0) {
215401 0 if (PerlIOValid(n) && PerlIO_seek(n, b->posn, SEEK_SET) == 0) {
215356 45 if (PerlIOValid(n) && PerlIO_seek(n, b->posn, SEEK_SET) == 0) {
3985 9587164 0 if (PerlIOValid(n) && PerlIO_flush(n) != 0)
9587163 1 if (PerlIOValid(n) && PerlIO_flush(n) != 0)
0 9587163 if (PerlIOValid(n) && PerlIO_flush(n) != 0)
4004 3879566 0 if (PerlIO_flush(f) != 0) /* XXXX Check that its seek() succeeded?! */
4006 229 3879337 if (PerlIOBase(f)->flags & PERLIO_F_TTY)
4009 0 3879566 if (!b->buf)
4016 3879566 0 if (!PerlIOValid(n)) {
0 3879566 if (!PerlIOValid(n)) {
4021 818 3878748 if (PerlIO_fast_gets(n)) {
4029 805 13 if (avail <= 0) {
4031 362 443 if (avail == 0)
4034 443 0 if (!PerlIO_error(n) && PerlIO_eof(n))
442 1 if (!PerlIO_error(n) && PerlIO_eof(n))
4038 375 443 if (avail > 0) {
4041 12 363 if (avail > (SSize_t)b->bufsiz)
4050 888772 2990791 if (avail <= 0) {
4051 888486 286 if (avail == 0)
4065 1209263273 0 if (PerlIOValid(f)) {
1209263273 0 if (PerlIOValid(f)) {
4067 1369455 1207893818 if (!b->ptr)
4081 0 346630 if (PerlIOBase(f)->flags & PERLIO_F_WRBUF)
4083 8 346622 if (!b->buf)
4085 346630 0 if (b->buf) {
4086 346622 8 if (PerlIOBase(f)->flags & PERLIO_F_RDBUF) {
4107 345258 1372 if ((SSize_t) count >= 0 && avail > (SSize_t) count) {
4113 346627 3 if (avail > 0) {
4120 346627 0 if (buf != b->ptr) {
4128 4 346626 if (count > 0) {
4141 197621 227202234 if (!b->buf)
4143 227399836 19 if (!(PerlIOBase(f)->flags & PERLIO_F_CANWRITE))
4145 6 227399830 if (PerlIOBase(f)->flags & PERLIO_F_RDBUF) {
4146 6 0 if (PerlIO_flush(f) != 0) {
4150 227399816 20 if (PerlIOBase(f)->flags & PERLIO_F_LINEBUF) {
4152 8 108 while (flushptr > buf && *(flushptr - 1) != '\n')
12 96 while (flushptr > buf && *(flushptr - 1) != '\n')
4155 227490436 227399834 while (count > 0) {
4157 227380260 110176 if ((SSize_t) count >= 0 && (SSize_t) count < avail)
4159 12 227490424 if (flushptr > buf && flushptr <= buf + avail)
12 0 if (flushptr > buf && flushptr <= buf + avail)
4162 227490436 0 if (avail) {
4168 12 227490424 if (buf == flushptr)
4171 110176 227380260 if (b->ptr >= (b->buf + b->bufsiz))
4172 110174 1 if (PerlIO_flush(f) == -1)
4175 9538 227390296 if (PerlIOBase(f)->flags & PERLIO_F_UNBUF)
4184 30903 0 if ((code = PerlIO_flush(f)) == 0) {
4187 30902 1 if (code == 0) {
4203 1 17613117 if ((PerlIOBase(f)->flags & PERLIO_F_APPEND) &&
4216 17601724 11394 if (b->buf) {
4230 2 1958466 if (b->buf && b->buf != (STDCHAR *) & b->oneword) {
2 0 if (b->buf && b->buf != (STDCHAR *) & b->oneword) {
4243 1909073 49372 if (b->buf && b->buf != (STDCHAR *) & b->oneword) {
1909073 0 if (b->buf && b->buf != (STDCHAR *) & b->oneword) {
4255 0 1326308388 if (!b->buf)
4264 341819 1331320399 if (!b->buf)
4266 1329421591 2240627 if (PerlIOBase(f)->flags & PERLIO_F_RDBUF)
4277 1909085 3474634 if (!b->buf) {
4278 1909085 0 if (!b->bufsiz)
4281 0 1909085 if (!b->buf) {
4294 0 15 if (!b->buf)
4306 0 1326268557 if (!b->buf)
4393 8 0 if (b->buf && b->buf != (STDCHAR *) & b->oneword) {
8 0 if (b->buf && b->buf != (STDCHAR *) & b->oneword) {
4404 7 24460 if (cnt <= 0) {
4432 24460 6 if ((SSize_t) count >= 0 && (SSize_t)count < avail)
4434 24466 0 if (avail > 0)
4436 0 24466 if (got >= 0 && got < (SSize_t)count) {
4439 0 0 if (more >= 0 || got == 0)
4507 3 0 if (PerlIOValid(g)) {
3 0 if (PerlIOValid(g)) {
958 0 if (PerlIOValid(g)) {
958 0 if (PerlIOValid(g)) {
0 0 if (PerlIOValid(g)) {
0 0 if (PerlIOValid(g)) {
4508 1 2 if (PerlIOBase(g)->flags & PERLIO_F_UTF8) {
3 955 if (PerlIOBase(g)->flags & PERLIO_F_UTF8) {
0 0 if (PerlIOBase(g)->flags & PERLIO_F_UTF8) {
4529 961 0 if (PerlIOValid(g)) {
961 0 if (PerlIOValid(g)) {
4531 961 0 if (b && b->tab == &PerlIO_crlf) {
3 958 if (b && b->tab == &PerlIO_crlf) {
4532 0 3 if (!(b->flags & PERLIO_F_CRLF))
4549 0 26 if (c->nl) { /* XXXX Shouldn't it be done only if b->ptr > c->nl? */
4553 0 26 if (!(PerlIOBase(f)->flags & PERLIO_F_CRLF))
4559 0 26 if (PerlIOBase(f)->flags & PERLIO_F_WRBUF)
4561 0 26 if (!b->buf)
4563 26 0 if (b->buf) {
4564 0 26 if (!(PerlIOBase(f)->flags & PERLIO_F_RDBUF)) {
4569 26 25 while (count > 0 && b->ptr > b->buf) {
25 1 while (count > 0 && b->ptr > b->buf) {
4571 12 13 if (ch == '\n') {
4572 0 12 if (b->ptr - 2 >= b->buf) {
4593 1 25 if (count > 0)
4604 11 41298 if (!b->buf)
4606 40852 457 if (PerlIOBase(f)->flags & PERLIO_F_RDBUF) {
4608 40852 0 if ((PerlIOBase(f)->flags & PERLIO_F_CRLF) && (!c->nl || *c->nl == NATIVE_0xd)) {
19753 21099 if ((PerlIOBase(f)->flags & PERLIO_F_CRLF) && (!c->nl || *c->nl == NATIVE_0xd)) {
8 19745 if ((PerlIOBase(f)->flags & PERLIO_F_CRLF) && (!c->nl || *c->nl == NATIVE_0xd)) {
4609 8 21099 STDCHAR *nl = (c->nl) ? c->nl : b->ptr;
4611 101989 1250 while (nl < b->end && *nl != NATIVE_0xd)
82132 19857 while (nl < b->end && *nl != NATIVE_0xd)
4613 19857 1250 if (nl < b->end && *nl == NATIVE_0xd) {
19857 0 if (nl < b->end && *nl == NATIVE_0xd) {
4615 19849 12 if (nl + 1 < b->end) {
4616 19849 0 if (nl[1] == NATIVE_0xa) {
4633 8 4 if (b->ptr < nl) {
4657 4 0 if (code == 0)
4667 39594 1250 return (((c->nl) ? (c->nl + 1) : b->end) - b->ptr);
4677 0 39816 if (!b->buf)
4679 0 39816 if (!ptr) {
4680 0 0 if (c->nl) {
4682 0 0 if (ptr == b->end && *c->nl == NATIVE_0xd) {
0 0 if (ptr == b->end && *c->nl == NATIVE_0xd) {
4713 39193 623 if (c->nl) {
4714 19847 19346 if (ptr > c->nl) {
4730 0 1621 if (!(PerlIOBase(f)->flags & PERLIO_F_CRLF))
4736 319 1302 if (!b->buf)
4738 1621 0 if (!(PerlIOBase(f)->flags & PERLIO_F_CANWRITE))
4740 1624 1621 while (buf < ebuf) {
4743 33021 1621 while (buf < ebuf && b->ptr < eptr) {
33021 0 while (buf < ebuf && b->ptr < eptr) {
4744 3413 29608 if (*buf == '\n') {
4745 1 3412 if ((b->ptr + 2) > eptr) {
4756 0 3412 if (PerlIOBase(f)->flags & PERLIO_F_LINEBUF) {
4765 2 33018 if (b->ptr >= eptr) {
4771 0 1621 if (PerlIOBase(f)->flags & PERLIO_F_UNBUF)
4781 6 2973 if (c->nl) {
4791 3 0 if ((PerlIOBase(f)->flags & PERLIO_F_CRLF)) {
4837 22 448070 if (!PL_perlio) {
4847 18 1153479 if (!PL_perlio) {
4857 50 1141275 if (!PL_perlio) {
4929 663845783 137836 if ( 1 == PerlIO_read(f, buf, 1) ) {
4940 338574 164 if (ch != EOF) {
4942 338574 0 if (PerlIO_unread(f, &buf, 1) == 1)
4990 58004 0 s = SvPV_const(sv, len);
5037 181 0 const char * const tmpdir = TAINTING_get ? NULL : PerlEnv_getenv("TMPDIR");
5042 2 179 if (tmpdir && *tmpdir) {
2 0 if (tmpdir && *tmpdir) {
5048 180 1 if (fd < 0) {
5053 181 0 if (fd >= 0) {
5055 181 0 if (f)
5057 1 180 PerlLIO_unlink(sv ? SvPVX_const(sv) : tempname);
5092 2494575 0 if (!PL_curcop)
5095 2488070 6505 if (mode && mode[0] != 'r') {
230625 2257445 if (mode && mode[0] != 'r') {
5096 13 230612 if (PL_curcop->cop_hints & HINT_LEXICAL_IO_OUT)
5099 47 2263903 if (PL_curcop->cop_hints & HINT_LEXICAL_IO_IN)
5102 60 2494515 if (!direction)
5108 0 60 return SvOK(layers) ? SvPV_nolen_const(layers) : NULL;
0 0 return SvOK(layers) ? SvPV_nolen_const(layers) : NULL;
0 0 return SvOK(layers) ? SvPV_nolen_const(layers) : NULL;
60 0 return SvOK(layers) ? SvPV_nolen_const(layers) : NULL;
5117 1 547 if (SvOK(pos)) {
1 0 if (SvOK(pos)) {
0 1 if (SvOK(pos)) {
5120 547 0 const Off_t * const posn = (Off_t *) SvPV(pos, len);
5121 547 0 if (f && len == sizeof(Off_t))
547 0 if (f && len == sizeof(Off_t))
5157 550 0 return (posn == (Off_t) - 1) ? -1 : 0;
5202 0 0 const int val = my_vsnprintf(s, n > 0 ? n : 0, fmt, ap);
0 0 const int val = my_vsnprintf(s, n > 0 ? n : 0, fmt, ap);