MCPcopy Create free account
hub / github.com/Geant4/geant4 / cdataSectionProcessor

Function cdataSectionProcessor

source/externals/expat/src/xmlparse.c:3990–4008  ·  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

3988 the whole file is parsed with one call.
3989*/
3990static enum XML_Error PTRCALL
3991cdataSectionProcessor(XML_Parser parser, const char *start, const char *end,
3992 const char **endPtr) {
3993 enum XML_Error result = doCdataSection(
3994 parser, parser->m_encoding, &start, end, endPtr,
3995 (XML_Bool)! parser->m_parsingStatus.finalBuffer, XML_ACCOUNT_DIRECT);
3996 if (result != XML_ERROR_NONE)
3997 return result;
3998 if (start) {
3999 if (parser->m_parentParser) { /* we are parsing an external entity */
4000 parser->m_processor = externalEntityContentProcessor;
4001 return externalEntityContentProcessor(parser, start, end, endPtr);
4002 } else {
4003 parser->m_processor = contentProcessor;
4004 return contentProcessor(parser, start, end, endPtr);
4005 }
4006 }
4007 return result;
4008}
4009
4010/* startPtr gets set to non-null if the section is closed, and to null if
4011 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