| line |
true |
false |
branch |
|
9
|
0 |
16 |
if (encoding[0] != '\0') |
|
18
|
0 |
16 |
if (reader->encoder != NULL) |
|
28
|
8 |
0 |
if (xh_strcasecmp(encoding, XH_INTERNAL_ENCODING) == 0) { |
|
30
|
0 |
8 |
if (reader->encoder != NULL) { |
|
37
|
0 |
0 |
if (reader->encoder == NULL) { |
|
42
|
0 |
0 |
if (reader->encoder == NULL) { |
|
48
|
0 |
0 |
if (len != NULL && *len > 0) { |
|
|
0 |
0 |
if (len != NULL && *len > 0) { |
|
54
|
0 |
0 |
else if (xh_strcasecmp(encoding, reader->encoder->fromcode) != 0) { |
|
69
|
16 |
0 |
str = XH_CHAR_CAST SvPV(input, len); |
|
111
|
0 |
0 |
if (preserve == NULL) { |
|
117
|
0 |
0 |
if (*off) { |
|
127
|
0 |
0 |
if (preserve != NULL && xh_buffer_start(enc_buf) != old_buf_addr) { |
|
|
0 |
0 |
if (preserve != NULL && xh_buffer_start(enc_buf) != old_buf_addr) { |
|
133
|
0 |
0 |
while (enc_buf->cur < enc_buf->end) { |
|
134
|
0 |
0 |
if (reader->fake_read_pos != NULL) { |
|
142
|
0 |
0 |
if (src_left == 0 && reader->encoder->state == XH_ENC_OK) { |
|
|
0 |
0 |
if (src_left == 0 && reader->encoder->state == XH_ENC_OK) { |
|
143
|
0 |
0 |
if (main_buf->cur == main_buf->end) |
|
156
|
0 |
0 |
switch (reader->encoder->state) { |
|
158
|
0 |
0 |
if (src_left == 0) |
|
184
|
8 |
0 |
: xh_string_reader_read_with_encoding; |
|
200
|
0 |
0 |
reader->file = XH_CHAR_CAST SvPV_nolen(input); |
|
205
|
0 |
0 |
if (reader->fd == -1) { |
|
209
|
0 |
0 |
if (fstat(reader->fd, &sb) == -1) { |
|
215
|
0 |
0 |
if (sb.st_size == 0) { |
|
240
|
0 |
0 |
if ((caddr_t) reader->str == (caddr_t) (-1)) { |
|
256
|
0 |
0 |
if (reader->fd == -1) return; |
|
265
|
0 |
0 |
if (munmap(reader->str, reader->len) == -1) { |
|
271
|
0 |
0 |
if (close(reader->fd) == -1) { |
|
318
|
0 |
0 |
if (preserve == NULL) { |
|
324
|
0 |
0 |
if (*off) { |
|
336
|
0 |
0 |
if (preserve != NULL && main_buf->start != old_buf_addr) { |
|
|
0 |
0 |
if (preserve != NULL && main_buf->start != old_buf_addr) { |
|
342
|
0 |
0 |
if (len == (size_t) (-1)) { |
|
365
|
0 |
0 |
if (preserve == NULL) { |
|
371
|
0 |
0 |
if (*off) { |
|
381
|
0 |
0 |
if (preserve != NULL && enc_buf->start != old_buf_addr) { |
|
|
0 |
0 |
if (preserve != NULL && enc_buf->start != old_buf_addr) { |
|
387
|
0 |
0 |
while (enc_buf->cur < enc_buf->end) { |
|
390
|
0 |
0 |
if (reader->fake_read_pos == NULL) { |
|
399
|
0 |
0 |
if (src_left == 0) { |
|
400
|
0 |
0 |
if (main_buf->cur == main_buf->end) |
|
404
|
0 |
0 |
if (src_left == (size_t) (-1)) |
|
415
|
0 |
0 |
switch (reader->encoder->state) { |
|
417
|
0 |
0 |
if (src_left == 0) |
|
445
|
0 |
0 |
: xh_file_reader_read_with_encoding; |
|
464
|
0 |
0 |
if (reader->main_buf.start != NULL) |
|
479
|
0 |
0 |
PUSHMARK(SP); |
|
480
|
0 |
0 |
XPUSHs(obj); |
|
481
|
0 |
0 |
XPUSHs(buf); |
|
482
|
0 |
0 |
XPUSHs(sv_2mortal(newSViv(count))); |
|
483
|
0 |
0 |
XPUSHs(sv_2mortal(newSViv(offset))); |
|
490
|
0 |
0 |
if (nparam) { |
|
491
|
0 |
0 |
len = POPi; |
|
497
|
0 |
0 |
FREETMPS; |
|
516
|
0 |
0 |
if (reader->perl_buf.scalar != NULL) |
|
531
|
0 |
0 |
if (preserve == NULL) { |
|
537
|
0 |
0 |
if (*off) { |
|
554
|
0 |
0 |
if (preserve != NULL && main_buf->start != old_buf_addr) { |
|
|
0 |
0 |
if (preserve != NULL && main_buf->start != old_buf_addr) { |
|
560
|
0 |
0 |
if (len == (size_t) (-1)) { |
|
584
|
0 |
0 |
if (preserve == NULL) { |
|
590
|
0 |
0 |
if (*off) { |
|
600
|
0 |
0 |
if (preserve != NULL && enc_buf->start != old_buf_addr) { |
|
|
0 |
0 |
if (preserve != NULL && enc_buf->start != old_buf_addr) { |
|
606
|
0 |
0 |
while (enc_buf->cur < enc_buf->end) { |
|
609
|
0 |
0 |
if (reader->fake_read_pos == NULL) { |
|
618
|
0 |
0 |
if (src_left == 0) { |
|
619
|
0 |
0 |
if (main_buf->cur == main_buf->end) |
|
623
|
0 |
0 |
if (src_left == (size_t) (-1)) |
|
634
|
0 |
0 |
switch (reader->encoder->state) { |
|
636
|
0 |
0 |
if (src_left == 0) |
|
664
|
0 |
0 |
: xh_perl_obj_reader_read_with_encoding; |
|
677
|
16 |
0 |
if (SvTYPE(input) != SVt_PVGV) { |
|
678
|
16 |
0 |
str = XH_CHAR_CAST SvPV(input, len); |
|
679
|
0 |
16 |
if (len == 0) |
|
683
|
16 |
0 |
if (xh_str_is_xml(str)) { |
|
709
|
0 |
0 |
io = GvIO(gv); |
|
|
0 |
0 |
io = GvIO(gv); |
|
|
0 |
0 |
io = GvIO(gv); |
|
|
0 |
0 |
io = GvIO(gv); |
|
711
|
0 |
0 |
if (!io) |
|
714
|
0 |
0 |
if ((mg = SvTIED_mg(MUTABLE_SV(io), PERL_MAGIC_tiedscalar))) { |
|
|
0 |
0 |
if ((mg = SvTIED_mg(MUTABLE_SV(io), PERL_MAGIC_tiedscalar))) { |
|
717
|
0 |
0 |
reader->perl_obj = SvTIED_obj(MUTABLE_SV(io), mg); |
|
742
|
16 |
0 |
if (reader->destroy != NULL) |