| line |
true |
false |
branch |
|
128
|
108 |
0 |
if (h) h->fd = -1; |
|
135
|
108 |
0 |
if (!h || h->closed) return; |
|
|
0 |
108 |
if (!h || h->closed) return; |
|
137
|
0 |
108 |
if (h->cur_entry_rv) { |
|
141
|
108 |
0 |
if (h->plugin && h->cursor) { |
|
|
108 |
0 |
if (h->plugin && h->cursor) { |
|
142
|
39 |
69 |
if (h->is_writer) { |
|
143
|
39 |
0 |
if (h->plugin->write_close) |
|
146
|
69 |
0 |
if (h->plugin->read_close) |
|
150
|
8 |
100 |
if (h->gz_src) archive_gz_src_free(h->gz_src); |
|
151
|
4 |
104 |
if (h->gz_sink) { |
|
155
|
108 |
0 |
if (h->fd >= 0) close(h->fd); |
|
178
|
1 |
69 |
if (fd < 0) croak("File::Raw::Archive: cannot open '%s': %s", |
|
183
|
0 |
69 |
if (!plugin) { |
|
189
|
0 |
69 |
if (!h) { close(fd); croak("File::Raw::Archive: out of memory"); } |
|
194
|
8 |
61 |
if (gz) { |
|
196
|
0 |
8 |
if (!h->gz_src) { |
|
208
|
0 |
69 |
if (plugin->read_open(aTHX_ plugin, pull, src, opts, &h->cursor) < 0) { |
|
220
|
0 |
0 |
if (h->consumed) return; |
|
224
|
0 |
0 |
buf, sizeof buf)) > 0) {} |
|
226
|
0 |
0 |
if (n < 0) croak("File::Raw::Archive: read_data failed"); |
|
239
|
40 |
0 |
if (opts) { |
|
241
|
4 |
36 |
if (sv && *sv && SvOK(*sv)) { |
|
|
4 |
0 |
if (sv && *sv && SvOK(*sv)) { |
|
|
4 |
0 |
if (sv && *sv && SvOK(*sv)) { |
|
244
|
4 |
0 |
if (nn == 4 && memcmp(pp, "gzip", 4) == 0) gz = 1; |
|
|
4 |
0 |
if (nn == 4 && memcmp(pp, "gzip", 4) == 0) gz = 1; |
|
245
|
0 |
0 |
else if (nn == 4 && memcmp(pp, "auto", 4) == 0) { |
|
|
0 |
0 |
else if (nn == 4 && memcmp(pp, "auto", 4) == 0) { |
|
248
|
0 |
0 |
if (pl >= 3 && memcmp(pp2 + pl - 3, ".gz", 3) == 0) gz = 1; |
|
|
0 |
0 |
if (pl >= 3 && memcmp(pp2 + pl - 3, ".gz", 3) == 0) gz = 1; |
|
254
|
0 |
40 |
if (fd < 0) croak("File::Raw::Archive: cannot open '%s' for write: %s", |
|
258
|
40 |
0 |
SV **sv = opts ? hv_fetchs(opts, "plugin", 0) : NULL; |
|
259
|
1 |
39 |
if (sv && *sv && SvOK(*sv)) { |
|
|
1 |
0 |
if (sv && *sv && SvOK(*sv)) { |
|
|
1 |
0 |
if (sv && *sv && SvOK(*sv)) { |
|
263
|
0 |
1 |
if (nn >= sizeof namebuf) { |
|
274
|
1 |
39 |
if (!plugin) { close(fd); croak("File::Raw::Archive: unknown plugin"); } |
|
277
|
0 |
39 |
if (!h) { close(fd); croak("File::Raw::Archive: out of memory"); } |
|
283
|
4 |
35 |
if (gz) { |
|
285
|
4 |
0 |
if (opts) { |
|
287
|
2 |
2 |
if (lsv && *lsv && SvOK(*lsv)) level = (int)SvIV(*lsv); |
|
|
2 |
0 |
if (lsv && *lsv && SvOK(*lsv)) level = (int)SvIV(*lsv); |
|
|
2 |
0 |
if (lsv && *lsv && SvOK(*lsv)) level = (int)SvIV(*lsv); |
|
290
|
0 |
4 |
if (!h->gz_sink) { |
|
302
|
0 |
39 |
if (plugin->write_open(aTHX_ plugin, push, sink, opts, &h->cursor) < 0) { |
|
319
|
0 |
66 |
if (pos < 0) return 0; |
|
322
|
0 |
66 |
if (n < 2) return 0; |
|
323
|
6 |
60 |
return (magic[0] == 0x1f && magic[1] == 0x8b); |
|
|
6 |
0 |
return (magic[0] == 0x1f && magic[1] == 0x8b); |
|
330
|
0 |
69 |
if (!opts) return sniff_gzip(fd); |
|
332
|
5 |
64 |
if (!sv || !*sv || !SvOK(*sv)) return sniff_gzip(fd); |
|
|
5 |
0 |
if (!sv || !*sv || !SvOK(*sv)) return sniff_gzip(fd); |
|
|
0 |
5 |
if (!sv || !*sv || !SvOK(*sv)) return sniff_gzip(fd); |
|
335
|
5 |
0 |
if (n == 4 && memcmp(p, "auto", 4) == 0) return sniff_gzip(fd); |
|
|
2 |
3 |
if (n == 4 && memcmp(p, "auto", 4) == 0) return sniff_gzip(fd); |
|
336
|
3 |
0 |
if (n == 4 && memcmp(p, "gzip", 4) == 0) return 1; |
|
|
2 |
1 |
if (n == 4 && memcmp(p, "gzip", 4) == 0) return 1; |
|
337
|
1 |
0 |
if (n == 4 && memcmp(p, "none", 4) == 0) return 0; |
|
|
1 |
0 |
if (n == 4 && memcmp(p, "none", 4) == 0) return 0; |
|
345
|
69 |
0 |
SV **sv = opts ? hv_fetchs(opts, "plugin", 0) : NULL; |
|
346
|
0 |
69 |
if (sv && *sv && SvOK(*sv)) { |
|
|
0 |
0 |
if (sv && *sv && SvOK(*sv)) { |
|
|
0 |
0 |
if (sv && *sv && SvOK(*sv)) { |
|
349
|
0 |
0 |
if (n == 4 && memcmp(p, "auto", 4) == 0) { |
|
|
0 |
0 |
if (n == 4 && memcmp(p, "auto", 4) == 0) { |
|
353
|
0 |
0 |
if (pos < 0) return NULL; |
|
356
|
0 |
0 |
if (gz) return archive_lookup_plugin(aTHX_ "tar"); |
|
359
|
0 |
0 |
if (got <= 0) return NULL; |
|
363
|
0 |
0 |
if (n >= sizeof namebuf) return NULL; |
|
378
|
564 |
0 |
hv_stores(h, "name", newSVpvn(e->name ? e->name : "", e->name_len)); |
|
387
|
0 |
564 |
if (e->link_target) |
|
390
|
0 |
564 |
if (e->xattr_count > 0) { |
|
393
|
0 |
0 |
for (i = 0; i < e->xattr_count; i++) { |
|
411
|
111 |
0 |
av_store(meta, M_NAME, |
|
421
|
4 |
107 |
if (e->link_target) { |
|
425
|
3 |
108 |
if (e->xattr_count > 0) { |
|
428
|
5 |
3 |
for (i = 0; i < e->xattr_count; i++) { |
|
449
|
678 |
0 |
if (sv && *sv && SvOK(*sv)) { |
|
|
678 |
0 |
if (sv && *sv && SvOK(*sv)) { |
|
|
678 |
0 |
if (sv && *sv && SvOK(*sv)) { |
|
455
|
678 |
0 |
if (sv && *sv && SvOK(*sv)) e->type = (int)SvIV(*sv); |
|
|
678 |
0 |
if (sv && *sv && SvOK(*sv)) e->type = (int)SvIV(*sv); |
|
|
678 |
0 |
if (sv && *sv && SvOK(*sv)) e->type = (int)SvIV(*sv); |
|
459
|
678 |
0 |
if (sv && *sv && SvOK(*sv)) e->mode = (uint32_t)SvUV(*sv); |
|
|
678 |
0 |
if (sv && *sv && SvOK(*sv)) e->mode = (uint32_t)SvUV(*sv); |
|
|
678 |
0 |
if (sv && *sv && SvOK(*sv)) e->mode = (uint32_t)SvUV(*sv); |
|
462
|
0 |
678 |
if (sv && *sv && SvOK(*sv)) e->size = (uint64_t)SvUV(*sv); |
|
|
0 |
0 |
if (sv && *sv && SvOK(*sv)) e->size = (uint64_t)SvUV(*sv); |
|
|
0 |
0 |
if (sv && *sv && SvOK(*sv)) e->size = (uint64_t)SvUV(*sv); |
|
465
|
8 |
670 |
if (sv && *sv && SvOK(*sv)) { |
|
|
8 |
0 |
if (sv && *sv && SvOK(*sv)) { |
|
|
8 |
0 |
if (sv && *sv && SvOK(*sv)) { |
|
466
|
8 |
0 |
if (SvNOKp(*sv) || (SvPOKp(*sv) && strchr(SvPV_nolen(*sv), '.'))) { |
|
|
0 |
8 |
if (SvNOKp(*sv) || (SvPOKp(*sv) && strchr(SvPV_nolen(*sv), '.'))) { |
|
|
0 |
0 |
if (SvNOKp(*sv) || (SvPOKp(*sv) && strchr(SvPV_nolen(*sv), '.'))) { |
|
470
|
0 |
0 |
if (frac < 0) frac = 0; |
|
473
|
0 |
0 |
if (e->mtime_ns >= 1000000000U) { |
|
482
|
4 |
674 |
if (sv && *sv && SvOK(*sv)) e->mtime_ns = (uint32_t)SvUV(*sv); |
|
|
4 |
0 |
if (sv && *sv && SvOK(*sv)) e->mtime_ns = (uint32_t)SvUV(*sv); |
|
|
4 |
0 |
if (sv && *sv && SvOK(*sv)) e->mtime_ns = (uint32_t)SvUV(*sv); |
|
485
|
8 |
670 |
if (sv && *sv && SvOK(*sv)) e->uid = (uint32_t)SvUV(*sv); |
|
|
8 |
0 |
if (sv && *sv && SvOK(*sv)) e->uid = (uint32_t)SvUV(*sv); |
|
|
8 |
0 |
if (sv && *sv && SvOK(*sv)) e->uid = (uint32_t)SvUV(*sv); |
|
487
|
6 |
672 |
if (sv && *sv && SvOK(*sv)) e->gid = (uint32_t)SvUV(*sv); |
|
|
6 |
0 |
if (sv && *sv && SvOK(*sv)) e->gid = (uint32_t)SvUV(*sv); |
|
|
6 |
0 |
if (sv && *sv && SvOK(*sv)) e->gid = (uint32_t)SvUV(*sv); |
|
490
|
4 |
674 |
if (sv && *sv && SvOK(*sv)) { |
|
|
4 |
0 |
if (sv && *sv && SvOK(*sv)) { |
|
|
4 |
0 |
if (sv && *sv && SvOK(*sv)) { |
|
497
|
3 |
675 |
if (sv && *sv && SvROK(*sv) && SvTYPE(SvRV(*sv)) == SVt_PVHV) { |
|
|
3 |
0 |
if (sv && *sv && SvROK(*sv) && SvTYPE(SvRV(*sv)) == SVt_PVHV) { |
|
|
3 |
0 |
if (sv && *sv && SvROK(*sv) && SvTYPE(SvRV(*sv)) == SVt_PVHV) { |
|
|
3 |
0 |
if (sv && *sv && SvROK(*sv) && SvTYPE(SvRV(*sv)) == SVt_PVHV) { |
|
501
|
5 |
3 |
while ((he = hv_iternext(xh)) && *xattr_used < xattr_buf_n) { |
|
|
5 |
0 |
while ((he = hv_iternext(xh)) && *xattr_used < xattr_buf_n) { |
|
530
|
837 |
1 |
if (!SvROK(sv) || !SvIOK(SvRV(sv))) return NULL; |
|
|
0 |
837 |
if (!SvROK(sv) || !SvIOK(SvRV(sv))) return NULL; |
|
541
|
158 |
0 |
if (!handle_sv || !SvROK(handle_sv)) return; |
|
|
1 |
157 |
if (!handle_sv || !SvROK(handle_sv)) return; |
|
543
|
0 |
157 |
if (!SvIOK(iv_sv)) return; |
|
545
|
78 |
79 |
if (!h) return; |
|
558
|
0 |
0 |
if (!p || !*p || !SvOK(*p)) return NULL; |
|
|
0 |
0 |
if (!p || !*p || !SvOK(*p)) return NULL; |
|
|
0 |
0 |
if (!p || !*p || !SvOK(*p)) return NULL; |
|
594
|
27 |
110 |
for (i = 0; i + 1 < count; i += 2) { |
|
614
|
10 |
0 |
if (!h || h->is_writer || h->closed) |
|
|
10 |
0 |
if (!h || h->is_writer || h->closed) |
|
|
0 |
10 |
if (!h || h->is_writer || h->closed) |
|
616
|
10 |
0 |
if (dest_len == 0 || dest_len >= sizeof path_buf - 2) |
|
|
0 |
10 |
if (dest_len == 0 || dest_len >= sizeof path_buf - 2) |
|
619
|
0 |
10 |
has_filter = (filter_sv && SvOK(filter_sv) && SvROK(filter_sv) && |
|
|
0 |
0 |
has_filter = (filter_sv && SvOK(filter_sv) && SvROK(filter_sv) && |
|
|
0 |
0 |
has_filter = (filter_sv && SvOK(filter_sv) && SvROK(filter_sv) && |
|
620
|
0 |
0 |
SvTYPE(SvRV(filter_sv)) == SVt_PVCV); |
|
622
|
0 |
10 |
if (archive_mkpath(dest, 0755) < 0) { |
|
630
|
0 |
95 |
if (rc < 0) croak("File::Raw::Archive: malformed archive"); |
|
631
|
8 |
87 |
if (rc == 0) break; |
|
633
|
87 |
0 |
if (!unsafe_paths) { |
|
634
|
2 |
85 |
if (!archive_path_is_safe(e.name, e.name_len)) { |
|
640
|
0 |
85 |
if (has_filter) { |
|
645
|
0 |
0 |
PUSHMARK(SP); |
|
648
|
0 |
0 |
XPUSHs(entry_rv); |
|
652
|
0 |
0 |
if (count >= 1) { |
|
657
|
0 |
0 |
FREETMPS; |
|
659
|
0 |
0 |
if (!keep) { |
|
662
|
0 |
0 |
skip_buf, sizeof skip_buf)) > 0) {} |
|
663
|
0 |
0 |
if (n < 0) croak("File::Raw::Archive: read_data failed"); |
|
668
|
0 |
85 |
if (dest_len + 1 + e.name_len + 1 > sizeof path_buf) { |
|
679
|
0 |
2 |
if (archive_extract_dir(path_buf, e.mode) < 0) { |
|
685
|
2 |
0 |
const char *target = e.link_target ? e.link_target : ""; |
|
686
|
0 |
2 |
if (archive_extract_symlink(path_buf, target) < 0) { |
|
692
|
0 |
2 |
skip_buf, sizeof skip_buf)) > 0) {} |
|
693
|
0 |
2 |
if (n < 0) croak("File::Raw::Archive: read_data failed"); |
|
697
|
0 |
81 |
if (archive_make_parent_dir(path_buf) < 0) { |
|
702
|
0 |
81 |
if (archive_extract_entry(aTHX_ h->plugin, h->cursor, &e, |
|
705
|
0 |
0 |
croak("File::Raw::Archive::extract_all: %s '%s': %s", |
|
713
|
0 |
0 |
skip_buf, sizeof skip_buf)) > 0) {} |
|
714
|
0 |
0 |
if (n < 0) croak("File::Raw::Archive: read_data failed"); |
|
728
|
13 |
0 |
if (!h || h->is_writer || h->closed) |
|
|
13 |
0 |
if (!h || h->is_writer || h->closed) |
|
|
0 |
13 |
if (!h || h->is_writer || h->closed) |
|
735
|
3 |
574 |
if (rc < 0) { |
|
739
|
10 |
564 |
if (rc == 0) break; |
|
748
|
564 |
564 |
skip_buf, sizeof skip_buf)) > 0) {} |
|
749
|
0 |
564 |
if (n < 0) { |
|
766
|
5 |
0 |
if (!h || h->is_writer || h->closed) |
|
|
5 |
0 |
if (!h || h->is_writer || h->closed) |
|
|
0 |
5 |
if (!h || h->is_writer || h->closed) |
|
772
|
0 |
13 |
if (rc < 0) croak("File::Raw::Archive: malformed archive"); |
|
773
|
2 |
11 |
if (rc == 0) return 0; |
|
775
|
4 |
7 |
if (e.name_len == match_len |
|
776
|
3 |
1 |
&& memcmp(e.name, match_name, match_len) == 0) { |
|
777
|
3 |
0 |
if (e.type == AE_FILE) { |
|
778
|
0 |
3 |
if (archive_make_parent_dir(dest_path) < 0) { |
|
783
|
0 |
3 |
if (archive_extract_entry(aTHX_ h->plugin, h->cursor, &e, |
|
786
|
0 |
0 |
croak("File::Raw::Archive::extract: %s '%s': %s", |
|
789
|
0 |
0 |
} else if (e.type == AE_DIR) { |
|
790
|
0 |
0 |
if (archive_extract_dir(dest_path, e.mode) < 0) { |
|
794
|
0 |
0 |
} else if (e.type == AE_SYMLINK) { |
|
795
|
0 |
0 |
const char *target = e.link_target ? e.link_target : ""; |
|
796
|
0 |
0 |
if (archive_extract_symlink(dest_path, target) < 0) { |
|
806
|
6 |
8 |
skip_buf, sizeof skip_buf)) > 0) {} |
|
807
|
0 |
8 |
if (n < 0) croak("File::Raw::Archive: read_data failed"); |
|
838
|
4 |
0 |
if (!h || h->is_writer || h->closed) |
|
|
4 |
0 |
if (!h || h->is_writer || h->closed) |
|
|
0 |
4 |
if (!h || h->is_writer || h->closed) |
|
841
|
1 |
3 |
has_filter = (filter_sv && SvOK(filter_sv) && SvROK(filter_sv) && |
|
|
1 |
0 |
has_filter = (filter_sv && SvOK(filter_sv) && SvROK(filter_sv) && |
|
|
1 |
0 |
has_filter = (filter_sv && SvOK(filter_sv) && SvROK(filter_sv) && |
|
842
|
1 |
0 |
SvTYPE(SvRV(filter_sv)) == SVt_PVCV); |
|
847
|
0 |
50 |
if (rc < 0) croak("File::Raw::Archive: malformed archive"); |
|
848
|
4 |
46 |
if (rc == 0) break; |
|
853
|
40 |
6 |
if (has_filter) { |
|
858
|
0 |
40 |
PUSHMARK(SP); |
|
859
|
0 |
40 |
XPUSHs(sv_2mortal(SvREFCNT_inc(entry_obj))); |
|
863
|
40 |
0 |
if (count >= 1) { |
|
868
|
40 |
0 |
FREETMPS; |
|
870
|
20 |
20 |
if (!keep) { |
|
874
|
20 |
20 |
skip_buf, sizeof skip_buf)) > 0) {} |
|
875
|
0 |
20 |
if (n < 0) croak("File::Raw::Archive: read_data failed"); |
|
884
|
0 |
26 |
PUSHMARK(SP); |
|
885
|
0 |
26 |
XPUSHs(sv_2mortal(SvREFCNT_inc(entry_obj))); |
|
888
|
26 |
0 |
FREETMPS; |
|
897
|
26 |
26 |
skip_buf, sizeof skip_buf)) > 0) {} |
|
898
|
0 |
26 |
if (n < 0) croak("File::Raw::Archive: read_data failed"); |
|
927
|
0 |
0 |
if (rc == 1) break; /* clean EOF */ |
|
928
|
0 |
0 |
if (rc < 0) { |
|
949
|
0 |
0 |
if (archive_extract_bytes(&e, job.path, |
|
954
|
0 |
0 |
job.path, stage ? stage : "?", |
|
956
|
0 |
0 |
if (n > 0) { |
|
957
|
0 |
0 |
if ((size_t)n > sizeof errbuf) n = (int)sizeof errbuf; |
|
990
|
1 |
0 |
if (!h || h->is_writer || h->closed) |
|
|
1 |
0 |
if (!h || h->is_writer || h->closed) |
|
|
0 |
1 |
if (!h || h->is_writer || h->closed) |
|
992
|
1 |
0 |
if (dest_len == 0 || dest_len >= sizeof path_buf - 2) |
|
|
0 |
1 |
if (dest_len == 0 || dest_len >= sizeof path_buf - 2) |
|
994
|
0 |
1 |
if (parallel < 1) parallel = 1; |
|
996
|
0 |
1 |
has_filter = (filter_sv && SvOK(filter_sv) && SvROK(filter_sv) && |
|
|
0 |
0 |
has_filter = (filter_sv && SvOK(filter_sv) && SvROK(filter_sv) && |
|
|
0 |
0 |
has_filter = (filter_sv && SvOK(filter_sv) && SvROK(filter_sv) && |
|
997
|
0 |
0 |
SvTYPE(SvRV(filter_sv)) == SVt_PVCV); |
|
999
|
0 |
1 |
if (archive_mkpath(dest, 0755) < 0) { |
|
1004
|
0 |
1 |
if (pipe(err_pipe) < 0) croak("pipe: %s", strerror(errno)); |
|
1009
|
0 |
1 |
if (!workers) { |
|
1021
|
4 |
1 |
for (i = 0; i < parallel; i++) { |
|
1023
|
0 |
4 |
if (pipe(job_pipe) < 0) { |
|
1026
|
0 |
0 |
for (j = 0; j < num_started; j++) { |
|
1037
|
0 |
4 |
if (pid < 0) { |
|
1041
|
0 |
0 |
for (j = 0; j < num_started; j++) { |
|
1051
|
0 |
4 |
if (pid == 0) { |
|
1057
|
0 |
0 |
for (j = 0; j < num_started; j++) { |
|
1077
|
0 |
61 |
if (rc < 0) { |
|
1082
|
1 |
60 |
if (rc == 0) break; |
|
1084
|
60 |
0 |
if (!unsafe_paths) { |
|
1085
|
0 |
60 |
if (!archive_path_is_safe(e.name, e.name_len)) { |
|
1094
|
0 |
60 |
if (has_filter) { |
|
1099
|
0 |
0 |
PUSHMARK(SP); |
|
1102
|
0 |
0 |
XPUSHs(entry_rv); |
|
1106
|
0 |
0 |
if (count >= 1) { |
|
1111
|
0 |
0 |
FREETMPS; |
|
1113
|
0 |
0 |
if (!keep) { |
|
1116
|
0 |
0 |
skip_buf, sizeof skip_buf)) > 0) {} |
|
1117
|
0 |
0 |
if (n < 0) { snprintf(err_msg, sizeof err_msg, "read_data failed"); dispatch_err = 1; break; } |
|
1122
|
0 |
60 |
if (dest_len + 1 + e.name_len + 1 > sizeof path_buf) { |
|
1133
|
0 |
60 |
if (e.type == AE_DIR) { |
|
1134
|
0 |
0 |
if (archive_extract_dir(path_buf, e.mode) < 0) { |
|
1142
|
0 |
60 |
if (e.type == AE_SYMLINK) { |
|
1143
|
0 |
0 |
const char *target = e.link_target ? e.link_target : ""; |
|
1144
|
0 |
0 |
if (archive_extract_symlink(path_buf, target) < 0) { |
|
1150
|
0 |
0 |
skip_buf, sizeof skip_buf)) > 0) {} |
|
1151
|
0 |
0 |
if (n < 0) { snprintf(err_msg, sizeof err_msg, "read_data failed"); dispatch_err = 1; break; } |
|
1154
|
0 |
60 |
if (e.type != AE_FILE) { |
|
1157
|
0 |
0 |
skip_buf, sizeof skip_buf)) > 0) {} |
|
1158
|
0 |
0 |
if (n < 0) { snprintf(err_msg, sizeof err_msg, "read_data failed"); dispatch_err = 1; break; } |
|
1163
|
0 |
60 |
if (archive_make_parent_dir(path_buf) < 0) { |
|
1174
|
60 |
60 |
if (content_len + 16384 > content_cap) { |
|
1175
|
0 |
60 |
size_t new_cap = content_cap ? content_cap * 2 : 65536; |
|
1176
|
0 |
60 |
while (new_cap < content_len + 16384) new_cap *= 2; |
|
1178
|
0 |
60 |
if (!p) { read_err = 1; break; } |
|
1184
|
0 |
120 |
if (n < 0) { read_err = 1; break; } |
|
1185
|
60 |
60 |
if (n == 0) break; |
|
1188
|
0 |
60 |
if (read_err) { |
|
1197
|
0 |
60 |
if (marshal_job(path_buf, strlen(path_buf), |
|
1212
|
0 |
60 |
if (marshal_send(workers[rr].write_fd, payload, payload_len) < 0) { |
|
1225
|
4 |
1 |
for (i = 0; i < num_started; i++) { |
|
1226
|
4 |
0 |
if (workers[i].write_fd >= 0) { |
|
1238
|
0 |
1 |
if (n < 0) { |
|
1239
|
0 |
0 |
if (errno == EINTR) continue; |
|
1242
|
1 |
0 |
if (n == 0) break; |
|
1249
|
4 |
1 |
for (i = 0; i < num_started; i++) { |
|
1257
|
0 |
1 |
if (dispatch_err) { |
|
1262
|
0 |
1 |
if (err_len > 0) { |
|
1308
|
0 |
0 |
if (SvROK(self_sv) && SvTYPE(SvRV(self_sv)) == SVt_PVAV) { |
|
|
0 |
0 |
if (SvROK(self_sv) && SvTYPE(SvRV(self_sv)) == SVt_PVAV) { |
|
1311
|
0 |
0 |
if (meta_ref && *meta_ref && SvROK(*meta_ref) |
|
|
0 |
0 |
if (meta_ref && *meta_ref && SvROK(*meta_ref) |
|
|
0 |
0 |
if (meta_ref && *meta_ref && SvROK(*meta_ref) |
|
1312
|
0 |
0 |
&& SvTYPE(SvRV(*meta_ref)) == SVt_PVAV) { |
|
1315
|
0 |
0 |
if (val && *val && SvOK(*val)) { |
|
|
0 |
0 |
if (val && *val && SvOK(*val)) { |
|
|
0 |
0 |
if (val && *val && SvOK(*val)) { |
|
1320
|
0 |
0 |
switch (slot) { |
|
1333
|
0 |
0 |
XPUSHs(result); |
|
1346
|
0 |
0 |
if (SvROK(self_sv) && SvTYPE(SvRV(self_sv)) == SVt_PVAV) { |
|
|
0 |
0 |
if (SvROK(self_sv) && SvTYPE(SvRV(self_sv)) == SVt_PVAV) { |
|
1349
|
0 |
0 |
if (meta_ref && *meta_ref && SvROK(*meta_ref) |
|
|
0 |
0 |
if (meta_ref && *meta_ref && SvROK(*meta_ref) |
|
|
0 |
0 |
if (meta_ref && *meta_ref && SvROK(*meta_ref) |
|
1350
|
0 |
0 |
&& SvTYPE(SvRV(*meta_ref)) == SVt_PVAV) { |
|
1353
|
0 |
0 |
if (type_ref && *type_ref && SvOK(*type_ref)) |
|
|
0 |
0 |
if (type_ref && *type_ref && SvOK(*type_ref)) |
|
|
0 |
0 |
if (type_ref && *type_ref && SvOK(*type_ref)) |
|
1362
|
0 |
0 |
case 4: rc = (t == AE_SYMLINK || t == AE_HARDLINK); break; |
|
|
0 |
0 |
case 4: rc = (t == AE_SYMLINK || t == AE_HARDLINK); break; |
|
1364
|
0 |
0 |
XPUSHs(rc ? &PL_sv_yes : &PL_sv_no); |
|
|
0 |
0 |
XPUSHs(rc ? &PL_sv_yes : &PL_sv_no); |
|
1388
|
0 |
0 |
if (!OpHAS_SIBLING(pushop)) { |
|
1391
|
0 |
0 |
self_op = OpSIBLING(pushop); |
|
1392
|
0 |
0 |
if (!self_op) return entersubop; |
|
1393
|
0 |
0 |
cv_op = OpSIBLING(self_op); |
|
1394
|
0 |
0 |
if (!cv_op) return entersubop; |
|
1395
|
0 |
0 |
if (OpSIBLING(cv_op)) return entersubop; /* extra args */ |
|
|
0 |
0 |
if (OpSIBLING(cv_op)) return entersubop; /* extra args */ |
|
1406
|
0 |
0 |
newop->op_ppaddr = is_predicate ? pp_entry_predicate : pp_entry_accessor; |
|
1421
|
0 |
435 |
if (!cv) return; |
|
1422
|
116 |
319 |
SV *ckobj = newSViv(((IV)slot_or_kind << 1) |
|
1494
|
0 |
0 |
if (!SvOK(path_sv)) croak("File::Raw::Archive::_open_read: undef path"); |
|
1495
|
0 |
0 |
if (SvROK(opts_sv) && SvTYPE(SvRV(opts_sv)) == SVt_PVHV) |
|
|
0 |
0 |
if (SvROK(opts_sv) && SvTYPE(SvRV(opts_sv)) == SVt_PVHV) |
|
1499
|
0 |
0 |
if (fd < 0) croak("File::Raw::Archive: cannot open '%s': %s", |
|
1504
|
0 |
0 |
if (!plugin) { |
|
1510
|
0 |
0 |
if (!h) { close(fd); croak("File::Raw::Archive: out of memory"); } |
|
1514
|
0 |
0 |
if (gz) { |
|
1516
|
0 |
0 |
if (!h->gz_src) { |
|
1528
|
0 |
0 |
if (plugin->read_open(aTHX_ plugin, pull, src, opts, &h->cursor) < 0) { |
|
1546
|
0 |
0 |
if (!h || h->closed || h->is_writer) |
|
|
0 |
0 |
if (!h || h->closed || h->is_writer) |
|
|
0 |
0 |
if (!h || h->closed || h->is_writer) |
|
1549
|
0 |
0 |
if (rc < 0) croak("File::Raw::Archive: malformed archive"); |
|
1550
|
0 |
0 |
if (rc == 0) RETVAL = &PL_sv_undef; |
|
1561
|
0 |
0 |
UV want = 0; |
|
1567
|
0 |
0 |
if (!h || h->closed || h->is_writer) |
|
|
0 |
0 |
if (!h || h->closed || h->is_writer) |
|
|
0 |
0 |
if (!h || h->closed || h->is_writer) |
|
1569
|
0 |
0 |
if (max_bytes_sv && SvOK(max_bytes_sv)) want = SvUV(max_bytes_sv); |
|
|
0 |
0 |
if (max_bytes_sv && SvOK(max_bytes_sv)) want = SvUV(max_bytes_sv); |
|
1574
|
0 |
0 |
if (want > 0) { |
|
1576
|
0 |
0 |
if (remain == 0) break; |
|
1577
|
0 |
0 |
if (remain < take) take = (size_t)remain; |
|
1580
|
0 |
0 |
if (n < 0) { SvREFCNT_dec(out); croak("File::Raw::Archive: read_data failed"); } |
|
1581
|
0 |
0 |
if (n == 0) break; |
|
1583
|
0 |
0 |
if (want == 0 && (size_t)n < take) { |
|
1600
|
0 |
0 |
if (h) free_handle(aTHX_ h); |
|
1614
|
0 |
0 |
if (!SvOK(path_sv)) croak("File::Raw::Archive::_open_write: undef path"); |
|
1615
|
0 |
0 |
if (SvROK(opts_sv) && SvTYPE(SvRV(opts_sv)) == SVt_PVHV) |
|
|
0 |
0 |
if (SvROK(opts_sv) && SvTYPE(SvRV(opts_sv)) == SVt_PVHV) |
|
1619
|
0 |
0 |
SV **sv = opts ? hv_fetchs(opts, "compression", 0) : NULL; |
|
1620
|
0 |
0 |
if (sv && *sv && SvOK(*sv)) { |
|
|
0 |
0 |
if (sv && *sv && SvOK(*sv)) { |
|
|
0 |
0 |
if (sv && *sv && SvOK(*sv)) { |
|
1623
|
0 |
0 |
if ((nn == 4 && memcmp(pp, "gzip", 4) == 0)) gz = 1; |
|
|
0 |
0 |
if ((nn == 4 && memcmp(pp, "gzip", 4) == 0)) gz = 1; |
|
1624
|
0 |
0 |
else if (nn == 4 && memcmp(pp, "auto", 4) == 0) { |
|
|
0 |
0 |
else if (nn == 4 && memcmp(pp, "auto", 4) == 0) { |
|
1628
|
0 |
0 |
if (pl >= 3 && memcmp(pp2 + pl - 3, ".gz", 3) == 0) gz = 1; |
|
|
0 |
0 |
if (pl >= 3 && memcmp(pp2 + pl - 3, ".gz", 3) == 0) gz = 1; |
|
1634
|
0 |
0 |
if (fd < 0) croak("File::Raw::Archive: cannot open '%s' for write: %s", |
|
1638
|
0 |
0 |
SV **sv = opts ? hv_fetchs(opts, "plugin", 0) : NULL; |
|
1639
|
0 |
0 |
if (sv && *sv && SvOK(*sv)) { |
|
|
0 |
0 |
if (sv && *sv && SvOK(*sv)) { |
|
|
0 |
0 |
if (sv && *sv && SvOK(*sv)) { |
|
1643
|
0 |
0 |
if (nn >= sizeof namebuf) { |
|
1654
|
0 |
0 |
if (!plugin) { close(fd); croak("File::Raw::Archive: unknown plugin"); } |
|
1657
|
0 |
0 |
if (!h) { close(fd); croak("File::Raw::Archive: out of memory"); } |
|
1662
|
0 |
0 |
if (gz) { |
|
1664
|
0 |
0 |
if (opts) { |
|
1666
|
0 |
0 |
if (lsv && *lsv && SvOK(*lsv)) level = (int)SvIV(*lsv); |
|
|
0 |
0 |
if (lsv && *lsv && SvOK(*lsv)) level = (int)SvIV(*lsv); |
|
|
0 |
0 |
if (lsv && *lsv && SvOK(*lsv)) level = (int)SvIV(*lsv); |
|
1669
|
0 |
0 |
if (!h->gz_sink) { free_handle(aTHX_ h); croak("File::Raw::Archive: gzip sink init failed"); } |
|
1678
|
0 |
0 |
if (plugin->write_open(aTHX_ plugin, push, sink, opts, &h->cursor) < 0) { |
|
1702
|
0 |
0 |
if (!h || h->closed || !h->is_writer) |
|
|
0 |
0 |
if (!h || h->closed || !h->is_writer) |
|
|
0 |
0 |
if (!h || h->closed || !h->is_writer) |
|
1704
|
0 |
0 |
if (!SvROK(entry_sv) || SvTYPE(SvRV(entry_sv)) != SVt_PVHV) |
|
|
0 |
0 |
if (!SvROK(entry_sv) || SvTYPE(SvRV(entry_sv)) != SVt_PVHV) |
|
1709
|
0 |
0 |
if (SvOK(content_sv)) { |
|
1712
|
0 |
0 |
if (e.size == 0 && clen > 0) e.size = clen; |
|
|
0 |
0 |
if (e.size == 0 && clen > 0) e.size = clen; |
|
1715
|
0 |
0 |
if (h->plugin->write_add(aTHX_ h->plugin, h->cursor, &e, cp, clen) < 0) |
|
1725
|
0 |
0 |
if (!h) return; |
|
1726
|
0 |
0 |
if (!h->closed && h->plugin && h->cursor && h->is_writer) { |
|
|
0 |
0 |
if (!h->closed && h->plugin && h->cursor && h->is_writer) { |
|
|
0 |
0 |
if (!h->closed && h->plugin && h->cursor && h->is_writer) { |
|
|
0 |
0 |
if (!h->closed && h->plugin && h->cursor && h->is_writer) { |
|
1727
|
0 |
0 |
if (h->plugin->write_close(aTHX_ h->plugin, h->cursor) < 0) |
|
1732
|
0 |
0 |
if (h->gz_sink) { |
|
1733
|
0 |
0 |
if (archive_gz_sink_finish(h->gz_sink) < 0) |
|
1745
|
0 |
0 |
size_t n = 0; |
|
1748
|
0 |
0 |
if (!SvROK(xattrs_sv) || SvTYPE(SvRV(xattrs_sv)) != SVt_PVHV) XSRETURN_IV(0); |
|
|
0 |
0 |
if (!SvROK(xattrs_sv) || SvTYPE(SvRV(xattrs_sv)) != SVt_PVHV) XSRETURN_IV(0); |
|
1752
|
0 |
0 |
while ((he = hv_iternext(xh)) && n < sizeof buf / sizeof buf[0]) { |
|
|
0 |
0 |
while ((he = hv_iternext(xh)) && n < sizeof buf / sizeof buf[0]) { |
|
1765
|
0 |
0 |
RETVAL = rc; |
|
1780
|
0 |
0 |
for (i = 0; known[i]; i++) { |
|
1781
|
0 |
0 |
if (archive_lookup_plugin(aTHX_ known[i])) { |
|
1802
|
0 |
0 |
if (!SvOK(dest_sv)) |
|
1830
|
0 |
0 |
if (!SvOK(name_sv) || !SvOK(dest_sv)) |
|
|
0 |
0 |
if (!SvOK(name_sv) || !SvOK(dest_sv)) |
|
1863
|
0 |
3 |
if (!SvOK(path_sv)) |
|
1866
|
3 |
0 |
if (SvOK(content_sv)) { |
|
1869
|
1 |
2 |
if (SvROK(xattrs_sv) && SvTYPE(SvRV(xattrs_sv)) == SVt_PVHV) { |
|
|
1 |
0 |
if (SvROK(xattrs_sv) && SvTYPE(SvRV(xattrs_sv)) == SVt_PVHV) { |
|
1873
|
2 |
1 |
while ((he = hv_iternext(xh)) && xn < sizeof xbuf / sizeof xbuf[0]) { |
|
|
2 |
0 |
while ((he = hv_iternext(xh)) && xn < sizeof xbuf / sizeof xbuf[0]) { |
|
1887
|
0 |
3 |
if (marshal_job(path, path_len, |
|
1897
|
0 |
3 |
if (marshal_send(fd, buf, buf_len) < 0) { |
|
1924
|
0 |
13 |
if (items < 2) |
|
1926
|
1 |
12 |
if ((items - 2) % 2 != 0) |
|
1932
|
0 |
9 |
XPUSHs(sv_2mortal(result)); |
|
1940
|
1 |
4 |
if (items < 4) |
|
1942
|
0 |
4 |
if ((items - 4) % 2 != 0) |
|
1947
|
0 |
4 |
if (xv && *xv && SvOK(*xv)) apply_xattrs = SvTRUE(*xv) ? 1 : 0; |
|
|
0 |
0 |
if (xv && *xv && SvOK(*xv)) apply_xattrs = SvTRUE(*xv) ? 1 : 0; |
|
|
0 |
0 |
if (xv && *xv && SvOK(*xv)) apply_xattrs = SvTRUE(*xv) ? 1 : 0; |
|
1957
|
0 |
4 |
XPUSHs(sv_2mortal(newSViv(rc))); |
|
1965
|
1 |
10 |
if (items < 3) |
|
1967
|
0 |
10 |
if ((items - 3) % 2 != 0) |
|
1977
|
0 |
10 |
if (xv && *xv && SvOK(*xv)) apply_xattrs = SvTRUE(*xv) ? 1 : 0; |
|
|
0 |
0 |
if (xv && *xv && SvOK(*xv)) apply_xattrs = SvTRUE(*xv) ? 1 : 0; |
|
|
0 |
0 |
if (xv && *xv && SvOK(*xv)) apply_xattrs = SvTRUE(*xv) ? 1 : 0; |
|
1979
|
0 |
10 |
if (xv && *xv && SvOK(*xv)) unsafe_paths = SvTRUE(*xv) ? 1 : 0; |
|
|
0 |
0 |
if (xv && *xv && SvOK(*xv)) unsafe_paths = SvTRUE(*xv) ? 1 : 0; |
|
|
0 |
0 |
if (xv && *xv && SvOK(*xv)) unsafe_paths = SvTRUE(*xv) ? 1 : 0; |
|
1981
|
0 |
10 |
if (xv && *xv && SvOK(*xv)) filter = *xv; |
|
|
0 |
0 |
if (xv && *xv && SvOK(*xv)) filter = *xv; |
|
|
0 |
0 |
if (xv && *xv && SvOK(*xv)) filter = *xv; |
|
1983
|
2 |
8 |
if (xv && *xv && SvOK(*xv)) parallel = (int)SvIV(*xv); |
|
|
2 |
0 |
if (xv && *xv && SvOK(*xv)) parallel = (int)SvIV(*xv); |
|
|
2 |
0 |
if (xv && *xv && SvOK(*xv)) parallel = (int)SvIV(*xv); |
|
1985
|
1 |
9 |
if (parallel > 1 && !parallel_supported()) { |
|
|
0 |
1 |
if (parallel > 1 && !parallel_supported()) { |
|
1996
|
1 |
9 |
if (parallel > 1) { |
|
2004
|
0 |
8 |
XPUSHs(sv_2mortal(newSViv(1))); |
|
2012
|
1 |
4 |
if (items < 3) |
|
2015
|
3 |
1 |
if (!SvROK(cb_sv) || SvTYPE(SvRV(cb_sv)) != SVt_PVCV) |
|
|
0 |
3 |
if (!SvROK(cb_sv) || SvTYPE(SvRV(cb_sv)) != SVt_PVCV) |
|
2018
|
0 |
3 |
if ((opts_end - 2) % 2 != 0) |
|
2023
|
1 |
2 |
if (xv && *xv && SvOK(*xv)) filter = *xv; |
|
|
1 |
0 |
if (xv && *xv && SvOK(*xv)) filter = *xv; |
|
|
1 |
0 |
if (xv && *xv && SvOK(*xv)) filter = *xv; |
|
2051
|
0 |
36 |
if (items < 2) |
|
2053
|
0 |
36 |
if ((items - 2) % 2 != 0) |
|
2067
|
0 |
35 |
XPUSHs(sv_2mortal(obj)); |
|
2075
|
0 |
39 |
if (items < 2) |
|
2077
|
0 |
39 |
if ((items - 2) % 2 != 0) |
|
2089
|
0 |
38 |
XPUSHs(sv_2mortal(obj)); |
|
2106
|
77 |
0 |
if (!SvROK(self_sv) || SvTYPE(SvRV(self_sv)) != SVt_PVAV) |
|
|
0 |
77 |
if (!SvROK(self_sv) || SvTYPE(SvRV(self_sv)) != SVt_PVAV) |
|
2111
|
77 |
0 |
if (closed_ref && *closed_ref && SvTRUE(*closed_ref)) |
|
|
77 |
0 |
if (closed_ref && *closed_ref && SvTRUE(*closed_ref)) |
|
|
1 |
76 |
if (closed_ref && *closed_ref && SvTRUE(*closed_ref)) |
|
2115
|
76 |
0 |
if (!handle_ref || !*handle_ref) |
|
|
0 |
76 |
if (!handle_ref || !*handle_ref) |
|
2119
|
76 |
0 |
if (!h || h->is_writer) |
|
|
0 |
76 |
if (!h || h->is_writer) |
|
2125
|
42 |
34 |
if (cur_entry_ref && *cur_entry_ref && SvOK(*cur_entry_ref) && |
|
|
42 |
0 |
if (cur_entry_ref && *cur_entry_ref && SvOK(*cur_entry_ref) && |
|
|
42 |
0 |
if (cur_entry_ref && *cur_entry_ref && SvOK(*cur_entry_ref) && |
|
|
42 |
0 |
if (cur_entry_ref && *cur_entry_ref && SvOK(*cur_entry_ref) && |
|
2126
|
42 |
0 |
(!consumed_ref || !*consumed_ref || !SvTRUE(*consumed_ref))) { |
|
|
13 |
29 |
(!consumed_ref || !*consumed_ref || !SvTRUE(*consumed_ref))) { |
|
2130
|
9 |
13 |
buf, sizeof buf)) > 0) {} |
|
2131
|
0 |
13 |
if (n < 0) |
|
2138
|
0 |
76 |
if (rc < 0) |
|
2140
|
11 |
65 |
if (rc == 0) { |
|
2161
|
0 |
0 |
if (!SvROK(self_sv) || SvTYPE(SvRV(self_sv)) != SVt_PVAV) |
|
|
0 |
0 |
if (!SvROK(self_sv) || SvTYPE(SvRV(self_sv)) != SVt_PVAV) |
|
2165
|
0 |
0 |
if (!handle_ref || !*handle_ref) XSRETURN_UNDEF; |
|
|
0 |
0 |
if (!handle_ref || !*handle_ref) XSRETURN_UNDEF; |
|
2176
|
0 |
0 |
if (!SvROK(self_sv) || SvTYPE(SvRV(self_sv)) != SVt_PVAV) return; |
|
|
0 |
0 |
if (!SvROK(self_sv) || SvTYPE(SvRV(self_sv)) != SVt_PVAV) return; |
|
2187
|
0 |
34 |
if (!SvROK(self_sv)) return; |
|
2188
|
0 |
34 |
if (SvTYPE(SvRV(self_sv)) != SVt_PVAV) { |
|
2195
|
34 |
0 |
if (closed_ref && *closed_ref && SvTRUE(*closed_ref)) return; |
|
|
34 |
0 |
if (closed_ref && *closed_ref && SvTRUE(*closed_ref)) return; |
|
|
1 |
33 |
if (closed_ref && *closed_ref && SvTRUE(*closed_ref)) return; |
|
2201
|
33 |
0 |
if (handle_ref && *handle_ref) maybe_free_handle(aTHX_ *handle_ref); |
|
|
33 |
0 |
if (handle_ref && *handle_ref) maybe_free_handle(aTHX_ *handle_ref); |
|
2211
|
0 |
80 |
if (!SvROK(self_sv)) return; |
|
2212
|
40 |
40 |
if (SvTYPE(SvRV(self_sv)) != SVt_PVAV) { |
|
2219
|
40 |
0 |
if (closed_ref && *closed_ref && SvTRUE(*closed_ref)) return; |
|
|
40 |
0 |
if (closed_ref && *closed_ref && SvTRUE(*closed_ref)) return; |
|
|
33 |
7 |
if (closed_ref && *closed_ref && SvTRUE(*closed_ref)) return; |
|
2221
|
7 |
0 |
if (handle_ref && *handle_ref) maybe_free_handle(aTHX_ *handle_ref); |
|
|
7 |
0 |
if (handle_ref && *handle_ref) maybe_free_handle(aTHX_ *handle_ref); |
|
2231
|
0 |
678 |
if (items < 1) |
|
2234
|
678 |
0 |
if (!SvROK(self_sv) || SvTYPE(SvRV(self_sv)) != SVt_PVAV) |
|
|
0 |
678 |
if (!SvROK(self_sv) || SvTYPE(SvRV(self_sv)) != SVt_PVAV) |
|
2237
|
0 |
678 |
if ((items - 1) % 2 != 0) |
|
2244
|
1957 |
678 |
for (i = 1; i + 1 < items; i += 2) { |
|
2247
|
669 |
1288 |
if (klen == 7 && memcmp(kp, "content", 7) == 0) { |
|
|
669 |
0 |
if (klen == 7 && memcmp(kp, "content", 7) == 0) { |
|
2257
|
1 |
677 |
if (!type_ref || !*type_ref || !SvOK(*type_ref)) { |
|
|
1 |
0 |
if (!type_ref || !*type_ref || !SvOK(*type_ref)) { |
|
|
0 |
1 |
if (!type_ref || !*type_ref || !SvOK(*type_ref)) { |
|
2261
|
3 |
674 |
int has_link = (link_ref && *link_ref && SvOK(*link_ref)); |
|
|
3 |
0 |
int has_link = (link_ref && *link_ref && SvOK(*link_ref)); |
|
|
3 |
0 |
int has_link = (link_ref && *link_ref && SvOK(*link_ref)); |
|
2262
|
677 |
0 |
if (name_ref && *name_ref && SvOK(*name_ref)) { |
|
|
677 |
0 |
if (name_ref && *name_ref && SvOK(*name_ref)) { |
|
|
677 |
0 |
if (name_ref && *name_ref && SvOK(*name_ref)) { |
|
2265
|
677 |
0 |
if (nl > 0 && np[nl - 1] == '/') type = AE_DIR; |
|
|
5 |
672 |
if (nl > 0 && np[nl - 1] == '/') type = AE_DIR; |
|
2266
|
3 |
669 |
else if (has_link) type = AE_SYMLINK; |
|
2268
|
0 |
0 |
} else if (has_link) { |
|
2277
|
576 |
102 |
if (!mode_ref || !*mode_ref || !SvOK(*mode_ref)) { |
|
|
576 |
0 |
if (!mode_ref || !*mode_ref || !SvOK(*mode_ref)) { |
|
|
0 |
576 |
if (!mode_ref || !*mode_ref || !SvOK(*mode_ref)) { |
|
2279
|
102 |
0 |
int type = (t && *t) ? (int)SvIV(*t) : AE_FILE; |
|
|
102 |
0 |
int type = (t && *t) ? (int)SvIV(*t) : AE_FILE; |
|
2281
|
98 |
4 |
: type == AE_SYMLINK ? 0777 |
|
|
3 |
95 |
: type == AE_SYMLINK ? 0777 |
|
2288
|
678 |
0 |
if (!handle_ref || !*handle_ref) |
|
|
0 |
678 |
if (!handle_ref || !*handle_ref) |
|
2291
|
678 |
0 |
if (!h || !h->is_writer) |
|
|
0 |
678 |
if (!h || !h->is_writer) |
|
2301
|
669 |
9 |
if (content_sv && SvOK(content_sv)) { |
|
|
669 |
0 |
if (content_sv && SvOK(content_sv)) { |
|
2303
|
669 |
0 |
if (e.size == 0 && clen > 0) e.size = clen; |
|
|
669 |
0 |
if (e.size == 0 && clen > 0) e.size = clen; |
|
2306
|
5 |
673 |
if (h->plugin->write_add(aTHX_ h->plugin, h->cursor, &e, cp, clen) < 0) |
|
2319
|
0 |
39 |
if (!SvROK(self_sv)) return; |
|
2320
|
0 |
39 |
if (SvTYPE(SvRV(self_sv)) != SVt_PVAV) { |
|
2326
|
39 |
0 |
if (closed_ref && *closed_ref && SvTRUE(*closed_ref)) return; |
|
|
39 |
0 |
if (closed_ref && *closed_ref && SvTRUE(*closed_ref)) return; |
|
|
0 |
39 |
if (closed_ref && *closed_ref && SvTRUE(*closed_ref)) return; |
|
2329
|
39 |
0 |
if (handle_ref && *handle_ref) maybe_free_handle(aTHX_ *handle_ref); |
|
|
39 |
0 |
if (handle_ref && *handle_ref) maybe_free_handle(aTHX_ *handle_ref); |
|
2339
|
0 |
78 |
if (!SvROK(self_sv)) return; |
|
2340
|
39 |
39 |
if (SvTYPE(SvRV(self_sv)) != SVt_PVAV) { |
|
2346
|
39 |
0 |
if (closed_ref && *closed_ref && SvTRUE(*closed_ref)) return; |
|
|
39 |
0 |
if (closed_ref && *closed_ref && SvTRUE(*closed_ref)) return; |
|
|
39 |
0 |
if (closed_ref && *closed_ref && SvTRUE(*closed_ref)) return; |
|
2348
|
0 |
0 |
if (handle_ref && *handle_ref) maybe_free_handle(aTHX_ *handle_ref); |
|
|
0 |
0 |
if (handle_ref && *handle_ref) maybe_free_handle(aTHX_ *handle_ref); |
|
2384
|
204 |
0 |
if (!SvROK(self_sv) || SvTYPE(SvRV(self_sv)) != SVt_PVAV) |
|
|
0 |
204 |
if (!SvROK(self_sv) || SvTYPE(SvRV(self_sv)) != SVt_PVAV) |
|
2388
|
203 |
1 |
if (!meta_ref || !*meta_ref || !SvROK(*meta_ref) |
|
|
203 |
0 |
if (!meta_ref || !*meta_ref || !SvROK(*meta_ref) |
|
|
203 |
0 |
if (!meta_ref || !*meta_ref || !SvROK(*meta_ref) |
|
2389
|
0 |
203 |
|| SvTYPE(SvRV(*meta_ref)) != SVt_PVAV) |
|
2393
|
200 |
3 |
if (!val || !*val || !SvOK(*val)) { |
|
|
200 |
0 |
if (!val || !*val || !SvOK(*val)) { |
|
|
0 |
200 |
if (!val || !*val || !SvOK(*val)) { |
|
2395
|
0 |
3 |
switch (ix) { |
|
2422
|
35 |
0 |
if (!SvROK(self_sv) || SvTYPE(SvRV(self_sv)) != SVt_PVAV) |
|
|
0 |
35 |
if (!SvROK(self_sv) || SvTYPE(SvRV(self_sv)) != SVt_PVAV) |
|
2426
|
35 |
0 |
if (!meta_ref || !*meta_ref || !SvROK(*meta_ref) |
|
|
35 |
0 |
if (!meta_ref || !*meta_ref || !SvROK(*meta_ref) |
|
|
35 |
0 |
if (!meta_ref || !*meta_ref || !SvROK(*meta_ref) |
|
2427
|
0 |
35 |
|| SvTYPE(SvRV(*meta_ref)) != SVt_PVAV) |
|
2431
|
35 |
0 |
t = (type_ref && *type_ref && SvOK(*type_ref)) |
|
|
35 |
0 |
t = (type_ref && *type_ref && SvOK(*type_ref)) |
|
2432
|
35 |
0 |
? SvIV(*type_ref) : (IV)AE_FILE; |
|
2437
|
5 |
2 |
case 4: RETVAL = (t == AE_SYMLINK || t == AE_HARDLINK) ? 1 : 0; break; |
|
|
0 |
5 |
case 4: RETVAL = (t == AE_SYMLINK || t == AE_HARDLINK) ? 1 : 0; break; |
|
2457
|
40 |
0 |
if (!SvROK(self_sv) || SvTYPE(SvRV(self_sv)) != SVt_PVAV) |
|
|
0 |
40 |
if (!SvROK(self_sv) || SvTYPE(SvRV(self_sv)) != SVt_PVAV) |
|
2461
|
3 |
37 |
if (slurped_ref && *slurped_ref && SvOK(*slurped_ref)) { |
|
|
3 |
0 |
if (slurped_ref && *slurped_ref && SvOK(*slurped_ref)) { |
|
|
3 |
0 |
if (slurped_ref && *slurped_ref && SvOK(*slurped_ref)) { |
|
2465
|
37 |
0 |
if (!reader_ref || !*reader_ref || !SvROK(*reader_ref) |
|
|
37 |
0 |
if (!reader_ref || !*reader_ref || !SvROK(*reader_ref) |
|
|
37 |
0 |
if (!reader_ref || !*reader_ref || !SvROK(*reader_ref) |
|
2466
|
0 |
37 |
|| SvTYPE(SvRV(*reader_ref)) != SVt_PVAV) |
|
2470
|
37 |
0 |
if (!handle_ref || !*handle_ref) |
|
|
0 |
37 |
if (!handle_ref || !*handle_ref) |
|
2473
|
36 |
1 |
if (!h || h->is_writer) |
|
|
0 |
36 |
if (!h || h->is_writer) |
|
2477
|
194 |
36 |
buf, sizeof buf)) > 0) { |
|
2480
|
0 |
36 |
if (n < 0) { |
|
2505
|
45 |
0 |
if (!SvROK(self_sv) || SvTYPE(SvRV(self_sv)) != SVt_PVAV) |
|
|
0 |
45 |
if (!SvROK(self_sv) || SvTYPE(SvRV(self_sv)) != SVt_PVAV) |
|
2509
|
45 |
0 |
if (!reader_ref || !*reader_ref || !SvROK(*reader_ref) |
|
|
45 |
0 |
if (!reader_ref || !*reader_ref || !SvROK(*reader_ref) |
|
|
45 |
0 |
if (!reader_ref || !*reader_ref || !SvROK(*reader_ref) |
|
2510
|
0 |
45 |
|| SvTYPE(SvRV(*reader_ref)) != SVt_PVAV) |
|
2514
|
45 |
0 |
if (!handle_ref || !*handle_ref) |
|
|
0 |
45 |
if (!handle_ref || !*handle_ref) |
|
2517
|
45 |
0 |
if (!h || h->is_writer) |
|
|
0 |
45 |
if (!h || h->is_writer) |
|
2519
|
45 |
0 |
if (!n_sv || !SvOK(n_sv)) |
|
|
0 |
45 |
if (!n_sv || !SvOK(n_sv)) |
|
2523
|
86 |
42 |
while ((UV)SvCUR(result) < want) { |
|
2526
|
3 |
83 |
if (remain < chunk) chunk = (size_t)remain; |
|
2528
|
0 |
86 |
if (got < 0) { |
|
2532
|
3 |
83 |
if (got == 0) break; |
|
2553
|
2 |
0 |
if (!SvROK(self_sv) || SvTYPE(SvRV(self_sv)) != SVt_PVAV) return; |
|
|
0 |
2 |
if (!SvROK(self_sv) || SvTYPE(SvRV(self_sv)) != SVt_PVAV) return; |
|
2556
|
2 |
0 |
if (!reader_ref || !*reader_ref || !SvROK(*reader_ref) |
|
|
2 |
0 |
if (!reader_ref || !*reader_ref || !SvROK(*reader_ref) |
|
|
2 |
0 |
if (!reader_ref || !*reader_ref || !SvROK(*reader_ref) |
|
2557
|
0 |
2 |
|| SvTYPE(SvRV(*reader_ref)) != SVt_PVAV) return; |
|
2560
|
2 |
0 |
if (consumed_ref && *consumed_ref && SvTRUE(*consumed_ref)) return; |
|
|
2 |
0 |
if (consumed_ref && *consumed_ref && SvTRUE(*consumed_ref)) return; |
|
|
0 |
2 |
if (consumed_ref && *consumed_ref && SvTRUE(*consumed_ref)) return; |
|
2562
|
2 |
0 |
if (!handle_ref || !*handle_ref) return; |
|
|
0 |
2 |
if (!handle_ref || !*handle_ref) return; |
|
2564
|
0 |
2 |
if (!h) return; |
|
2566
|
2 |
2 |
buf, sizeof buf)) > 0) {} |
|
2567
|
0 |
2 |
if (n < 0) |
|
2602
|
0 |
1 |
if (items < 1) |
|
2604
|
0 |
1 |
if ((items - 1) % 2 != 0) |
|
2617
|
0 |
1 |
XPUSHs(sv_2mortal(obj)); |
|
2625
|
0 |
1 |
if (items < 1) |
|
2627
|
0 |
1 |
if ((items - 1) % 2 != 0) |
|
2639
|
0 |
1 |
XPUSHs(sv_2mortal(obj)); |
|
2647
|
0 |
1 |
if (items < 1) |
|
2649
|
0 |
1 |
if ((items - 1) % 2 != 0) |
|
2655
|
0 |
1 |
XPUSHs(sv_2mortal(result)); |
|
2663
|
0 |
1 |
if (items < 3) |
|
2665
|
0 |
1 |
if ((items - 3) % 2 != 0) |
|
2670
|
0 |
1 |
if (xv && *xv && SvOK(*xv)) apply_xattrs = SvTRUE(*xv) ? 1 : 0; |
|
|
0 |
0 |
if (xv && *xv && SvOK(*xv)) apply_xattrs = SvTRUE(*xv) ? 1 : 0; |
|
|
0 |
0 |
if (xv && *xv && SvOK(*xv)) apply_xattrs = SvTRUE(*xv) ? 1 : 0; |
|
2680
|
0 |
1 |
XPUSHs(sv_2mortal(newSViv(rc))); |
|
2688
|
0 |
1 |
if (items < 2) |
|
2690
|
0 |
1 |
if ((items - 2) % 2 != 0) |
|
2700
|
0 |
1 |
if (xv && *xv && SvOK(*xv)) apply_xattrs = SvTRUE(*xv) ? 1 : 0; |
|
|
0 |
0 |
if (xv && *xv && SvOK(*xv)) apply_xattrs = SvTRUE(*xv) ? 1 : 0; |
|
|
0 |
0 |
if (xv && *xv && SvOK(*xv)) apply_xattrs = SvTRUE(*xv) ? 1 : 0; |
|
2702
|
0 |
1 |
if (xv && *xv && SvOK(*xv)) unsafe_paths = SvTRUE(*xv) ? 1 : 0; |
|
|
0 |
0 |
if (xv && *xv && SvOK(*xv)) unsafe_paths = SvTRUE(*xv) ? 1 : 0; |
|
|
0 |
0 |
if (xv && *xv && SvOK(*xv)) unsafe_paths = SvTRUE(*xv) ? 1 : 0; |
|
2704
|
0 |
1 |
if (xv && *xv && SvOK(*xv)) filter = *xv; |
|
|
0 |
0 |
if (xv && *xv && SvOK(*xv)) filter = *xv; |
|
|
0 |
0 |
if (xv && *xv && SvOK(*xv)) filter = *xv; |
|
2706
|
0 |
1 |
if (xv && *xv && SvOK(*xv)) parallel = (int)SvIV(*xv); |
|
|
0 |
0 |
if (xv && *xv && SvOK(*xv)) parallel = (int)SvIV(*xv); |
|
|
0 |
0 |
if (xv && *xv && SvOK(*xv)) parallel = (int)SvIV(*xv); |
|
2708
|
0 |
1 |
if (parallel > 1 && !parallel_supported()) { |
|
|
0 |
0 |
if (parallel > 1 && !parallel_supported()) { |
|
2719
|
0 |
1 |
if (parallel > 1) { |
|
2727
|
0 |
1 |
XPUSHs(sv_2mortal(newSViv(1))); |
|
2735
|
0 |
1 |
if (items < 2) |
|
2738
|
1 |
0 |
if (!SvROK(cb_sv) || SvTYPE(SvRV(cb_sv)) != SVt_PVCV) |
|
|
0 |
1 |
if (!SvROK(cb_sv) || SvTYPE(SvRV(cb_sv)) != SVt_PVCV) |
|
2741
|
0 |
1 |
if ((opts_end - 1) % 2 != 0) |
|
2746
|
0 |
1 |
if (xv && *xv && SvOK(*xv)) filter = *xv; |
|
|
0 |
0 |
if (xv && *xv && SvOK(*xv)) filter = *xv; |
|
|
0 |
0 |
if (xv && *xv && SvOK(*xv)) filter = *xv; |
|
2784
|
30 |
0 |
if (cx && CxTYPE(cx) == CXt_SUB) { |
|
|
30 |
0 |
if (cx && CxTYPE(cx) == CXt_SUB) { |
|
2785
|
30 |
0 |
caller_pkg = HvNAME_get(CopSTASH(cx->blk_oldcop)); |
|
|
30 |
0 |
caller_pkg = HvNAME_get(CopSTASH(cx->blk_oldcop)); |
|
|
0 |
30 |
caller_pkg = HvNAME_get(CopSTASH(cx->blk_oldcop)); |
|
|
0 |
0 |
caller_pkg = HvNAME_get(CopSTASH(cx->blk_oldcop)); |
|
|
30 |
0 |
caller_pkg = HvNAME_get(CopSTASH(cx->blk_oldcop)); |
|
|
0 |
30 |
caller_pkg = HvNAME_get(CopSTASH(cx->blk_oldcop)); |
|
2792
|
0 |
30 |
if (!caller_pkg) caller_pkg = "main"; |
|
2800
|
1 |
29 |
for (i = 1; i < items; i++) { |
|
2801
|
0 |
1 |
if (!SvOK(ST(i))) continue; |
|
2804
|
1 |
0 |
if ((nl == 6 && memcmp(np, "import", 6) == 0) |
|
|
0 |
1 |
if ((nl == 6 && memcmp(np, "import", 6) == 0) |
|
2805
|
0 |
0 |
|| (nl == 4 && memcmp(np, ":all", 4) == 0)) { |
|
|
0 |
0 |
|| (nl == 4 && memcmp(np, ":all", 4) == 0)) { |
|
2812
|
180 |
30 |
for (n = 0; known_names[n]; n++) { |
|
2815
|
174 |
6 |
if (!wanted) { |
|
2817
|
0 |
174 |
for (j = 1; j < items; j++) { |
|
2818
|
0 |
0 |
if (!SvOK(ST(j))) continue; |
|
2821
|
0 |
0 |
if (nl == strlen(name) && memcmp(np, name, nl) == 0) { |
|
|
0 |
0 |
if (nl == strlen(name) && memcmp(np, name, nl) == 0) { |
|
2827
|
174 |
6 |
if (!wanted) continue; |
|
2834
|
0 |
6 |
if (!src_cv) { |
|
2845
|
6 |
0 |
if (!isGV(dst_gv)) gv_init(dst_gv, caller_stash, dst_short, |