Branch Coverage

hparser.c
Criterion Covered Total %
branch 804 952 84.4


line true false branch
140 4 32459 if (p_state->eof)
184 0 32459 if (p_state->pending_end_tag && event != E_TEXT && event != E_COMMENT) {
0 0 if (p_state->pending_end_tag && event != E_TEXT && event != E_COMMENT) {
0 0 if (p_state->pending_end_tag && event != E_TEXT && event != E_COMMENT) {
195 154 32305 p_state->offset += CHR_DIST(end, beg);
196 122 32337 if (line) {
199 718 122 while (s < end) {
200 31 687 if (*s == '\n') {
206 27 95 if (nl)
207 10 17 p_state->column = CHR_DIST(end, nl) - 1;
209 22 73 p_state->column += CHR_DIST(end, beg);
212 32 32427 if (event == E_NONE)
216 4 32423 if (p_state->ms == MS_IGNORE)
221 32293 130 if (p_state->ignore_tags || p_state->report_tags || p_state->ignore_elements) {
32207 86 if (p_state->ignore_tags || p_state->report_tags || p_state->ignore_elements) {
197 32010 if (p_state->ignore_tags || p_state->report_tags || p_state->ignore_elements) {
223 308 105 if (event == E_START || event == E_END) {
62 246 if (event == E_START || event == E_END) {
228 38 129 if (utf8)
232 159 8 if (!CASE_SENSITIVE(p_state))
155 4 if (!CASE_SENSITIVE(p_state))
235 7 160 if (p_state->ignoring_element) {
236 7 0 if (sv_eq(p_state->ignoring_element, tagname)) {
237 0 7 if (event == E_START)
239 7 0 else if (--p_state->ignore_depth == 0) {
250 7 1 if (event == E_START) {
268 7 239 else if (p_state->ignoring_element) {
274 3286 29083 if (!h->cb) {
277 2178 1108 if (!h->cb)
281 16748 13443 if (SvTYPE(h->cb) != SVt_PVAV && !SvTRUE(h->cb)) {
7 16741 if (SvTYPE(h->cb) != SVt_PVAV && !SvTRUE(h->cb)) {
286 8981 21203 if (p_state->unbroken_text && event == E_TEXT) {
4510 4471 if (p_state->unbroken_text && event == E_TEXT) {
288 16 4494 if (!p_state->pend_text)
290 4356 154 if (SvOK(p_state->pend_text)) {
291 2 152 if (p_state->is_cdata != p_state->pend_text_is_cdata) {
304 4358 0 if (!utf8)
307 0 4510 if (utf8 && !SvUTF8(p_state->pend_text))
0 0 if (utf8 && !SvUTF8(p_state->pend_text))
309 4510 0 if (utf8 || !SvUTF8(p_state->pend_text)) {
4510 0 if (utf8 || !SvUTF8(p_state->pend_text)) {
320 4458 21216 else if (p_state->pend_text && SvOK(p_state->pend_text)) {
4294 164 else if (p_state->pend_text && SvOK(p_state->pend_text)) {
327 25673 1 argspec = h->argspec ? SvPV(h->argspec, my_na) : "";
329 8945 16729 if (SvTYPE(h->cb) == SVt_PVAV) {
331 502 8443 if (*argspec == ARG_FLAG_FLAT_ARRAY) {
342 0 16729 if (*argspec == ARG_FLAG_FLAT_ARRAY)
348 0 16729 PUSHMARK(SP);
351 85100 25674 for (s = argspec; *s; s++) {
363 89 17 if (num_tokens >= 1) {
368 426 89 for (i = 0; i < num_tokens; i++) {
369 426 0 if (tokens[i].beg) {
371 0 426 if (utf8)
376 0 0 av_push(av, p_state->bool_attr_val
386 33 51 if (num_tokens >= 1 && tokens[0].beg >= beg) {
32 1 if (num_tokens >= 1 && tokens[0].beg >= beg) {
390 369 32 for (i = 0; i < num_tokens; i++) {
391 367 2 if (tokens[i].beg) {
392 13 354 av_push(av, newSViv(CHR_DIST(tokens[i].beg, beg)));
393 13 354 av_push(av, newSViv(CHR_DIST(tokens[i].end, tokens[i].beg)));
409 6702 68 if (num_tokens >= 1) {
412 29 6673 if (utf8)
414 6641 61 if (!CASE_SENSITIVE(p_state) && argcode != ARG_TOKEN0)
6636 5 if (!CASE_SENSITIVE(p_state) && argcode != ARG_TOKEN0)
6565 71 if (!CASE_SENSITIVE(p_state) && argcode != ARG_TOKEN0)
416 21 6681 if (argcode == ARG_TAG && event != E_START) {
10 11 if (argcode == ARG_TAG && event != E_START) {
425 4381 92 if (event == E_START) {
428 4372 9 if (argcode == ARG_ATTR) {
440 12076 4381 for (i = 1; i < num_tokens; i += 2) {
445 37 12039 if (utf8)
447 3452 8624 if (tokens[i+1].beg) {
450 3288 164 if (*beg == '"' || *beg == '\'' || (*beg == '`' && p_state->backquote)) {
1242 2046 if (*beg == '"' || *beg == '\'' || (*beg == '`' && p_state->backquote)) {
7 1235 if (*beg == '"' || *beg == '\'' || (*beg == '`' && p_state->backquote)) {
1 6 if (*beg == '"' || *beg == '\'' || (*beg == '`' && p_state->backquote)) {
455 34 3418 if (utf8)
457 3450 2 if (!p_state->attr_encoded) {
458 20 3430 if (p_state->utf8_mode) {
463 20 3430 if (p_state->utf8_mode)
468 0 8624 if (p_state->bool_attr_val)
474 12063 13 if (!CASE_SENSITIVE(p_state))
12059 4 if (!CASE_SENSITIVE(p_state))
477 12068 8 if (argcode == ARG_ATTR) {
485 4 4 if (array) {
490 0 4 mXPUSHs(attrname);
491 0 4 mXPUSHs(attrval);
496 18 74 else if (argcode == ARG_ATTRARR) {
502 4271 25 if (event == E_START) {
505 11963 4271 for (i = 1; i < num_tokens; i += 2) {
508 0 11963 if (utf8)
510 11953 10 if (!CASE_SENSITIVE(p_state))
11949 4 if (!CASE_SENSITIVE(p_state))
520 115 25245 if (utf8)
525 79 77 if (event == E_TEXT) {
527 23 56 if (utf8)
529 71 8 if (!p_state->is_cdata) {
530 8 63 if (p_state->utf8_mode) {
535 8 63 if (p_state->utf8_mode)
542 17968 53 if (event == E_TEXT) {
543 7 17961 arg = boolSV(p_state->is_cdata);
557 16 58 arg = sv_2mortal(newSViv(offset + CHR_DIST(end, beg)));
561 16 85 arg = sv_2mortal(newSViv(CHR_DIST(end, beg)));
581 0 8319 if (SvUTF8(h->argspec))
596 85073 27 if (push_arg) {
597 366 84707 if (!arg)
600 31113 53960 if (array) {
607 0 53960 XPUSHs(arg);
612 8945 16729 if (array) {
613 8443 502 if (array != (AV*)h->cb)
619 16332 397 if ((enum argcode)*argspec == ARG_SELF && !SvROK(h->cb)) {
16241 91 if ((enum argcode)*argspec == ARG_SELF && !SvROK(h->cb)) {
627 16729 0 if (SvTRUE(ERRSV)) {
1 16728 if (SvTRUE(ERRSV)) {
631 16724 4 FREETMPS;
634 14 25659 if (p_state->skipped_text)
639 38 2230 if (p_state->skipped_text) {
640 20 18 if (event != E_TEXT && p_state->pend_text && SvOK(p_state->pend_text))
2 18 if (event != E_TEXT && p_state->pend_text && SvOK(p_state->pend_text))
2 0 if (event != E_TEXT && p_state->pend_text && SvOK(p_state->pend_text))
642 2 36 if (utf8 && !SvUTF8(p_state->skipped_text))
1 1 if (utf8 && !SvUTF8(p_state->skipped_text))
644 36 2 if (utf8 || !SvUTF8(p_state->skipped_text)) {
35 1 if (utf8 || !SvUTF8(p_state->skipped_text)) {
668 0 463 if (SvUTF8(src))
671 0 463 while (isHSPACE(*s))
674 7 456 if (*s == '@') {
677 0 7 while (isHSPACE(*tmp))
679 7 0 if (*tmp == '{') {
683 0 7 while (isHSPACE(*tmp))
688 1267 4 while (s < end) {
689 71 1196 if (isHNAME_FIRST(*s) || *s == '@') {
4 67 if (isHNAME_FIRST(*s) || *s == '@') {
695 4876 1200 while (isHNAME_CHAR(*s))
699 7620 2 for ( arg_name = argname; a < ARG_LITERAL ; ++a, ++arg_name ) {
700 1202 6418 if (strnEQ(*arg_name, name, s - name) &&
701 1198 4 (*arg_name)[s - name] == '\0')
704 1198 2 if (a < ARG_LITERAL) {
708 1194 4 if (a == ARG_LINE || a == ARG_COLUMN) {
5 1189 if (a == ARG_LINE || a == ARG_COLUMN) {
709 5 4 if (!p_state->line)
712 7 1191 if (a == ARG_SKIPPED_TEXT) {
713 5 2 if (!p_state->skipped_text) {
717 1120 78 if (a == ARG_ATTR || a == ARG_ATTRARR) {
4 1116 if (a == ARG_ATTR || a == ARG_ATTRARR) {
718 79 3 if (p_state->argspec_entity_decode != ARG_DTEXT)
721 10 1106 else if (a == ARG_DTEXT) {
729 61 6 else if (*s == '"' || *s == '\'') {
61 0 else if (*s == '"' || *s == '\'') {
732 655 1 while (s < end && *s != *string_beg && *s != '\\')
590 65 while (s < end && *s != *string_beg && *s != '\\')
589 1 while (s < end && *s != *string_beg && *s != '\\')
734 65 2 if (*s == *string_beg) {
738 1 64 if (len > 255)
746 1 1 else if (*s == '\\') {
757 1 1262 while (isHSPACE(*s))
760 7 1255 if (*s == '}' && SvPVX(argspec)[0] == ARG_FLAG_FLAT_ARRAY) {
7 0 if (*s == '}' && SvPVX(argspec)[0] == ARG_FLAG_FLAT_ARRAY) {
763 0 7 while (isHSPACE(*s))
765 0 7 if (s < end)
769 453 809 if (s == end)
771 1 808 if (*s != ',') {
775 32 808 while (isHSPACE(*s))
805 0 4358 SvOK_off(old_pend_text);
822 13476 63 while (s < end) {
823 13265 211 if (!quote && *s == '>')
2896 10369 if (!quote && *s == '>')
825 10536 44 if (*s == '"' || *s == '\'') {
45 10491 if (*s == '"' || *s == '\'') {
826 8 81 if (*s == quote) {
829 79 2 else if (!quote && (prev == ' ' || prev == '=')) {
71 8 else if (!quote && (prev == ' ' || prev == '=')) {
0 71 else if (!quote && (prev == ' ' || prev == '=')) {
843 6 171 if (p_state->strict_comment) {
851 125 0 while (s < end && *s != '-' && *s != '>')
112 13 while (s < end && *s != '-' && *s != '>')
104 8 while (s < end && *s != '-' && *s != '>')
854 0 21 if (s == end) {
855 0 0 FREE_TOKENS;
859 8 13 if (*s == '>') {
861 2 6 if (start_com)
869 0 6 FREE_TOKENS;
875 0 13 if (s == end) {
876 0 0 FREE_TOKENS;
880 12 1 if (*s == '-') {
884 9 3 if (start_com) {
885 0 9 PUSH_TOKEN(start_com, s-2);
894 2 169 else if (p_state->no_dash_dash_comment_end) {
898 16 0 while (s < end && *s != '>')
14 2 while (s < end && *s != '>')
901 2 0 if (s < end) {
915 2226 104 while (s < end && *s != '-')
2131 95 while (s < end && *s != '-')
918 95 104 if (s < end) {
920 78 17 if (*s == '-') {
922 15 78 while (isHSPACE(*s))
924 48 30 if (*s == '>') {
931 30 17 if (s < end) {
937 121 0 if (s == end)
955 32 0 if (ms_stack) {
958 18 32 for (stack_idx = 0; stack_idx <= stack_len; stack_idx++) {
960 18 0 if (svp) {
965 25 18 for (i = 0; i <= tokens_len; i++) {
967 25 0 if (svp) {
971 11 14 if (strEQ(token_str, "include"))
973 4 10 else if (strEQ(token_str, "rcdata"))
975 7 3 else if (strEQ(token_str, "cdata"))
977 2 1 else if (strEQ(token_str, "ignore"))
981 24 1 if (p_state->ms < token)
1001 0 16 if (!p_state->marked_sections)
1010 5 17 while (isHSPACE(*s))
1012 20 17 while (isHNAME_FIRST(*s)) {
1017 97 20 while (isHNAME_CHAR(*s))
1020 19 20 while (isHSPACE(*s))
1022 0 20 if (s == end)
1025 13 7 if (!tokens)
1028 1 19 if (utf8)
1032 1 16 if (*s == '-') {
1034 1 0 if (*s == '-') {
1038 9 0 while (s < end && *s != '-')
8 1 while (s < end && *s != '-')
1040 0 1 if (s == end)
1044 1 0 if (*s == '-') {
1055 16 0 if (*s == '[') {
1059 3 13 if (!tokens) {
1064 4 12 if (!p_state->ms_stack)
1088 185 374 if (*s == '-') {
1093 6 179 if (s == end)
1096 2 177 if (*s != '-')
1103 121 56 return (tmp == s) ? beg : tmp;
1107 16 358 if (*s == '[') {
1111 0 16 if (!tmp)
1117 1 357 if (*s == '>') {
1127 305 52 if (isALPHA(*s)) {
1134 1961 16 while (s < end && isHNAME_CHAR(*s))
1672 289 while (s < end && isHNAME_CHAR(*s))
1137 16 289 if (s == end)
1141 4 20 if (!((decl_id_len == 7 &&
1142 266 0 strnEQx(decl_id, "DOCTYPE", 7, !CASE_SENSITIVE(p_state))) ||
266 0 strnEQx(decl_id, "DOCTYPE", 7, !CASE_SENSITIVE(p_state))) ||
1143 0 4 (decl_id_len == 6 &&
1144 3 1 strnEQx(decl_id, "ENTITY", 6, !CASE_SENSITIVE(p_state)))
3 0 strnEQx(decl_id, "ENTITY", 6, !CASE_SENSITIVE(p_state)))
1152 0 269 PUSH_TOKEN(decl_id, s);
1155 50567 165 while (s < end && isHSPACE(*s))
25413 25154 while (s < end && isHSPACE(*s))
1158 165 25154 if (s == end)
1161 25025 129 if (*s == '"' || *s == '\'' || (*s == '`' && p_state->backquote)) {
25025 0 if (*s == '"' || *s == '\'' || (*s == '`' && p_state->backquote)) {
0 25025 if (*s == '"' || *s == '\'' || (*s == '`' && p_state->backquote)) {
0 0 if (*s == '"' || *s == '\'' || (*s == '`' && p_state->backquote)) {
1164 2849 65 while (s < end && *s != *str_beg)
2785 64 while (s < end && *s != *str_beg)
1166 65 64 if (s == end)
1169 0 64 PUSH_TOKEN(str_beg, s);
1171 12405 12620 else if (*s == '-') {
1175 0 12405 if (s == end)
1177 0 12405 if (*s != '-')
1182 62054 0 while (s < end && *s != '-')
49647 12407 while (s < end && *s != '-')
1184 0 12407 if (s == end)
1187 0 12407 if (s == end)
1189 12405 2 if (*s == '-') {
1191 0 12405 PUSH_TOKEN(com_beg, s);
1196 12598 22 else if (*s != '>') {
1200 25705 17 while (s < end && isHNOT_SPACE_GT(*s))
13124 12581 while (s < end && isHNOT_SPACE_GT(*s))
1202 17 12581 if (s == end)
1204 696 11885 PUSH_TOKEN(word_beg, s);
1211 0 22 if (s == end)
1213 22 0 if (*s == '>') {
1216 1 21 FREE_TOKENS;
1221 0 20 FREE_TOKENS;
1225 153 110 FREE_TOKENS;
1231 0 74 if (p_state->strict_comment)
1235 12761 17 while (s < end && *s != '>')
12704 57 while (s < end && *s != '>')
1237 57 17 if (s < end) {
1261 6836 20 if (STRICT_NAMES(p_state)) {
0 6836 if (STRICT_NAMES(p_state)) {
1273 110962 235 while (s < end && isHCTYPE(*s, tag_name_char)) {
104341 6621 while (s < end && isHCTYPE(*s, tag_name_char)) {
1274 427 103914 if (*s == '/' && ALLOW_EMPTY_TAG(p_state)) {
427 0 if (*s == '/' && ALLOW_EMPTY_TAG(p_state)) {
0 427 if (*s == '/' && ALLOW_EMPTY_TAG(p_state)) {
1275 0 0 if ((s + 1) == end)
1277 0 0 if (*(s + 1) == '>')
1282 0 6856 PUSH_TOKEN(beg+1, s); /* tagname */
1284 5711 6856 while (isHSPACE(*s))
1286 262 6594 if (s == end)
1289 29696 5184 while (isHCTYPE(*s, attr_name_first)) {
1293 62 29634 if (*s == '/' && ALLOW_EMPTY_TAG(p_state)) {
62 0 if (*s == '/' && ALLOW_EMPTY_TAG(p_state)) {
4 58 if (*s == '/' && ALLOW_EMPTY_TAG(p_state)) {
1294 0 4 if ((s + 1) == end)
1296 4 0 if (*(s + 1) == '>')
1300 479252 775 while (s < end && isHCTYPE(*s, attr_name_char)) {
450335 28917 while (s < end && isHCTYPE(*s, attr_name_char)) {
1301 1801 448534 if (*s == '/' && ALLOW_EMPTY_TAG(p_state)) {
1801 0 if (*s == '/' && ALLOW_EMPTY_TAG(p_state)) {
0 1801 if (*s == '/' && ALLOW_EMPTY_TAG(p_state)) {
1302 0 0 if ((s + 1) == end)
1304 0 0 if (*(s + 1) == '>')
1309 775 28917 if (s == end)
1313 1277 27640 PUSH_TOKEN(attr_name_beg, attr_name_end); /* attr name */
1315 10473 28917 while (isHSPACE(*s))
1317 13 28904 if (s == end)
1320 17230 11674 if (*s == '=') {
1323 42 17230 while (isHSPACE(*s))
1325 31 17199 if (s == end)
1327 6 17193 if (*s == '>') {
1329 0 6 PUSH_TOKEN(s, s);
1332 16347 846 if (*s == '"' || *s == '\'' || (*s == '`' && p_state->backquote)) {
14190 2157 if (*s == '"' || *s == '\'' || (*s == '`' && p_state->backquote)) {
7 14183 if (*s == '"' || *s == '\'' || (*s == '`' && p_state->backquote)) {
1 6 if (*s == '"' || *s == '\'' || (*s == '`' && p_state->backquote)) {
1335 38413 286 while (s < end && *s != *str_beg)
35695 2718 while (s < end && *s != *str_beg)
1337 286 2718 if (s == end)
1340 0 2718 PUSH_TOKEN(str_beg, s);
1344 90488 100 while (s < end && isHNOT_SPACE_GT(*s)) {
76401 14087 while (s < end && isHNOT_SPACE_GT(*s)) {
1345 272 76129 if (*s == '/' && ALLOW_EMPTY_TAG(p_state)) {
271 1 if (*s == '/' && ALLOW_EMPTY_TAG(p_state)) {
1 270 if (*s == '/' && ALLOW_EMPTY_TAG(p_state)) {
1346 0 2 if ((s + 1) == end)
1348 2 0 if (*(s + 1) == '>')
1353 100 14089 if (s == end)
1355 0 14089 PUSH_TOKEN(word_start, s);
1357 14129 16807 while (isHSPACE(*s))
1359 195 16612 if (s == end)
1363 0 11674 PUSH_TOKEN(0, 0); /* boolean attr value */
1367 5174 20 if (ALLOW_EMPTY_TAG(p_state) && *s == '/') {
605 4569 if (ALLOW_EMPTY_TAG(p_state) && *s == '/') {
7 618 if (ALLOW_EMPTY_TAG(p_state) && *s == '/') {
1369 0 7 if (s == end)
1374 5194 0 if (*s == '>') {
1378 7 5187 if (empty_tag) {
1381 5170 17 else if (!p_state->xml_mode) {
1387 36007 5065 for (i = 0; literal_mode_elem[i].len; i++) {
1388 601 35406 if (tag_len == literal_mode_elem[i].len) {
1393 1053 0 while (len) {
1394 191 862 if (toLOWER(*s) != *t)
496 557 if (toLOWER(*s) != *t)
1398 105 452 if (!--len) {
1412 436 4758 FREE_TOKENS;
1416 0 0 FREE_TOKENS;
1420 321 1341 FREE_TOKENS;
1431 2942 17 if (STRICT_NAMES(p_state)) {
0 2942 if (STRICT_NAMES(p_state)) {
1439 2955 4 if (isHCTYPE(*s, name_first)) {
1443 6045 50 while (s < end && isHCTYPE(*s, name_char))
3140 2905 while (s < end && isHCTYPE(*s, name_char))
1447 0 2955 if (p_state->strict_end) {
1448 0 0 while (isHSPACE(*s))
1454 2892 63 if (s < end) {
1455 2892 0 if (*s == '>') {
1466 4 0 else if (!p_state->strict_comment) {
1468 4 0 if (s < end) {
1492 10664 23 while (s < end) {
1493 69 10595 if (*s == '>') {
1497 63 6 if (p_state->xml_mode || p_state->xml_pic) {
2 61 if (p_state->xml_mode || p_state->xml_pic) {
1499 8 0 if (s - beg < 4 || s[-2] != '?')
2 6 if (s - beg < 4 || s[-2] != '?')
1534 24196 6 while (!p_state->eof) {
1541 287 24077 while (p_state->literal_mode) {
1545 2586 119 while (s < end && *s != '<') {
2418 168 while (s < end && *s != '<') {
1549 119 168 if (s == end) {
1558 147 21 if (*s == '/') {
1560 666 111 while (*l && toLOWER(*s) == *l) {
15 651 while (*l && toLOWER(*s) == *l) {
630 36 while (*l && toLOWER(*s) == *l) {
1565 111 36 if (!*l && (strNE(p_state->literal_mode, "plaintext") || p_state->closing_plaintext)) {
2 109 if (!*l && (strNE(p_state->literal_mode, "plaintext") || p_state->closing_plaintext)) {
1 1 if (!*l && (strNE(p_state->literal_mode, "plaintext") || p_state->closing_plaintext)) {
1571 0 110 while (isHSPACE(*s))
1573 101 9 if (*s == '>') {
1575 101 0 if (t != end_text)
1589 8 24078 while (p_state->ms == MS_CDATA || p_state->ms == MS_RCDATA) {
2 24076 while (p_state->ms == MS_CDATA || p_state->ms == MS_RCDATA) {
1590 115 1 while (s < end && *s != ']')
106 9 while (s < end && *s != ']')
1592 9 1 if (*s == ']') {
1595 9 0 if (*s == ']' && *(s + 1) == '>') {
8 1 if (*s == ']' && *(s + 1) == '>') {
1598 8 0 if (t != end_text)
1608 1 1 if (s == end) {
1616 2311671 4972 while (s < end && *s != '<') {
2292567 19104 while (s < end && *s != '<') {
1618 65 2292502 if (p_state->ms && *s == ']') {
8 57 if (p_state->ms && *s == ']') {
1621 8 0 if (*s == ']') {
1623 8 0 if (*s == '>') {
1639 20106 3970 if (s != t) {
1640 15298 4808 if (*s == '<') {
1646 369 4439 if (isHSPACE(*s)) {
1648 667 134 while (s >= t && isHSPACE(*s))
432 235 while (s >= t && isHSPACE(*s))
1653 148447 725 while (s >= t && !isHSPACE(*s))
144733 3714 while (s >= t && !isHSPACE(*s))
1655 7284 974 while (s >= t && isHSPACE(*s))
3819 3465 while (s >= t && isHSPACE(*s))
1659 3700 1108 if (s != t)
1665 384 18884 if (end - s < 3)
1674 6856 12028 if (isHNAME_FIRST(*s))
1676 2959 9069 else if (*s == '/')
1678 559 8510 else if (*s == '!')
1680 90 8420 else if (*s == '?')
1686 10463 8420 if (new_pos) {
1687 2155 8308 if (new_pos == t) {
1716 211 7460 if (!p_state->start_document) {
1722 197 7474 if (!chunk) {
1725 151 46 if (p_state->buf && SvOK(p_state->buf)) {
149 2 if (p_state->buf && SvOK(p_state->buf)) {
1732 153 0 while (s < end) {
1733 2 151 if (p_state->literal_mode) {
1734 0 2 if (strEQ(p_state->literal_mode, "plaintext") ||
1735 0 0 strEQ(p_state->literal_mode, "xmp") ||
1736 0 0 strEQ(p_state->literal_mode, "iframe") ||
1737 0 0 strEQ(p_state->literal_mode, "textarea"))
1742 0 0 if (strEQ(p_state->literal_mode, "script") ||
1743 0 0 strEQ(p_state->literal_mode, "style"))
1760 136 15 if (!p_state->strict_comment && !p_state->no_dash_dash_comment_end && *s == '<') {
132 4 if (!p_state->strict_comment && !p_state->no_dash_dash_comment_end && *s == '<') {
4 128 if (!p_state->strict_comment && !p_state->no_dash_dash_comment_end && *s == '<') {
1766 132 15 if (!p_state->strict_comment && *s == '<') {
4 128 if (!p_state->strict_comment && *s == '<') {
1768 3 1 if (s1 == end || isHNAME_FIRST(*s1) || *s1 == '/' || *s1 == '!' || *s1 == '?') {
1 2 if (s1 == end || isHNAME_FIRST(*s1) || *s1 == '/' || *s1 == '!' || *s1 == '?') {
1 0 if (s1 == end || isHNAME_FIRST(*s1) || *s1 == '/' || *s1 == '!' || *s1 == '?') {
1 0 if (s1 == end || isHNAME_FIRST(*s1) || *s1 == '/' || *s1 == '!' || *s1 == '?') {
0 1 if (s1 == end || isHNAME_FIRST(*s1) || *s1 == '/' || *s1 == '!' || *s1 == '?') {
1781 146 3 if (s < end) {
1789 60 137 if (p_state->pend_text && SvOK(p_state->pend_text))
60 0 if (p_state->pend_text && SvOK(p_state->pend_text))
1792 0 197 if (p_state->ignoring_element) {
1801 10 187 if (p_state->line)
1810 5 7469 if (p_state->utf8_mode)
1813 7243 231 if (p_state->buf && SvOK(p_state->buf)) {
7140 103 if (p_state->buf && SvOK(p_state->buf)) {
1821 211 123 if (p_state->offset == 0 && DOWARN) {
15 196 if (p_state->offset == 0 && DOWARN) {
1823 14 1 if (p_state->argspec_entity_decode &&
1824 1 13 !(p_state->attr_encoded && p_state->argspec_entity_decode == ARG_ATTR) &&
0 1 !(p_state->attr_encoded && p_state->argspec_entity_decode == ARG_ATTR) &&
1825 10 3 !p_state->utf8_mode && (
7 3 !p_state->utf8_mode && (
1826 7 0 (!utf8 && len >= 3 && strnEQ(beg, "\xEF\xBB\xBF", 3)) ||
5 2 (!utf8 && len >= 3 && strnEQ(beg, "\xEF\xBB\xBF", 3)) ||
3 5 (!utf8 && len >= 3 && strnEQ(beg, "\xEF\xBB\xBF", 3)) ||
1827 3 0 (utf8 && len >= 6 && strnEQ(beg, "\xC3\xAF\xC2\xBB\xC2\xBF", 6)) ||
2 1 (utf8 && len >= 6 && strnEQ(beg, "\xC3\xAF\xC2\xBB\xC2\xBF", 6)) ||
5 2 (utf8 && len >= 6 && strnEQ(beg, "\xC3\xAF\xC2\xBB\xC2\xBF", 6)) ||
1828 1 4 (!utf8 && probably_utf8_chunk(aTHX_ beg, len))
1834 3 12 if (utf8 && len >= 2 && strnEQ(beg, "\xFF\xFE", 2)) {
3 0 if (utf8 && len >= 2 && strnEQ(beg, "\xFF\xFE", 2)) {
0 3 if (utf8 && len >= 2 && strnEQ(beg, "\xFF\xFE", 2)) {
1837 12 3 if (!utf8 && len >= 4 &&
12 0 if (!utf8 && len >= 4 &&
1838 11 1 (strnEQ(beg, "\x00\x00\xFE\xFF", 4) ||
1839 1 10 strnEQ(beg, "\xFE\xFF\x00\x00", 4))
1844 10 3 else if (!utf8 && len >= 2 &&
10 0 else if (!utf8 && len >= 2 &&
1845 9 1 (strnEQ(beg, "\xFE\xFF", 2) || strnEQ(beg, "\xFF\xFE", 2))
1 8 (strnEQ(beg, "\xFE\xFF", 2) || strnEQ(beg, "\xFF\xFE", 2))
1853 4 7470 if (!len)
1859 7299 170 if (s == end || p_state->eof) {
8 7291 if (s == end || p_state->eof) {
1860 108 70 if (p_state->buf) {
1861 47 61 SvOK_off(p_state->buf);
1866 7135 156 if (p_state->buf) {
1868 7046 89 if (SvOK(p_state->buf)) {
1873 16 73 if (utf8)
1881 8 148 if (utf8)