| line |
true |
false |
branch |
|
115
|
108 |
0 |
if (h) h->fd = -1; |
|
122
|
108 |
0 |
if (!h || h->closed) return; |
|
|
0 |
108 |
if (!h || h->closed) return; |
|
124
|
0 |
108 |
if (h->cur_entry_rv) { |
|
128
|
108 |
0 |
if (h->plugin && h->cursor) { |
|
|
108 |
0 |
if (h->plugin && h->cursor) { |
|
129
|
39 |
69 |
if (h->is_writer) { |
|
130
|
39 |
0 |
if (h->plugin->write_close) |
|
133
|
69 |
0 |
if (h->plugin->read_close) |
|
137
|
8 |
100 |
if (h->gz_src) archive_gz_src_free(h->gz_src); |
|
138
|
4 |
104 |
if (h->gz_sink) { |
|
142
|
108 |
0 |
if (h->fd >= 0) close(h->fd); |
|
165
|
1 |
69 |
if (fd < 0) croak("File::Raw::Archive: cannot open '%s': %s", |
|
170
|
0 |
69 |
if (!plugin) { |
|
176
|
0 |
69 |
if (!h) { close(fd); croak("File::Raw::Archive: out of memory"); } |
|
181
|
8 |
61 |
if (gz) { |
|
183
|
0 |
8 |
if (!h->gz_src) { |
|
195
|
0 |
69 |
if (plugin->read_open(aTHX_ plugin, pull, src, opts, &h->cursor) < 0) { |
|
207
|
0 |
0 |
if (h->consumed) return; |
|
211
|
0 |
0 |
buf, sizeof buf)) > 0) {} |
|
213
|
0 |
0 |
if (n < 0) croak("File::Raw::Archive: read_data failed"); |
|
226
|
40 |
0 |
if (opts) { |
|
228
|
4 |
36 |
if (sv && *sv && SvOK(*sv)) { |
|
|
4 |
0 |
if (sv && *sv && SvOK(*sv)) { |
|
|
4 |
0 |
if (sv && *sv && SvOK(*sv)) { |
|
231
|
4 |
0 |
if (nn == 4 && memcmp(pp, "gzip", 4) == 0) gz = 1; |
|
|
4 |
0 |
if (nn == 4 && memcmp(pp, "gzip", 4) == 0) gz = 1; |
|
232
|
0 |
0 |
else if (nn == 4 && memcmp(pp, "auto", 4) == 0) { |
|
|
0 |
0 |
else if (nn == 4 && memcmp(pp, "auto", 4) == 0) { |
|
235
|
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; |
|
241
|
0 |
40 |
if (fd < 0) croak("File::Raw::Archive: cannot open '%s' for write: %s", |
|
245
|
40 |
0 |
SV **sv = opts ? hv_fetchs(opts, "plugin", 0) : NULL; |
|
246
|
1 |
39 |
if (sv && *sv && SvOK(*sv)) { |
|
|
1 |
0 |
if (sv && *sv && SvOK(*sv)) { |
|
|
1 |
0 |
if (sv && *sv && SvOK(*sv)) { |
|
250
|
0 |
1 |
if (nn >= sizeof namebuf) { |
|
261
|
1 |
39 |
if (!plugin) { close(fd); croak("File::Raw::Archive: unknown plugin"); } |
|
264
|
0 |
39 |
if (!h) { close(fd); croak("File::Raw::Archive: out of memory"); } |
|
270
|
4 |
35 |
if (gz) { |
|
272
|
4 |
0 |
if (opts) { |
|
274
|
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); |
|
277
|
0 |
4 |
if (!h->gz_sink) { |
|
289
|
0 |
39 |
if (plugin->write_open(aTHX_ plugin, push, sink, opts, &h->cursor) < 0) { |
|
306
|
0 |
66 |
if (pos < 0) return 0; |
|
309
|
0 |
66 |
if (n < 2) return 0; |
|
310
|
6 |
60 |
return (magic[0] == 0x1f && magic[1] == 0x8b); |
|
|
6 |
0 |
return (magic[0] == 0x1f && magic[1] == 0x8b); |
|
317
|
0 |
69 |
if (!opts) return sniff_gzip(fd); |
|
319
|
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); |
|
322
|
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); |
|
323
|
3 |
0 |
if (n == 4 && memcmp(p, "gzip", 4) == 0) return 1; |
|
|
2 |
1 |
if (n == 4 && memcmp(p, "gzip", 4) == 0) return 1; |
|
324
|
1 |
0 |
if (n == 4 && memcmp(p, "none", 4) == 0) return 0; |
|
|
1 |
0 |
if (n == 4 && memcmp(p, "none", 4) == 0) return 0; |
|
332
|
69 |
0 |
SV **sv = opts ? hv_fetchs(opts, "plugin", 0) : NULL; |
|
333
|
0 |
69 |
if (sv && *sv && SvOK(*sv)) { |
|
|
0 |
0 |
if (sv && *sv && SvOK(*sv)) { |
|
|
0 |
0 |
if (sv && *sv && SvOK(*sv)) { |
|
336
|
0 |
0 |
if (n == 4 && memcmp(p, "auto", 4) == 0) { |
|
|
0 |
0 |
if (n == 4 && memcmp(p, "auto", 4) == 0) { |
|
340
|
0 |
0 |
if (pos < 0) return NULL; |
|
343
|
0 |
0 |
if (gz) return archive_lookup_plugin(aTHX_ "tar"); |
|
346
|
0 |
0 |
if (got <= 0) return NULL; |
|
350
|
0 |
0 |
if (n >= sizeof namebuf) return NULL; |
|
365
|
564 |
0 |
hv_stores(h, "name", newSVpvn(e->name ? e->name : "", e->name_len)); |
|
374
|
0 |
564 |
if (e->link_target) |
|
377
|
0 |
564 |
if (e->xattr_count > 0) { |
|
380
|
0 |
0 |
for (i = 0; i < e->xattr_count; i++) { |
|
398
|
111 |
0 |
av_store(meta, M_NAME, |
|
408
|
4 |
107 |
if (e->link_target) { |
|
412
|
3 |
108 |
if (e->xattr_count > 0) { |
|
415
|
5 |
3 |
for (i = 0; i < e->xattr_count; i++) { |
|
436
|
678 |
0 |
if (sv && *sv && SvOK(*sv)) { |
|
|
678 |
0 |
if (sv && *sv && SvOK(*sv)) { |
|
|
678 |
0 |
if (sv && *sv && SvOK(*sv)) { |
|
442
|
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); |
|
446
|
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); |
|
449
|
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); |
|
452
|
8 |
670 |
if (sv && *sv && SvOK(*sv)) { |
|
|
8 |
0 |
if (sv && *sv && SvOK(*sv)) { |
|
|
8 |
0 |
if (sv && *sv && SvOK(*sv)) { |
|
453
|
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), '.'))) { |
|
457
|
0 |
0 |
if (frac < 0) frac = 0; |
|
460
|
0 |
0 |
if (e->mtime_ns >= 1000000000U) { |
|
469
|
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); |
|
472
|
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); |
|
474
|
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); |
|
477
|
4 |
674 |
if (sv && *sv && SvOK(*sv)) { |
|
|
4 |
0 |
if (sv && *sv && SvOK(*sv)) { |
|
|
4 |
0 |
if (sv && *sv && SvOK(*sv)) { |
|
484
|
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) { |
|
488
|
5 |
3 |
while ((he = hv_iternext(xh)) && *xattr_used < xattr_buf_n) { |
|
|
5 |
0 |
while ((he = hv_iternext(xh)) && *xattr_used < xattr_buf_n) { |
|
517
|
837 |
1 |
if (!SvROK(sv) || !SvIOK(SvRV(sv))) return NULL; |
|
|
0 |
837 |
if (!SvROK(sv) || !SvIOK(SvRV(sv))) return NULL; |
|
528
|
158 |
0 |
if (!handle_sv || !SvROK(handle_sv)) return; |
|
|
0 |
158 |
if (!handle_sv || !SvROK(handle_sv)) return; |
|
530
|
0 |
158 |
if (!SvIOK(iv_sv)) return; |
|
532
|
79 |
79 |
if (!h) return; |
|
545
|
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; |
|
581
|
27 |
110 |
for (i = 0; i + 1 < count; i += 2) { |
|
601
|
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) |
|
603
|
10 |
0 |
if (dest_len == 0 || dest_len >= sizeof path_buf - 2) |
|
|
0 |
10 |
if (dest_len == 0 || dest_len >= sizeof path_buf - 2) |
|
606
|
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) && |
|
607
|
0 |
0 |
SvTYPE(SvRV(filter_sv)) == SVt_PVCV); |
|
609
|
0 |
10 |
if (archive_mkpath(dest, 0755) < 0) { |
|
617
|
0 |
95 |
if (rc < 0) croak("File::Raw::Archive: malformed archive"); |
|
618
|
8 |
87 |
if (rc == 0) break; |
|
620
|
87 |
0 |
if (!unsafe_paths) { |
|
621
|
2 |
85 |
if (!archive_path_is_safe(e.name, e.name_len)) { |
|
627
|
0 |
85 |
if (has_filter) { |
|
632
|
0 |
0 |
PUSHMARK(SP); |
|
635
|
0 |
0 |
XPUSHs(entry_rv); |
|
639
|
0 |
0 |
if (count >= 1) { |
|
644
|
0 |
0 |
FREETMPS; |
|
646
|
0 |
0 |
if (!keep) { |
|
649
|
0 |
0 |
skip_buf, sizeof skip_buf)) > 0) {} |
|
650
|
0 |
0 |
if (n < 0) croak("File::Raw::Archive: read_data failed"); |
|
655
|
0 |
85 |
if (dest_len + 1 + e.name_len + 1 > sizeof path_buf) { |
|
666
|
0 |
2 |
if (archive_extract_dir(path_buf, e.mode) < 0) { |
|
672
|
2 |
0 |
const char *target = e.link_target ? e.link_target : ""; |
|
673
|
0 |
2 |
if (archive_extract_symlink(path_buf, target) < 0) { |
|
679
|
0 |
2 |
skip_buf, sizeof skip_buf)) > 0) {} |
|
680
|
0 |
2 |
if (n < 0) croak("File::Raw::Archive: read_data failed"); |
|
684
|
0 |
81 |
if (archive_make_parent_dir(path_buf) < 0) { |
|
689
|
0 |
81 |
if (archive_extract_entry(aTHX_ h->plugin, h->cursor, &e, |
|
692
|
0 |
0 |
croak("File::Raw::Archive::extract_all: %s '%s': %s", |
|
700
|
0 |
0 |
skip_buf, sizeof skip_buf)) > 0) {} |
|
701
|
0 |
0 |
if (n < 0) croak("File::Raw::Archive: read_data failed"); |
|
715
|
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) |
|
722
|
3 |
574 |
if (rc < 0) { |
|
726
|
10 |
564 |
if (rc == 0) break; |
|
735
|
564 |
564 |
skip_buf, sizeof skip_buf)) > 0) {} |
|
736
|
0 |
564 |
if (n < 0) { |
|
753
|
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) |
|
759
|
0 |
13 |
if (rc < 0) croak("File::Raw::Archive: malformed archive"); |
|
760
|
2 |
11 |
if (rc == 0) return 0; |
|
762
|
4 |
7 |
if (e.name_len == match_len |
|
763
|
3 |
1 |
&& memcmp(e.name, match_name, match_len) == 0) { |
|
764
|
3 |
0 |
if (e.type == AE_FILE) { |
|
765
|
0 |
3 |
if (archive_make_parent_dir(dest_path) < 0) { |
|
770
|
0 |
3 |
if (archive_extract_entry(aTHX_ h->plugin, h->cursor, &e, |
|
773
|
0 |
0 |
croak("File::Raw::Archive::extract: %s '%s': %s", |
|
776
|
0 |
0 |
} else if (e.type == AE_DIR) { |
|
777
|
0 |
0 |
if (archive_extract_dir(dest_path, e.mode) < 0) { |
|
781
|
0 |
0 |
} else if (e.type == AE_SYMLINK) { |
|
782
|
0 |
0 |
const char *target = e.link_target ? e.link_target : ""; |
|
783
|
0 |
0 |
if (archive_extract_symlink(dest_path, target) < 0) { |
|
793
|
6 |
8 |
skip_buf, sizeof skip_buf)) > 0) {} |
|
794
|
0 |
8 |
if (n < 0) croak("File::Raw::Archive: read_data failed"); |
|
825
|
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) |
|
828
|
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) && |
|
829
|
1 |
0 |
SvTYPE(SvRV(filter_sv)) == SVt_PVCV); |
|
834
|
0 |
50 |
if (rc < 0) croak("File::Raw::Archive: malformed archive"); |
|
835
|
4 |
46 |
if (rc == 0) break; |
|
840
|
40 |
6 |
if (has_filter) { |
|
845
|
0 |
40 |
PUSHMARK(SP); |
|
846
|
0 |
40 |
XPUSHs(sv_2mortal(SvREFCNT_inc(entry_obj))); |
|
850
|
40 |
0 |
if (count >= 1) { |
|
855
|
40 |
0 |
FREETMPS; |
|
857
|
20 |
20 |
if (!keep) { |
|
861
|
20 |
20 |
skip_buf, sizeof skip_buf)) > 0) {} |
|
862
|
0 |
20 |
if (n < 0) croak("File::Raw::Archive: read_data failed"); |
|
871
|
0 |
26 |
PUSHMARK(SP); |
|
872
|
0 |
26 |
XPUSHs(sv_2mortal(SvREFCNT_inc(entry_obj))); |
|
875
|
26 |
0 |
FREETMPS; |
|
884
|
26 |
26 |
skip_buf, sizeof skip_buf)) > 0) {} |
|
885
|
0 |
26 |
if (n < 0) croak("File::Raw::Archive: read_data failed"); |
|
914
|
0 |
0 |
if (rc == 1) break; /* clean EOF */ |
|
915
|
0 |
0 |
if (rc < 0) { |
|
936
|
0 |
0 |
if (archive_extract_bytes(&e, job.path, |
|
941
|
0 |
0 |
job.path, stage ? stage : "?", |
|
943
|
0 |
0 |
if (n > 0) { |
|
944
|
0 |
0 |
if ((size_t)n > sizeof errbuf) n = (int)sizeof errbuf; |
|
977
|
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) |
|
979
|
1 |
0 |
if (dest_len == 0 || dest_len >= sizeof path_buf - 2) |
|
|
0 |
1 |
if (dest_len == 0 || dest_len >= sizeof path_buf - 2) |
|
981
|
0 |
1 |
if (parallel < 1) parallel = 1; |
|
983
|
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) && |
|
984
|
0 |
0 |
SvTYPE(SvRV(filter_sv)) == SVt_PVCV); |
|
986
|
0 |
1 |
if (archive_mkpath(dest, 0755) < 0) { |
|
991
|
0 |
1 |
if (pipe(err_pipe) < 0) croak("pipe: %s", strerror(errno)); |
|
996
|
0 |
1 |
if (!workers) { |
|
1008
|
4 |
1 |
for (i = 0; i < parallel; i++) { |
|
1010
|
0 |
4 |
if (pipe(job_pipe) < 0) { |
|
1013
|
0 |
0 |
for (j = 0; j < num_started; j++) { |
|
1024
|
0 |
4 |
if (pid < 0) { |
|
1028
|
0 |
0 |
for (j = 0; j < num_started; j++) { |
|
1038
|
0 |
4 |
if (pid == 0) { |
|
1044
|
0 |
0 |
for (j = 0; j < num_started; j++) { |
|
1064
|
0 |
61 |
if (rc < 0) { |
|
1069
|
1 |
60 |
if (rc == 0) break; |
|
1071
|
60 |
0 |
if (!unsafe_paths) { |
|
1072
|
0 |
60 |
if (!archive_path_is_safe(e.name, e.name_len)) { |
|
1081
|
0 |
60 |
if (has_filter) { |
|
1086
|
0 |
0 |
PUSHMARK(SP); |
|
1089
|
0 |
0 |
XPUSHs(entry_rv); |
|
1093
|
0 |
0 |
if (count >= 1) { |
|
1098
|
0 |
0 |
FREETMPS; |
|
1100
|
0 |
0 |
if (!keep) { |
|
1103
|
0 |
0 |
skip_buf, sizeof skip_buf)) > 0) {} |
|
1104
|
0 |
0 |
if (n < 0) { snprintf(err_msg, sizeof err_msg, "read_data failed"); dispatch_err = 1; break; } |
|
1109
|
0 |
60 |
if (dest_len + 1 + e.name_len + 1 > sizeof path_buf) { |
|
1120
|
0 |
60 |
if (e.type == AE_DIR) { |
|
1121
|
0 |
0 |
if (archive_extract_dir(path_buf, e.mode) < 0) { |
|
1129
|
0 |
60 |
if (e.type == AE_SYMLINK) { |
|
1130
|
0 |
0 |
const char *target = e.link_target ? e.link_target : ""; |
|
1131
|
0 |
0 |
if (archive_extract_symlink(path_buf, target) < 0) { |
|
1137
|
0 |
0 |
skip_buf, sizeof skip_buf)) > 0) {} |
|
1138
|
0 |
0 |
if (n < 0) { snprintf(err_msg, sizeof err_msg, "read_data failed"); dispatch_err = 1; break; } |
|
1141
|
0 |
60 |
if (e.type != AE_FILE) { |
|
1144
|
0 |
0 |
skip_buf, sizeof skip_buf)) > 0) {} |
|
1145
|
0 |
0 |
if (n < 0) { snprintf(err_msg, sizeof err_msg, "read_data failed"); dispatch_err = 1; break; } |
|
1150
|
0 |
60 |
if (archive_make_parent_dir(path_buf) < 0) { |
|
1161
|
60 |
60 |
if (content_len + 16384 > content_cap) { |
|
1162
|
0 |
60 |
size_t new_cap = content_cap ? content_cap * 2 : 65536; |
|
1163
|
0 |
60 |
while (new_cap < content_len + 16384) new_cap *= 2; |
|
1165
|
0 |
60 |
if (!p) { read_err = 1; break; } |
|
1171
|
0 |
120 |
if (n < 0) { read_err = 1; break; } |
|
1172
|
60 |
60 |
if (n == 0) break; |
|
1175
|
0 |
60 |
if (read_err) { |
|
1184
|
0 |
60 |
if (marshal_job(path_buf, strlen(path_buf), |
|
1199
|
0 |
60 |
if (marshal_send(workers[rr].write_fd, payload, payload_len) < 0) { |
|
1212
|
4 |
1 |
for (i = 0; i < num_started; i++) { |
|
1213
|
4 |
0 |
if (workers[i].write_fd >= 0) { |
|
1225
|
0 |
1 |
if (n < 0) { |
|
1226
|
0 |
0 |
if (errno == EINTR) continue; |
|
1229
|
1 |
0 |
if (n == 0) break; |
|
1236
|
4 |
1 |
for (i = 0; i < num_started; i++) { |
|
1244
|
0 |
1 |
if (dispatch_err) { |
|
1249
|
0 |
1 |
if (err_len > 0) { |
|
1295
|
0 |
0 |
if (SvROK(self_sv) && SvTYPE(SvRV(self_sv)) == SVt_PVAV) { |
|
|
0 |
0 |
if (SvROK(self_sv) && SvTYPE(SvRV(self_sv)) == SVt_PVAV) { |
|
1298
|
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) |
|
1299
|
0 |
0 |
&& SvTYPE(SvRV(*meta_ref)) == SVt_PVAV) { |
|
1302
|
0 |
0 |
if (val && *val && SvOK(*val)) { |
|
|
0 |
0 |
if (val && *val && SvOK(*val)) { |
|
|
0 |
0 |
if (val && *val && SvOK(*val)) { |
|
1307
|
0 |
0 |
switch (slot) { |
|
1320
|
0 |
0 |
XPUSHs(result); |
|
1333
|
0 |
0 |
if (SvROK(self_sv) && SvTYPE(SvRV(self_sv)) == SVt_PVAV) { |
|
|
0 |
0 |
if (SvROK(self_sv) && SvTYPE(SvRV(self_sv)) == SVt_PVAV) { |
|
1336
|
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) |
|
1337
|
0 |
0 |
&& SvTYPE(SvRV(*meta_ref)) == SVt_PVAV) { |
|
1340
|
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)) |
|
1349
|
0 |
0 |
case 4: rc = (t == AE_SYMLINK || t == AE_HARDLINK); break; |
|
|
0 |
0 |
case 4: rc = (t == AE_SYMLINK || t == AE_HARDLINK); break; |
|
1351
|
0 |
0 |
XPUSHs(rc ? &PL_sv_yes : &PL_sv_no); |
|
|
0 |
0 |
XPUSHs(rc ? &PL_sv_yes : &PL_sv_no); |
|
1375
|
0 |
0 |
if (!OpHAS_SIBLING(pushop)) { |
|
1378
|
0 |
0 |
self_op = OpSIBLING(pushop); |
|
1379
|
0 |
0 |
if (!self_op) return entersubop; |
|
1380
|
0 |
0 |
cv_op = OpSIBLING(self_op); |
|
1381
|
0 |
0 |
if (!cv_op) return entersubop; |
|
1382
|
0 |
0 |
if (OpSIBLING(cv_op)) return entersubop; /* extra args */ |
|
|
0 |
0 |
if (OpSIBLING(cv_op)) return entersubop; /* extra args */ |
|
1393
|
0 |
0 |
newop->op_ppaddr = is_predicate ? pp_entry_predicate : pp_entry_accessor; |
|
1408
|
0 |
435 |
if (!cv) return; |
|
1409
|
116 |
319 |
SV *ckobj = newSViv(((IV)slot_or_kind << 1) |
|
1481
|
0 |
0 |
if (!SvOK(path_sv)) croak("File::Raw::Archive::_open_read: undef path"); |
|
1482
|
0 |
0 |
if (SvROK(opts_sv) && SvTYPE(SvRV(opts_sv)) == SVt_PVHV) |
|
|
0 |
0 |
if (SvROK(opts_sv) && SvTYPE(SvRV(opts_sv)) == SVt_PVHV) |
|
1486
|
0 |
0 |
if (fd < 0) croak("File::Raw::Archive: cannot open '%s': %s", |
|
1491
|
0 |
0 |
if (!plugin) { |
|
1497
|
0 |
0 |
if (!h) { close(fd); croak("File::Raw::Archive: out of memory"); } |
|
1501
|
0 |
0 |
if (gz) { |
|
1503
|
0 |
0 |
if (!h->gz_src) { |
|
1515
|
0 |
0 |
if (plugin->read_open(aTHX_ plugin, pull, src, opts, &h->cursor) < 0) { |
|
1533
|
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) |
|
1536
|
0 |
0 |
if (rc < 0) croak("File::Raw::Archive: malformed archive"); |
|
1537
|
0 |
0 |
if (rc == 0) RETVAL = &PL_sv_undef; |
|
1548
|
0 |
0 |
UV want = 0; |
|
1554
|
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) |
|
1556
|
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); |
|
1561
|
0 |
0 |
if (want > 0) { |
|
1563
|
0 |
0 |
if (remain == 0) break; |
|
1564
|
0 |
0 |
if (remain < take) take = (size_t)remain; |
|
1567
|
0 |
0 |
if (n < 0) { SvREFCNT_dec(out); croak("File::Raw::Archive: read_data failed"); } |
|
1568
|
0 |
0 |
if (n == 0) break; |
|
1570
|
0 |
0 |
if (want == 0 && (size_t)n < take) { |
|
1587
|
0 |
0 |
if (h) free_handle(aTHX_ h); |
|
1601
|
0 |
0 |
if (!SvOK(path_sv)) croak("File::Raw::Archive::_open_write: undef path"); |
|
1602
|
0 |
0 |
if (SvROK(opts_sv) && SvTYPE(SvRV(opts_sv)) == SVt_PVHV) |
|
|
0 |
0 |
if (SvROK(opts_sv) && SvTYPE(SvRV(opts_sv)) == SVt_PVHV) |
|
1606
|
0 |
0 |
SV **sv = opts ? hv_fetchs(opts, "compression", 0) : NULL; |
|
1607
|
0 |
0 |
if (sv && *sv && SvOK(*sv)) { |
|
|
0 |
0 |
if (sv && *sv && SvOK(*sv)) { |
|
|
0 |
0 |
if (sv && *sv && SvOK(*sv)) { |
|
1610
|
0 |
0 |
if ((nn == 4 && memcmp(pp, "gzip", 4) == 0)) gz = 1; |
|
|
0 |
0 |
if ((nn == 4 && memcmp(pp, "gzip", 4) == 0)) gz = 1; |
|
1611
|
0 |
0 |
else if (nn == 4 && memcmp(pp, "auto", 4) == 0) { |
|
|
0 |
0 |
else if (nn == 4 && memcmp(pp, "auto", 4) == 0) { |
|
1615
|
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; |
|
1621
|
0 |
0 |
if (fd < 0) croak("File::Raw::Archive: cannot open '%s' for write: %s", |
|
1625
|
0 |
0 |
SV **sv = opts ? hv_fetchs(opts, "plugin", 0) : NULL; |
|
1626
|
0 |
0 |
if (sv && *sv && SvOK(*sv)) { |
|
|
0 |
0 |
if (sv && *sv && SvOK(*sv)) { |
|
|
0 |
0 |
if (sv && *sv && SvOK(*sv)) { |
|
1630
|
0 |
0 |
if (nn >= sizeof namebuf) { |
|
1641
|
0 |
0 |
if (!plugin) { close(fd); croak("File::Raw::Archive: unknown plugin"); } |
|
1644
|
0 |
0 |
if (!h) { close(fd); croak("File::Raw::Archive: out of memory"); } |
|
1649
|
0 |
0 |
if (gz) { |
|
1651
|
0 |
0 |
if (opts) { |
|
1653
|
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); |
|
1656
|
0 |
0 |
if (!h->gz_sink) { free_handle(aTHX_ h); croak("File::Raw::Archive: gzip sink init failed"); } |
|
1665
|
0 |
0 |
if (plugin->write_open(aTHX_ plugin, push, sink, opts, &h->cursor) < 0) { |
|
1689
|
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) |
|
1691
|
0 |
0 |
if (!SvROK(entry_sv) || SvTYPE(SvRV(entry_sv)) != SVt_PVHV) |
|
|
0 |
0 |
if (!SvROK(entry_sv) || SvTYPE(SvRV(entry_sv)) != SVt_PVHV) |
|
1696
|
0 |
0 |
if (SvOK(content_sv)) { |
|
1699
|
0 |
0 |
if (e.size == 0 && clen > 0) e.size = clen; |
|
|
0 |
0 |
if (e.size == 0 && clen > 0) e.size = clen; |
|
1702
|
0 |
0 |
if (h->plugin->write_add(aTHX_ h->plugin, h->cursor, &e, cp, clen) < 0) |
|
1712
|
0 |
0 |
if (!h) return; |
|
1713
|
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) { |
|
1714
|
0 |
0 |
if (h->plugin->write_close(aTHX_ h->plugin, h->cursor) < 0) |
|
1719
|
0 |
0 |
if (h->gz_sink) { |
|
1720
|
0 |
0 |
if (archive_gz_sink_finish(h->gz_sink) < 0) |
|
1732
|
0 |
0 |
size_t n = 0; |
|
1735
|
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); |
|
1739
|
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]) { |
|
1752
|
0 |
0 |
RETVAL = rc; |
|
1767
|
0 |
0 |
for (i = 0; known[i]; i++) { |
|
1768
|
0 |
0 |
if (archive_lookup_plugin(aTHX_ known[i])) { |
|
1789
|
0 |
0 |
if (!SvOK(dest_sv)) |
|
1817
|
0 |
0 |
if (!SvOK(name_sv) || !SvOK(dest_sv)) |
|
|
0 |
0 |
if (!SvOK(name_sv) || !SvOK(dest_sv)) |
|
1850
|
0 |
3 |
if (!SvOK(path_sv)) |
|
1853
|
3 |
0 |
if (SvOK(content_sv)) { |
|
1856
|
1 |
2 |
if (SvROK(xattrs_sv) && SvTYPE(SvRV(xattrs_sv)) == SVt_PVHV) { |
|
|
1 |
0 |
if (SvROK(xattrs_sv) && SvTYPE(SvRV(xattrs_sv)) == SVt_PVHV) { |
|
1860
|
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]) { |
|
1874
|
0 |
3 |
if (marshal_job(path, path_len, |
|
1884
|
0 |
3 |
if (marshal_send(fd, buf, buf_len) < 0) { |
|
1911
|
0 |
13 |
if (items < 2) |
|
1913
|
1 |
12 |
if ((items - 2) % 2 != 0) |
|
1919
|
0 |
9 |
XPUSHs(sv_2mortal(result)); |
|
1927
|
1 |
4 |
if (items < 4) |
|
1929
|
0 |
4 |
if ((items - 4) % 2 != 0) |
|
1934
|
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; |
|
1944
|
0 |
4 |
XPUSHs(sv_2mortal(newSViv(rc))); |
|
1952
|
1 |
10 |
if (items < 3) |
|
1954
|
0 |
10 |
if ((items - 3) % 2 != 0) |
|
1964
|
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; |
|
1966
|
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; |
|
1968
|
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; |
|
1970
|
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); |
|
1972
|
1 |
9 |
if (parallel > 1 && !parallel_supported()) { |
|
|
0 |
1 |
if (parallel > 1 && !parallel_supported()) { |
|
1983
|
1 |
9 |
if (parallel > 1) { |
|
1991
|
0 |
8 |
XPUSHs(sv_2mortal(newSViv(1))); |
|
1999
|
1 |
4 |
if (items < 3) |
|
2002
|
3 |
1 |
if (!SvROK(cb_sv) || SvTYPE(SvRV(cb_sv)) != SVt_PVCV) |
|
|
0 |
3 |
if (!SvROK(cb_sv) || SvTYPE(SvRV(cb_sv)) != SVt_PVCV) |
|
2005
|
0 |
3 |
if ((opts_end - 2) % 2 != 0) |
|
2010
|
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; |
|
2038
|
0 |
36 |
if (items < 2) |
|
2040
|
0 |
36 |
if ((items - 2) % 2 != 0) |
|
2054
|
0 |
35 |
XPUSHs(sv_2mortal(obj)); |
|
2062
|
0 |
39 |
if (items < 2) |
|
2064
|
0 |
39 |
if ((items - 2) % 2 != 0) |
|
2076
|
0 |
38 |
XPUSHs(sv_2mortal(obj)); |
|
2093
|
77 |
0 |
if (!SvROK(self_sv) || SvTYPE(SvRV(self_sv)) != SVt_PVAV) |
|
|
0 |
77 |
if (!SvROK(self_sv) || SvTYPE(SvRV(self_sv)) != SVt_PVAV) |
|
2098
|
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)) |
|
2102
|
76 |
0 |
if (!handle_ref || !*handle_ref) |
|
|
0 |
76 |
if (!handle_ref || !*handle_ref) |
|
2106
|
76 |
0 |
if (!h || h->is_writer) |
|
|
0 |
76 |
if (!h || h->is_writer) |
|
2112
|
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) && |
|
2113
|
42 |
0 |
(!consumed_ref || !*consumed_ref || !SvTRUE(*consumed_ref))) { |
|
|
13 |
29 |
(!consumed_ref || !*consumed_ref || !SvTRUE(*consumed_ref))) { |
|
2117
|
9 |
13 |
buf, sizeof buf)) > 0) {} |
|
2118
|
0 |
13 |
if (n < 0) |
|
2125
|
0 |
76 |
if (rc < 0) |
|
2127
|
11 |
65 |
if (rc == 0) { |
|
2148
|
0 |
0 |
if (!SvROK(self_sv) || SvTYPE(SvRV(self_sv)) != SVt_PVAV) |
|
|
0 |
0 |
if (!SvROK(self_sv) || SvTYPE(SvRV(self_sv)) != SVt_PVAV) |
|
2152
|
0 |
0 |
if (!handle_ref || !*handle_ref) XSRETURN_UNDEF; |
|
|
0 |
0 |
if (!handle_ref || !*handle_ref) XSRETURN_UNDEF; |
|
2163
|
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; |
|
2174
|
0 |
34 |
if (!SvROK(self_sv)) return; |
|
2175
|
0 |
34 |
if (SvTYPE(SvRV(self_sv)) != SVt_PVAV) { |
|
2182
|
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; |
|
2188
|
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); |
|
2198
|
0 |
80 |
if (!SvROK(self_sv)) return; |
|
2199
|
40 |
40 |
if (SvTYPE(SvRV(self_sv)) != SVt_PVAV) { |
|
2206
|
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; |
|
2208
|
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); |
|
2218
|
0 |
678 |
if (items < 1) |
|
2221
|
678 |
0 |
if (!SvROK(self_sv) || SvTYPE(SvRV(self_sv)) != SVt_PVAV) |
|
|
0 |
678 |
if (!SvROK(self_sv) || SvTYPE(SvRV(self_sv)) != SVt_PVAV) |
|
2224
|
0 |
678 |
if ((items - 1) % 2 != 0) |
|
2231
|
1957 |
678 |
for (i = 1; i + 1 < items; i += 2) { |
|
2234
|
669 |
1288 |
if (klen == 7 && memcmp(kp, "content", 7) == 0) { |
|
|
669 |
0 |
if (klen == 7 && memcmp(kp, "content", 7) == 0) { |
|
2244
|
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)) { |
|
2248
|
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)); |
|
2249
|
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)) { |
|
2252
|
677 |
0 |
if (nl > 0 && np[nl - 1] == '/') type = AE_DIR; |
|
|
5 |
672 |
if (nl > 0 && np[nl - 1] == '/') type = AE_DIR; |
|
2253
|
3 |
669 |
else if (has_link) type = AE_SYMLINK; |
|
2255
|
0 |
0 |
} else if (has_link) { |
|
2264
|
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)) { |
|
2266
|
102 |
0 |
int type = (t && *t) ? (int)SvIV(*t) : AE_FILE; |
|
|
102 |
0 |
int type = (t && *t) ? (int)SvIV(*t) : AE_FILE; |
|
2268
|
98 |
4 |
: type == AE_SYMLINK ? 0777 |
|
|
3 |
95 |
: type == AE_SYMLINK ? 0777 |
|
2275
|
678 |
0 |
if (!handle_ref || !*handle_ref) |
|
|
0 |
678 |
if (!handle_ref || !*handle_ref) |
|
2278
|
678 |
0 |
if (!h || !h->is_writer) |
|
|
0 |
678 |
if (!h || !h->is_writer) |
|
2288
|
669 |
9 |
if (content_sv && SvOK(content_sv)) { |
|
|
669 |
0 |
if (content_sv && SvOK(content_sv)) { |
|
2290
|
669 |
0 |
if (e.size == 0 && clen > 0) e.size = clen; |
|
|
669 |
0 |
if (e.size == 0 && clen > 0) e.size = clen; |
|
2293
|
5 |
673 |
if (h->plugin->write_add(aTHX_ h->plugin, h->cursor, &e, cp, clen) < 0) |
|
2306
|
0 |
39 |
if (!SvROK(self_sv)) return; |
|
2307
|
0 |
39 |
if (SvTYPE(SvRV(self_sv)) != SVt_PVAV) { |
|
2313
|
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; |
|
2316
|
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); |
|
2326
|
0 |
78 |
if (!SvROK(self_sv)) return; |
|
2327
|
39 |
39 |
if (SvTYPE(SvRV(self_sv)) != SVt_PVAV) { |
|
2333
|
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; |
|
2335
|
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); |
|
2371
|
204 |
0 |
if (!SvROK(self_sv) || SvTYPE(SvRV(self_sv)) != SVt_PVAV) |
|
|
0 |
204 |
if (!SvROK(self_sv) || SvTYPE(SvRV(self_sv)) != SVt_PVAV) |
|
2375
|
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) |
|
2376
|
0 |
203 |
|| SvTYPE(SvRV(*meta_ref)) != SVt_PVAV) |
|
2380
|
200 |
3 |
if (!val || !*val || !SvOK(*val)) { |
|
|
200 |
0 |
if (!val || !*val || !SvOK(*val)) { |
|
|
0 |
200 |
if (!val || !*val || !SvOK(*val)) { |
|
2382
|
0 |
3 |
switch (ix) { |
|
2409
|
35 |
0 |
if (!SvROK(self_sv) || SvTYPE(SvRV(self_sv)) != SVt_PVAV) |
|
|
0 |
35 |
if (!SvROK(self_sv) || SvTYPE(SvRV(self_sv)) != SVt_PVAV) |
|
2413
|
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) |
|
2414
|
0 |
35 |
|| SvTYPE(SvRV(*meta_ref)) != SVt_PVAV) |
|
2418
|
35 |
0 |
t = (type_ref && *type_ref && SvOK(*type_ref)) |
|
|
35 |
0 |
t = (type_ref && *type_ref && SvOK(*type_ref)) |
|
2419
|
35 |
0 |
? SvIV(*type_ref) : (IV)AE_FILE; |
|
2424
|
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; |
|
2444
|
40 |
0 |
if (!SvROK(self_sv) || SvTYPE(SvRV(self_sv)) != SVt_PVAV) |
|
|
0 |
40 |
if (!SvROK(self_sv) || SvTYPE(SvRV(self_sv)) != SVt_PVAV) |
|
2448
|
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)) { |
|
2452
|
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) |
|
2453
|
0 |
37 |
|| SvTYPE(SvRV(*reader_ref)) != SVt_PVAV) |
|
2457
|
37 |
0 |
if (!handle_ref || !*handle_ref) |
|
|
0 |
37 |
if (!handle_ref || !*handle_ref) |
|
2460
|
36 |
1 |
if (!h || h->is_writer) |
|
|
0 |
36 |
if (!h || h->is_writer) |
|
2464
|
194 |
36 |
buf, sizeof buf)) > 0) { |
|
2467
|
0 |
36 |
if (n < 0) { |
|
2492
|
45 |
0 |
if (!SvROK(self_sv) || SvTYPE(SvRV(self_sv)) != SVt_PVAV) |
|
|
0 |
45 |
if (!SvROK(self_sv) || SvTYPE(SvRV(self_sv)) != SVt_PVAV) |
|
2496
|
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) |
|
2497
|
0 |
45 |
|| SvTYPE(SvRV(*reader_ref)) != SVt_PVAV) |
|
2501
|
45 |
0 |
if (!handle_ref || !*handle_ref) |
|
|
0 |
45 |
if (!handle_ref || !*handle_ref) |
|
2504
|
45 |
0 |
if (!h || h->is_writer) |
|
|
0 |
45 |
if (!h || h->is_writer) |
|
2506
|
45 |
0 |
if (!n_sv || !SvOK(n_sv)) |
|
|
0 |
45 |
if (!n_sv || !SvOK(n_sv)) |
|
2510
|
86 |
42 |
while ((UV)SvCUR(result) < want) { |
|
2513
|
3 |
83 |
if (remain < chunk) chunk = (size_t)remain; |
|
2515
|
0 |
86 |
if (got < 0) { |
|
2519
|
3 |
83 |
if (got == 0) break; |
|
2540
|
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; |
|
2543
|
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) |
|
2544
|
0 |
2 |
|| SvTYPE(SvRV(*reader_ref)) != SVt_PVAV) return; |
|
2547
|
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; |
|
2549
|
2 |
0 |
if (!handle_ref || !*handle_ref) return; |
|
|
0 |
2 |
if (!handle_ref || !*handle_ref) return; |
|
2551
|
0 |
2 |
if (!h) return; |
|
2553
|
2 |
2 |
buf, sizeof buf)) > 0) {} |
|
2554
|
0 |
2 |
if (n < 0) |
|
2589
|
0 |
1 |
if (items < 1) |
|
2591
|
0 |
1 |
if ((items - 1) % 2 != 0) |
|
2604
|
0 |
1 |
XPUSHs(sv_2mortal(obj)); |
|
2612
|
0 |
1 |
if (items < 1) |
|
2614
|
0 |
1 |
if ((items - 1) % 2 != 0) |
|
2626
|
0 |
1 |
XPUSHs(sv_2mortal(obj)); |
|
2634
|
0 |
1 |
if (items < 1) |
|
2636
|
0 |
1 |
if ((items - 1) % 2 != 0) |
|
2642
|
0 |
1 |
XPUSHs(sv_2mortal(result)); |
|
2650
|
0 |
1 |
if (items < 3) |
|
2652
|
0 |
1 |
if ((items - 3) % 2 != 0) |
|
2657
|
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; |
|
2667
|
0 |
1 |
XPUSHs(sv_2mortal(newSViv(rc))); |
|
2675
|
0 |
1 |
if (items < 2) |
|
2677
|
0 |
1 |
if ((items - 2) % 2 != 0) |
|
2687
|
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; |
|
2689
|
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; |
|
2691
|
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; |
|
2693
|
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); |
|
2695
|
0 |
1 |
if (parallel > 1 && !parallel_supported()) { |
|
|
0 |
0 |
if (parallel > 1 && !parallel_supported()) { |
|
2706
|
0 |
1 |
if (parallel > 1) { |
|
2714
|
0 |
1 |
XPUSHs(sv_2mortal(newSViv(1))); |
|
2722
|
0 |
1 |
if (items < 2) |
|
2725
|
1 |
0 |
if (!SvROK(cb_sv) || SvTYPE(SvRV(cb_sv)) != SVt_PVCV) |
|
|
0 |
1 |
if (!SvROK(cb_sv) || SvTYPE(SvRV(cb_sv)) != SVt_PVCV) |
|
2728
|
0 |
1 |
if ((opts_end - 1) % 2 != 0) |
|
2733
|
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; |
|
2769
|
30 |
0 |
if (cx && CxTYPE(cx) == CXt_SUB) { |
|
|
30 |
0 |
if (cx && CxTYPE(cx) == CXt_SUB) { |
|
2770
|
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)); |
|
2772
|
0 |
30 |
if (!caller_pkg) caller_pkg = "main"; |
|
2780
|
1 |
29 |
for (i = 1; i < items; i++) { |
|
2781
|
0 |
1 |
if (!SvOK(ST(i))) continue; |
|
2784
|
1 |
0 |
if ((nl == 6 && memcmp(np, "import", 6) == 0) |
|
|
0 |
1 |
if ((nl == 6 && memcmp(np, "import", 6) == 0) |
|
2785
|
0 |
0 |
|| (nl == 4 && memcmp(np, ":all", 4) == 0)) { |
|
|
0 |
0 |
|| (nl == 4 && memcmp(np, ":all", 4) == 0)) { |
|
2792
|
180 |
30 |
for (n = 0; known_names[n]; n++) { |
|
2795
|
174 |
6 |
if (!wanted) { |
|
2797
|
0 |
174 |
for (j = 1; j < items; j++) { |
|
2798
|
0 |
0 |
if (!SvOK(ST(j))) continue; |
|
2801
|
0 |
0 |
if (nl == strlen(name) && memcmp(np, name, nl) == 0) { |
|
|
0 |
0 |
if (nl == strlen(name) && memcmp(np, name, nl) == 0) { |
|
2807
|
174 |
6 |
if (!wanted) continue; |
|
2814
|
0 |
6 |
if (!src_cv) { |
|
2825
|
6 |
0 |
if (!isGV(dst_gv)) gv_init(dst_gv, caller_stash, dst_short, |