MCPcopy Create free account
hub / github.com/Kitware/CMake / cdataSectionProcessor

Function cdataSectionProcessor

Utilities/cmexpat/lib/xmlparse.c:4568–4586  ·  view source on GitHub ↗

The idea here is to avoid using stack for each CDATA section when the whole file is parsed with one call. */

Source from the content-addressed store, hash-verified

4566 the whole file is parsed with one call.
4567*/
4568static enum XML_Error PTRCALL
4569cdataSectionProcessor(XML_Parser parser, const char *start, const char *end,
4570 const char **endPtr) {
4571 enum XML_Error result = doCdataSection(
4572 parser, parser->m_encoding, &start, end, endPtr,
4573 (XML_Bool)! parser->m_parsingStatus.finalBuffer, XML_ACCOUNT_DIRECT);
4574 if (result != XML_ERROR_NONE)
4575 return result;
4576 if (start) {
4577 if (parser->m_parentParser) { /* we are parsing an external entity */
4578 parser->m_processor = externalEntityContentProcessor;
4579 return externalEntityContentProcessor(parser, start, end, endPtr);
4580 } else {
4581 parser->m_processor = contentProcessor;
4582 return contentProcessor(parser, start, end, endPtr);
4583 }
4584 }
4585 return result;
4586}
4587
4588/* startPtr gets set to non-null if the section is closed, and to null if
4589 the section is not yet closed.

Callers

nothing calls this directly

Calls 3

doCdataSectionFunction · 0.85
contentProcessorFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…