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

Function XML_SetEncoding

Utilities/cmexpat/lib/xmlparse.c:1709–1733  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1707}
1708
1709enum XML_Status XMLCALL
1710XML_SetEncoding(XML_Parser parser, const XML_Char *encodingName) {
1711 if (parser == NULL)
1712 return XML_STATUS_ERROR;
1713 /* Block after XML_Parse()/XML_ParseBuffer() has been called.
1714 XXX There's no way for the caller to determine which of the
1715 XXX possible error cases caused the XML_STATUS_ERROR return.
1716 */
1717 if (parserBusy(parser))
1718 return XML_STATUS_ERROR;
1719
1720 /* Get rid of any previous encoding name */
1721 FREE(parser, (void *)parser->m_protocolEncodingName);
1722
1723 if (encodingName == NULL)
1724 /* No new encoding name */
1725 parser->m_protocolEncodingName = NULL;
1726 else {
1727 /* Copy the new encoding name into allocated memory */
1728 parser->m_protocolEncodingName = copyString(encodingName, parser);
1729 if (! parser->m_protocolEncodingName)
1730 return XML_STATUS_ERROR;
1731 }
1732 return XML_STATUS_OK;
1733}
1734
1735XML_Parser XMLCALL
1736XML_ExternalEntityParserCreate(XML_Parser oldParser, const XML_Char *context,

Callers 2

InitializeParserMethod · 0.85
InitializeParserMethod · 0.85

Calls 2

parserBusyFunction · 0.85
copyStringFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…