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

Function xmlPopPE

ThirdParty/libxml2/vtklibxml2/parser.c:2412–2454  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2410}
2411
2412static void
2413xmlPopPE(xmlParserCtxtPtr ctxt) {
2414 unsigned long consumed;
2415 xmlEntityPtr ent;
2416
2417 ent = ctxt->input->entity;
2418
2419 ent->flags &= ~XML_ENT_EXPANDING;
2420
2421 if ((ent->flags & XML_ENT_CHECKED) == 0) {
2422 int result;
2423
2424 /*
2425 * Read the rest of the stream in case of errors. We want
2426 * to account for the whole entity size.
2427 */
2428 do {
2429 ctxt->input->cur = ctxt->input->end;
2430 xmlParserShrink(ctxt);
2431 result = xmlParserGrow(ctxt);
2432 } while (result > 0);
2433
2434 consumed = ctxt->input->consumed;
2435 xmlSaturatedAddSizeT(&consumed,
2436 ctxt->input->end - ctxt->input->base);
2437
2438 xmlSaturatedAdd(&ent->expandedSize, consumed);
2439
2440 /*
2441 * Add to sizeentities when parsing an external entity
2442 * for the first time.
2443 */
2444 if (ent->etype == XML_EXTERNAL_PARAMETER_ENTITY) {
2445 xmlSaturatedAdd(&ctxt->sizeentities, consumed);
2446 }
2447
2448 ent->flags |= XML_ENT_CHECKED;
2449 }
2450
2451 xmlPopInput(ctxt);
2452
2453 xmlParserEntityCheck(ctxt, ent->expandedSize);
2454}
2455
2456/**
2457 * xmlSkipBlankCharsPE:

Callers 3

xmlSkipBlankCharsPEFunction · 0.85
xmlParseExternalSubsetFunction · 0.85
xmlParseInternalSubsetFunction · 0.85

Calls 5

xmlParserShrinkFunction · 0.85
xmlParserGrowFunction · 0.85
xmlSaturatedAddSizeTFunction · 0.85
xmlPopInputFunction · 0.85
xmlParserEntityCheckFunction · 0.85

Tested by

no test coverage detected