| 440 | } |
| 441 | |
| 442 | static const char *xml_parse_meta_comment(ACL_XML2 *xml, const char *data) |
| 443 | { |
| 444 | int ch; |
| 445 | |
| 446 | if (xml->curr_node->text == xml->dummy) |
| 447 | SKIP_SPACE(data); |
| 448 | |
| 449 | if (*data == 0) |
| 450 | return data; |
| 451 | |
| 452 | if (xml->curr_node->text == xml->dummy) |
| 453 | xml->curr_node->text = END(xml); |
| 454 | |
| 455 | while ((ch = *data) != 0) { |
| 456 | if (xml->curr_node->quote) { |
| 457 | if (NO_SPACE(xml)) |
| 458 | return data; |
| 459 | if (ch == xml->curr_node->quote) |
| 460 | xml->curr_node->quote = 0; |
| 461 | else |
| 462 | ADD(xml, ch); |
| 463 | } else if (IS_QUOTE(ch)) { |
| 464 | if (NO_SPACE(xml)) |
| 465 | return data; |
| 466 | if (xml->curr_node->quote == 0) |
| 467 | xml->curr_node->quote = ch; |
| 468 | else |
| 469 | ADD(xml, ch); |
| 470 | } else if (ch == '<') { |
| 471 | if (NO_SPACE(xml)) |
| 472 | return data; |
| 473 | xml->curr_node->nlt++; |
| 474 | ADD(xml, ch); |
| 475 | } else if (ch == '>') { |
| 476 | if (xml->curr_node->nlt == 0 |
| 477 | && xml->curr_node->meta[0] == '-' |
| 478 | && xml->curr_node->meta[1] == '-') |
| 479 | { |
| 480 | if (NO_SPACE(xml)) |
| 481 | return data; |
| 482 | |
| 483 | data++; |
| 484 | xml->curr_node->text_size = (ssize_t) |
| 485 | (END(xml) - xml->curr_node->text); |
| 486 | ADD(xml, '\0'); |
| 487 | xml->curr_node->status = ACL_XML2_S_MEND; |
| 488 | break; |
| 489 | } |
| 490 | |
| 491 | xml->curr_node->nlt--; |
| 492 | |
| 493 | if (NO_SPACE(xml)) |
| 494 | return data; |
| 495 | ADD(xml, ch); |
| 496 | } else if (xml->curr_node->nlt > 0) { |
| 497 | if (NO_SPACE(xml)) |
| 498 | return data; |
| 499 | ADD(xml, ch); |
nothing calls this directly
no test coverage detected
searching dependent graphs…