MCPcopy Create free account
hub / github.com/cuberite/cuberite / XML_ParserReset

Function XML_ParserReset

lib/expat/xmlparse.c:886–920  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

884}
885
886XML_Bool XMLCALL
887XML_ParserReset(XML_Parser parser, const XML_Char *encodingName)
888{
889 TAG *tStk;
890 OPEN_INTERNAL_ENTITY *openEntityList;
891 if (parentParser)
892 return XML_FALSE;
893 /* move tagStack to freeTagList */
894 tStk = tagStack;
895 while (tStk) {
896 TAG *tag = tStk;
897 tStk = tStk->parent;
898 tag->parent = freeTagList;
899 moveToFreeBindingList(parser, tag->bindings);
900 tag->bindings = NULL;
901 freeTagList = tag;
902 }
903 /* move openInternalEntities to freeInternalEntities */
904 openEntityList = openInternalEntities;
905 while (openEntityList) {
906 OPEN_INTERNAL_ENTITY *openEntity = openEntityList;
907 openEntityList = openEntity->next;
908 openEntity->next = freeInternalEntities;
909 freeInternalEntities = openEntity;
910 }
911 moveToFreeBindingList(parser, inheritedBindings);
912 FREE(unknownEncodingMem);
913 if (unknownEncodingRelease)
914 unknownEncodingRelease(unknownEncodingData);
915 poolClear(&tempPool);
916 poolClear(&temp2Pool);
917 parserInit(parser, encodingName);
918 dtdReset(_dtd, &parser->m_mem);
919 return setContext(parser, implicitContext);
920}
921
922enum XML_Status XMLCALL
923XML_SetEncoding(XML_Parser parser, const XML_Char *encodingName)

Callers

nothing calls this directly

Calls 5

moveToFreeBindingListFunction · 0.85
poolClearFunction · 0.85
parserInitFunction · 0.85
dtdResetFunction · 0.85
setContextFunction · 0.85

Tested by

no test coverage detected