MCPcopy Create free account
hub / github.com/Kitware/VTK / xmlPushInput

Function xmlPushInput

ThirdParty/libxml2/vtklibxml2/parser.c:2557–2575  ·  view source on GitHub ↗

* xmlPushInput: * @ctxt: an XML parser context * @input: an XML parser input fragment (entity, XML fragment ...). * * Push an input stream onto the stack. * * Returns -1 in case of error or the index in the input stack */

Source from the content-addressed store, hash-verified

2555 * Returns -1 in case of error or the index in the input stack
2556 */
2557int
2558xmlPushInput(xmlParserCtxtPtr ctxt, xmlParserInputPtr input) {
2559 int maxDepth;
2560 int ret;
2561
2562 if ((ctxt == NULL) || (input == NULL))
2563 return(-1);
2564
2565 maxDepth = (ctxt->options & XML_PARSE_HUGE) ? 40 : 20;
2566 if (ctxt->inputNr > maxDepth) {
2567 xmlFatalErrMsg(ctxt, XML_ERR_RESOURCE_LIMIT,
2568 "Maximum entity nesting depth exceeded");
2569 xmlHaltParser(ctxt);
2570 return(-1);
2571 }
2572 ret = inputPush(ctxt, input);
2573 GROW;
2574 return(ret);
2575}
2576
2577/**
2578 * xmlParseCharRef:

Callers 5

xmlSAX2ExternalSubsetFunction · 0.85
xmlParsePEReferenceFunction · 0.85
xmlIOParseDTDFunction · 0.85
xmlSAXParseDTDFunction · 0.85
xmlCtxtParseContentFunction · 0.85

Calls 2

xmlHaltParserFunction · 0.85
inputPushFunction · 0.85

Tested by

no test coverage detected