mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-07-07 09:27:10 +02:00
Update POCO to 1.11.0
This commit is contained in:
47
vendor/POCO/XML/src/AbstractContainerNode.cpp
vendored
47
vendor/POCO/XML/src/AbstractContainerNode.cpp
vendored
@ -30,14 +30,14 @@ namespace XML {
|
||||
const XMLString AbstractContainerNode::WILDCARD(toXMLString("*"));
|
||||
|
||||
|
||||
AbstractContainerNode::AbstractContainerNode(Document* pOwnerDocument):
|
||||
AbstractContainerNode::AbstractContainerNode(Document* pOwnerDocument):
|
||||
AbstractNode(pOwnerDocument),
|
||||
_pFirstChild(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
AbstractContainerNode::AbstractContainerNode(Document* pOwnerDocument, const AbstractContainerNode& node):
|
||||
AbstractContainerNode::AbstractContainerNode(Document* pOwnerDocument, const AbstractContainerNode& node):
|
||||
AbstractNode(pOwnerDocument, node),
|
||||
_pFirstChild(0)
|
||||
{
|
||||
@ -199,7 +199,7 @@ Node* AbstractContainerNode::replaceChild(Node* newChild, Node* oldChild)
|
||||
AbstractNode* pCur = _pFirstChild;
|
||||
while (pCur && pCur->_pNext != oldChild) pCur = pCur->_pNext;
|
||||
if (pCur)
|
||||
{
|
||||
{
|
||||
poco_assert_dbg (pCur->_pNext == oldChild);
|
||||
|
||||
if (doEvents)
|
||||
@ -311,8 +311,9 @@ bool AbstractContainerNode::hasAttributes() const
|
||||
|
||||
Node* AbstractContainerNode::getNodeByPath(const XMLString& path) const
|
||||
{
|
||||
bool indexBound;
|
||||
XMLString::const_iterator it = path.begin();
|
||||
if (it != path.end() && *it == '/')
|
||||
if (it != path.end() && *it == '/')
|
||||
{
|
||||
++it;
|
||||
if (it != path.end() && *it == '/')
|
||||
@ -327,20 +328,21 @@ Node* AbstractContainerNode::getNodeByPath(const XMLString& path) const
|
||||
for (unsigned long i = 0; i < length; i++)
|
||||
{
|
||||
XMLString::const_iterator beg = it;
|
||||
const Node* pNode = findNode(beg, path.end(), pList->item(i), 0);
|
||||
const Node* pNode = findNode(beg, path.end(), pList->item(i), 0, indexBound);
|
||||
if (pNode) return const_cast<Node*>(pNode);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return const_cast<Node*>(findNode(it, path.end(), this, 0));
|
||||
return const_cast<Node*>(findNode(it, path.end(), this, 0, indexBound));
|
||||
}
|
||||
|
||||
|
||||
Node* AbstractContainerNode::getNodeByPathNS(const XMLString& path, const NSMap& nsMap) const
|
||||
{
|
||||
bool indexBound;
|
||||
XMLString::const_iterator it = path.begin();
|
||||
if (it != path.end() && *it == '/')
|
||||
if (it != path.end() && *it == '/')
|
||||
{
|
||||
++it;
|
||||
if (it != path.end() && *it == '/')
|
||||
@ -368,19 +370,20 @@ Node* AbstractContainerNode::getNodeByPathNS(const XMLString& path, const NSMap&
|
||||
for (unsigned long i = 0; i < length; i++)
|
||||
{
|
||||
XMLString::const_iterator beg = it;
|
||||
const Node* pNode = findNode(beg, path.end(), pList->item(i), &nsMap);
|
||||
const Node* pNode = findNode(beg, path.end(), pList->item(i), &nsMap, indexBound);
|
||||
if (pNode) return const_cast<Node*>(pNode);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return const_cast<Node*>(findNode(it, path.end(), this, &nsMap));
|
||||
return const_cast<Node*>(findNode(it, path.end(), this, &nsMap, indexBound));
|
||||
}
|
||||
|
||||
|
||||
const Node* AbstractContainerNode::findNode(XMLString::const_iterator& it, const XMLString::const_iterator& end, const Node* pNode, const NSMap* pNSMap)
|
||||
const Node* AbstractContainerNode::findNode(XMLString::const_iterator& it, const XMLString::const_iterator& end, const Node* pNode, const NSMap* pNSMap, bool& indexBound)
|
||||
{
|
||||
indexBound = false;
|
||||
if (pNode && it != end)
|
||||
{
|
||||
if (*it == '[')
|
||||
@ -406,7 +409,8 @@ const Node* AbstractContainerNode::findNode(XMLString::const_iterator& it, const
|
||||
while (it != end && *it != ']') value += *it++;
|
||||
}
|
||||
if (it != end) ++it;
|
||||
return findNode(it, end, findElement(attr, value, pNode, pNSMap), pNSMap);
|
||||
bool ib;
|
||||
return findNode(it, end, findElement(attr, value, pNode, pNSMap), pNSMap, ib);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -416,17 +420,19 @@ const Node* AbstractContainerNode::findNode(XMLString::const_iterator& it, const
|
||||
}
|
||||
else
|
||||
{
|
||||
XMLString index;
|
||||
while (it != end && *it != ']') index += *it++;
|
||||
XMLString xmlIndex;
|
||||
while (it != end && *it != ']') xmlIndex += *it++;
|
||||
if (it != end) ++it;
|
||||
#ifdef XML_UNICODE_WCHAR_T
|
||||
std::string idx;
|
||||
Poco::UnicodeConverter::convert(index, idx);
|
||||
int i = Poco::NumberParser::parse(idx);
|
||||
#else
|
||||
std::string index;
|
||||
Poco::UnicodeConverter::convert(xmlIndex, index);
|
||||
int i = Poco::NumberParser::parse(index);
|
||||
#else
|
||||
int i = Poco::NumberParser::parse(xmlIndex);
|
||||
#endif
|
||||
return findNode(it, end, findElement(i, pNode, pNSMap), pNSMap);
|
||||
indexBound = true;
|
||||
bool ib;
|
||||
return findNode(it, end, findElement(i, pNode, pNSMap), pNSMap, ib);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -440,8 +446,9 @@ const Node* AbstractContainerNode::findNode(XMLString::const_iterator& it, const
|
||||
const Node* pElem = findElement(key, pNode->firstChild(), pNSMap);
|
||||
while (!pFound && pElem)
|
||||
{
|
||||
pFound = findNode(it, end, pElem, pNSMap);
|
||||
if (!pFound) pElem = findElement(key, pElem->nextSibling(), pNSMap);
|
||||
bool ib;
|
||||
pFound = findNode(it, end, pElem, pNSMap, ib);
|
||||
if (!pFound) pElem = ib ? nullptr : findElement(key, pElem->nextSibling(), pNSMap);
|
||||
it = itStart;
|
||||
}
|
||||
return pFound;
|
||||
|
107
vendor/POCO/XML/src/ParserEngine.cpp
vendored
107
vendor/POCO/XML/src/ParserEngine.cpp
vendored
@ -47,16 +47,16 @@ public:
|
||||
_systemId(systemId)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
~ContextLocator()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
XMLString getPublicId() const
|
||||
{
|
||||
return _publicId;
|
||||
}
|
||||
|
||||
|
||||
XMLString getSystemId() const
|
||||
{
|
||||
return _systemId;
|
||||
@ -66,12 +66,12 @@ public:
|
||||
{
|
||||
return XML_GetCurrentLineNumber(_parser);
|
||||
}
|
||||
|
||||
|
||||
int getColumnNumber() const
|
||||
{
|
||||
return XML_GetCurrentColumnNumber(_parser);
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
XML_Parser _parser;
|
||||
XMLString _publicId;
|
||||
@ -97,7 +97,9 @@ ParserEngine::ParserEngine():
|
||||
_pDeclHandler(0),
|
||||
_pContentHandler(0),
|
||||
_pLexicalHandler(0),
|
||||
_pErrorHandler(0)
|
||||
_pErrorHandler(0),
|
||||
_maximumAmplificationFactor(0.0),
|
||||
_activationThresholdBytes(0)
|
||||
{
|
||||
}
|
||||
|
||||
@ -117,7 +119,9 @@ ParserEngine::ParserEngine(const XMLString& encoding):
|
||||
_pDeclHandler(0),
|
||||
_pContentHandler(0),
|
||||
_pLexicalHandler(0),
|
||||
_pErrorHandler(0)
|
||||
_pErrorHandler(0),
|
||||
_maximumAmplificationFactor(0.0),
|
||||
_activationThresholdBytes(0)
|
||||
{
|
||||
}
|
||||
|
||||
@ -145,14 +149,14 @@ void ParserEngine::addEncoding(const XMLString& name, TextEncoding* pEncoding)
|
||||
if (_encodings.find(name) == _encodings.end())
|
||||
_encodings[name] = pEncoding;
|
||||
else
|
||||
throw XMLException("Encoding already defined");
|
||||
throw XMLException("Encoding already defined");
|
||||
}
|
||||
|
||||
|
||||
void ParserEngine::setNamespaceStrategy(NamespaceStrategy* pStrategy)
|
||||
{
|
||||
poco_check_ptr (pStrategy);
|
||||
|
||||
|
||||
delete _pNamespaceStrategy;
|
||||
_pNamespaceStrategy = pStrategy;
|
||||
}
|
||||
@ -218,6 +222,18 @@ void ParserEngine::setEnablePartialReads(bool flag)
|
||||
}
|
||||
|
||||
|
||||
void ParserEngine::setBillionLaughsAttackProtectionMaximumAmplification(float maximumAmplificationFactor)
|
||||
{
|
||||
_maximumAmplificationFactor = maximumAmplificationFactor;
|
||||
}
|
||||
|
||||
|
||||
void ParserEngine::setBillionLaughsAttackProtectionActivationThreshold(Poco::UInt64 activationThresholdBytes)
|
||||
{
|
||||
_activationThresholdBytes = activationThresholdBytes;
|
||||
}
|
||||
|
||||
|
||||
void ParserEngine::parse(InputSource* pInputSource)
|
||||
{
|
||||
init();
|
||||
@ -267,7 +283,7 @@ void ParserEngine::parseByteInputStream(XMLByteInputStream& istr)
|
||||
handleError(XML_GetErrorCode(_parser));
|
||||
if (istr.good())
|
||||
n = readBytes(istr, _pBuffer, PARSE_BUFFER_SIZE);
|
||||
else
|
||||
else
|
||||
n = 0;
|
||||
}
|
||||
if (!XML_Parse(_parser, _pBuffer, 0, 1))
|
||||
@ -284,7 +300,7 @@ void ParserEngine::parseCharInputStream(XMLCharInputStream& istr)
|
||||
handleError(XML_GetErrorCode(_parser));
|
||||
if (istr.good())
|
||||
n = readChars(istr, reinterpret_cast<XMLChar*>(_pBuffer), PARSE_BUFFER_SIZE/sizeof(XMLChar));
|
||||
else
|
||||
else
|
||||
n = 0;
|
||||
}
|
||||
if (!XML_Parse(_parser, _pBuffer, 0, 1))
|
||||
@ -316,7 +332,7 @@ void ParserEngine::parseExternalByteInputStream(XML_Parser extParser, XMLByteInp
|
||||
handleError(XML_GetErrorCode(extParser));
|
||||
if (istr.good())
|
||||
n = readBytes(istr, pBuffer, PARSE_BUFFER_SIZE);
|
||||
else
|
||||
else
|
||||
n = 0;
|
||||
}
|
||||
if (!XML_Parse(extParser, pBuffer, 0, 1))
|
||||
@ -343,7 +359,7 @@ void ParserEngine::parseExternalCharInputStream(XML_Parser extParser, XMLCharInp
|
||||
handleError(XML_GetErrorCode(extParser));
|
||||
if (istr.good())
|
||||
n = readChars(istr, pBuffer, static_cast<int>(PARSE_BUFFER_SIZE/sizeof(XMLChar)));
|
||||
else
|
||||
else
|
||||
n = 0;
|
||||
}
|
||||
if (!XML_Parse(extParser, reinterpret_cast<char*>(pBuffer), 0, 1))
|
||||
@ -487,6 +503,17 @@ void ParserEngine::init()
|
||||
XML_SetSkippedEntityHandler(_parser, handleSkippedEntity);
|
||||
XML_SetParamEntityParsing(_parser, _externalParameterEntities ? XML_PARAM_ENTITY_PARSING_ALWAYS : XML_PARAM_ENTITY_PARSING_NEVER);
|
||||
XML_SetUnknownEncodingHandler(_parser, handleUnknownEncoding, this);
|
||||
|
||||
#if XML_MAJOR_VERSION > 2 || (XML_MAJOR_VERSION == 2 && XML_MINOR_VERSION >= 4)
|
||||
if (_maximumAmplificationFactor > 1.0)
|
||||
{
|
||||
XML_SetBillionLaughsAttackProtectionMaximumAmplification(_parser, _maximumAmplificationFactor);
|
||||
}
|
||||
if (_activationThresholdBytes > 0)
|
||||
{
|
||||
XML_SetBillionLaughsAttackProtectionActivationThreshold(_parser, _activationThresholdBytes);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@ -541,7 +568,7 @@ void ParserEngine::handleError(int errorNo)
|
||||
case XML_ERROR_NOT_STANDALONE:
|
||||
throw SAXParseException("Document is not standalone", locator());
|
||||
case XML_ERROR_UNEXPECTED_STATE:
|
||||
throw SAXParseException("Unexpected parser state - please send a bug report", locator());
|
||||
throw SAXParseException("Unexpected parser state - please send a bug report", locator());
|
||||
case XML_ERROR_ENTITY_DECLARED_IN_PE:
|
||||
throw SAXParseException("Entity declared in parameter entity", locator());
|
||||
case XML_ERROR_FEATURE_REQUIRES_XML_DTD:
|
||||
@ -570,6 +597,26 @@ void ParserEngine::handleError(int errorNo)
|
||||
throw SAXParseException("Parsing finished", locator());
|
||||
case XML_ERROR_SUSPEND_PE:
|
||||
throw SAXParseException("Cannot suspend in external parameter entity", locator());
|
||||
#if XML_MAJOR_VERSION >= 2
|
||||
case XML_ERROR_RESERVED_PREFIX_XML:
|
||||
throw SAXParseException("Reserved prefix 'xml' must not be undeclared or bound to another namespace name", locator());
|
||||
case XML_ERROR_RESERVED_PREFIX_XMLNS:
|
||||
throw SAXParseException("Reserved prefix 'xmlns' must not be declared or undeclared", locator());
|
||||
case XML_ERROR_RESERVED_NAMESPACE_URI:
|
||||
throw SAXParseException("Prefix must not be bound to one of the reserved namespace names", locator());
|
||||
#if XML_MAJOR_VERSION > 2 || XML_MINOR_VERSION >= 1
|
||||
case XML_ERROR_INVALID_ARGUMENT:
|
||||
throw SAXParseException("Invalid argument", locator());
|
||||
#endif
|
||||
#if XML_MAJOR_VERSION > 2 || XML_MINOR_VERSION >= 3
|
||||
case XML_ERROR_NO_BUFFER:
|
||||
throw SAXParseException("Internal error: a successful prior call to function XML_GetBuffer is required", locator());
|
||||
#endif
|
||||
#if XML_MAJOR_VERSION > 2 || XML_MINOR_VERSION >= 4
|
||||
case XML_ERROR_AMPLIFICATION_LIMIT_BREACH:
|
||||
throw SAXParseException("Limit on input amplification factor (from DTD and entities) breached", locator());
|
||||
#endif
|
||||
#endif // XML_MAJOR_VERSION
|
||||
}
|
||||
throw XMLException("Unknown Expat error code");
|
||||
}
|
||||
@ -583,7 +630,7 @@ void ParserEngine::handleError(int errorNo)
|
||||
if (_pErrorHandler) _pErrorHandler->fatalError(SAXParseException("Fatal error", locator(), exc));
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ParserEngine::pushContext(XML_Parser parser, InputSource* pInputSource)
|
||||
@ -614,12 +661,12 @@ void ParserEngine::resetContext()
|
||||
void ParserEngine::handleStartElement(void* userData, const XML_Char* name, const XML_Char** atts)
|
||||
{
|
||||
ParserEngine* pThis = reinterpret_cast<ParserEngine*>(userData);
|
||||
|
||||
|
||||
if (pThis->_pContentHandler)
|
||||
{
|
||||
try
|
||||
{
|
||||
pThis->_pNamespaceStrategy->startElement(name, atts, XML_GetSpecifiedAttributeCount(pThis->_parser)/2, pThis->_pContentHandler);
|
||||
pThis->_pNamespaceStrategy->startElement(name, atts, XML_GetSpecifiedAttributeCount(pThis->_parser)/2, pThis->_pContentHandler);
|
||||
}
|
||||
catch (XMLException& exc)
|
||||
{
|
||||
@ -632,12 +679,12 @@ void ParserEngine::handleStartElement(void* userData, const XML_Char* name, cons
|
||||
void ParserEngine::handleEndElement(void* userData, const XML_Char* name)
|
||||
{
|
||||
ParserEngine* pThis = reinterpret_cast<ParserEngine*>(userData);
|
||||
|
||||
|
||||
if (pThis->_pContentHandler)
|
||||
{
|
||||
try
|
||||
{
|
||||
pThis->_pNamespaceStrategy->endElement(name, pThis->_pContentHandler);
|
||||
pThis->_pNamespaceStrategy->endElement(name, pThis->_pContentHandler);
|
||||
}
|
||||
catch (XMLException& exc)
|
||||
{
|
||||
@ -650,7 +697,7 @@ void ParserEngine::handleEndElement(void* userData, const XML_Char* name)
|
||||
void ParserEngine::handleCharacterData(void* userData, const XML_Char* s, int len)
|
||||
{
|
||||
ParserEngine* pThis = reinterpret_cast<ParserEngine*>(userData);
|
||||
|
||||
|
||||
if (pThis->_pContentHandler)
|
||||
pThis->_pContentHandler->characters(s, 0, len);
|
||||
}
|
||||
@ -659,7 +706,7 @@ void ParserEngine::handleCharacterData(void* userData, const XML_Char* s, int le
|
||||
void ParserEngine::handleProcessingInstruction(void* userData, const XML_Char* target, const XML_Char* data)
|
||||
{
|
||||
ParserEngine* pThis = reinterpret_cast<ParserEngine*>(userData);
|
||||
|
||||
|
||||
if (pThis->_pContentHandler)
|
||||
pThis->_pContentHandler->processingInstruction(target, data);
|
||||
}
|
||||
@ -673,10 +720,10 @@ void ParserEngine::handleDefault(void* userData, const XML_Char* s, int len)
|
||||
void ParserEngine::handleUnparsedEntityDecl(void* userData, const XML_Char* entityName, const XML_Char* base, const XML_Char* systemId, const XML_Char* publicId, const XML_Char* notationName)
|
||||
{
|
||||
ParserEngine* pThis = reinterpret_cast<ParserEngine*>(userData);
|
||||
|
||||
|
||||
XMLString pubId;
|
||||
if (publicId) pubId.assign(publicId);
|
||||
if (pThis->_pDTDHandler)
|
||||
if (pThis->_pDTDHandler)
|
||||
pThis->_pDTDHandler->unparsedEntityDecl(entityName, publicId ? &pubId : 0, systemId, notationName);
|
||||
}
|
||||
|
||||
@ -684,12 +731,12 @@ void ParserEngine::handleUnparsedEntityDecl(void* userData, const XML_Char* enti
|
||||
void ParserEngine::handleNotationDecl(void* userData, const XML_Char* notationName, const XML_Char* base, const XML_Char* systemId, const XML_Char* publicId)
|
||||
{
|
||||
ParserEngine* pThis = reinterpret_cast<ParserEngine*>(userData);
|
||||
|
||||
|
||||
XMLString pubId;
|
||||
if (publicId) pubId.assign(publicId);
|
||||
XMLString sysId;
|
||||
if (systemId) sysId.assign(systemId);
|
||||
if (pThis->_pDTDHandler)
|
||||
if (pThis->_pDTDHandler)
|
||||
pThis->_pDTDHandler->notationDecl(notationName, publicId ? &pubId : 0, systemId ? &sysId : 0);
|
||||
}
|
||||
|
||||
@ -708,7 +755,7 @@ int ParserEngine::handleExternalEntityRef(XML_Parser parser, const XML_Char* con
|
||||
XMLString sysId(systemId);
|
||||
XMLString pubId;
|
||||
if (publicId) pubId.assign(publicId);
|
||||
|
||||
|
||||
URI uri(fromXMLString(pThis->_context.back()->getSystemId()));
|
||||
uri.resolve(fromXMLString(sysId));
|
||||
|
||||
@ -749,7 +796,7 @@ int ParserEngine::handleExternalEntityRef(XML_Parser parser, const XML_Char* con
|
||||
int ParserEngine::handleUnknownEncoding(void* encodingHandlerData, const XML_Char* name, XML_Encoding* info)
|
||||
{
|
||||
ParserEngine* pThis = reinterpret_cast<ParserEngine*>(encodingHandlerData);
|
||||
|
||||
|
||||
XMLString encoding(name);
|
||||
TextEncoding* knownEncoding = 0;
|
||||
|
||||
@ -764,7 +811,7 @@ int ParserEngine::handleUnknownEncoding(void* encodingHandlerData, const XML_Cha
|
||||
const TextEncoding::CharacterMap& map = knownEncoding->characterMap();
|
||||
for (int i = 0; i < 256; ++i)
|
||||
info->map[i] = map[i];
|
||||
|
||||
|
||||
info->data = knownEncoding;
|
||||
info->convert = &ParserEngine::convert;
|
||||
info->release = 0;
|
||||
@ -846,7 +893,7 @@ void ParserEngine::handleEndDoctypeDecl(void* userData)
|
||||
}
|
||||
|
||||
|
||||
void ParserEngine::handleEntityDecl(void *userData, const XML_Char *entityName, int isParamEntity, const XML_Char *value, int valueLength,
|
||||
void ParserEngine::handleEntityDecl(void *userData, const XML_Char *entityName, int isParamEntity, const XML_Char *value, int valueLength,
|
||||
const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId, const XML_Char *notationName)
|
||||
{
|
||||
if (value)
|
||||
@ -880,7 +927,7 @@ void ParserEngine::handleInternalParsedEntityDecl(void* userData, const XML_Char
|
||||
void ParserEngine::handleSkippedEntity(void* userData, const XML_Char* entityName, int isParameterEntity)
|
||||
{
|
||||
ParserEngine* pThis = reinterpret_cast<ParserEngine*>(userData);
|
||||
|
||||
|
||||
if (pThis->_pContentHandler)
|
||||
pThis->_pContentHandler->skippedEntity(entityName);
|
||||
}
|
||||
|
9
vendor/POCO/XML/src/SAXParser.cpp
vendored
9
vendor/POCO/XML/src/SAXParser.cpp
vendored
@ -17,6 +17,7 @@
|
||||
#include "Poco/SAX/EntityResolverImpl.h"
|
||||
#include "Poco/SAX/InputSource.h"
|
||||
#include "Poco/XML/NamespaceStrategy.h"
|
||||
#include "Poco/NumberParser.h"
|
||||
#include <sstream>
|
||||
|
||||
|
||||
@ -25,6 +26,8 @@ namespace XML {
|
||||
|
||||
|
||||
const XMLString SAXParser::FEATURE_PARTIAL_READS = toXMLString("http://www.appinf.com/features/enable-partial-reads");
|
||||
const XMLString SAXParser::PROPERTY_BLA_MAXIMUM_AMPLIFICATION = toXMLString("http://www.appinf.com/properties/bla-maximum-amplification");
|
||||
const XMLString SAXParser::PROPERTY_BLA_ACTIVATION_THRESHOLD = toXMLString("http://www.appinf.com/properties/bla-activation-threshold");
|
||||
|
||||
|
||||
SAXParser::SAXParser():
|
||||
@ -52,7 +55,7 @@ void SAXParser::setEncoding(const XMLString& encoding)
|
||||
_engine.setEncoding(encoding);
|
||||
}
|
||||
|
||||
|
||||
|
||||
const XMLString& SAXParser::getEncoding() const
|
||||
{
|
||||
return _engine.getEncoding();
|
||||
@ -153,6 +156,10 @@ void SAXParser::setProperty(const XMLString& propertyId, const XMLString& value)
|
||||
{
|
||||
if (propertyId == XMLReader::PROPERTY_DECLARATION_HANDLER || propertyId == XMLReader::PROPERTY_LEXICAL_HANDLER)
|
||||
throw SAXNotSupportedException(std::string("property does not take a string value: ") + fromXMLString(propertyId));
|
||||
else if (propertyId == PROPERTY_BLA_MAXIMUM_AMPLIFICATION)
|
||||
_engine.setBillionLaughsAttackProtectionMaximumAmplification(static_cast<float>(Poco::NumberParser::parseFloat(value)));
|
||||
else if (propertyId == PROPERTY_BLA_ACTIVATION_THRESHOLD)
|
||||
_engine.setBillionLaughsAttackProtectionActivationThreshold(Poco::NumberParser::parseUnsigned64(value));
|
||||
else
|
||||
throw SAXNotRecognizedException(fromXMLString(propertyId));
|
||||
}
|
||||
|
7
vendor/POCO/XML/src/ascii.h
vendored
7
vendor/POCO/XML/src/ascii.h
vendored
@ -6,8 +6,11 @@
|
||||
\___/_/\_\ .__/ \__,_|\__|
|
||||
|_| XML parser
|
||||
|
||||
Copyright (c) 1997-2000 Thai Open Source Software Center Ltd
|
||||
Copyright (c) 2000-2017 Expat development team
|
||||
Copyright (c) 1999-2000 Thai Open Source Software Center Ltd
|
||||
Copyright (c) 2000 Clark Cooper <coopercc@users.sourceforge.net>
|
||||
Copyright (c) 2002 Fred L. Drake, Jr. <fdrake@users.sourceforge.net>
|
||||
Copyright (c) 2007 Karl Waclawek <karl@waclawek.net>
|
||||
Copyright (c) 2017 Sebastian Pipping <sebastian@pipping.org>
|
||||
Licensed under the MIT license:
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
|
66
vendor/POCO/XML/src/asciitab.h
vendored
66
vendor/POCO/XML/src/asciitab.h
vendored
@ -7,7 +7,9 @@
|
||||
|_| XML parser
|
||||
|
||||
Copyright (c) 1997-2000 Thai Open Source Software Center Ltd
|
||||
Copyright (c) 2000-2017 Expat development team
|
||||
Copyright (c) 2000 Clark Cooper <coopercc@users.sourceforge.net>
|
||||
Copyright (c) 2002 Fred L. Drake, Jr. <fdrake@users.sourceforge.net>
|
||||
Copyright (c) 2017 Sebastian Pipping <sebastian@pipping.org>
|
||||
Licensed under the MIT license:
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
@ -31,34 +33,34 @@
|
||||
*/
|
||||
|
||||
/* 0x00 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
|
||||
/* 0x04 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
|
||||
/* 0x08 */ BT_NONXML, BT_S, BT_LF, BT_NONXML,
|
||||
/* 0x0C */ BT_NONXML, BT_CR, BT_NONXML, BT_NONXML,
|
||||
/* 0x10 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
|
||||
/* 0x14 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
|
||||
/* 0x18 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
|
||||
/* 0x1C */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
|
||||
/* 0x20 */ BT_S, BT_EXCL, BT_QUOT, BT_NUM,
|
||||
/* 0x24 */ BT_OTHER, BT_PERCNT, BT_AMP, BT_APOS,
|
||||
/* 0x28 */ BT_LPAR, BT_RPAR, BT_AST, BT_PLUS,
|
||||
/* 0x2C */ BT_COMMA, BT_MINUS, BT_NAME, BT_SOL,
|
||||
/* 0x30 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT,
|
||||
/* 0x34 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT,
|
||||
/* 0x38 */ BT_DIGIT, BT_DIGIT, BT_COLON, BT_SEMI,
|
||||
/* 0x3C */ BT_LT, BT_EQUALS, BT_GT, BT_QUEST,
|
||||
/* 0x40 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX,
|
||||
/* 0x44 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT,
|
||||
/* 0x48 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0x4C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0x50 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0x54 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0x58 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_LSQB,
|
||||
/* 0x5C */ BT_OTHER, BT_RSQB, BT_OTHER, BT_NMSTRT,
|
||||
/* 0x60 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX,
|
||||
/* 0x64 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT,
|
||||
/* 0x68 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0x6C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0x70 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0x74 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0x78 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER,
|
||||
/* 0x7C */ BT_VERBAR, BT_OTHER, BT_OTHER, BT_OTHER,
|
||||
/* 0x04 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
|
||||
/* 0x08 */ BT_NONXML, BT_S, BT_LF, BT_NONXML,
|
||||
/* 0x0C */ BT_NONXML, BT_CR, BT_NONXML, BT_NONXML,
|
||||
/* 0x10 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
|
||||
/* 0x14 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
|
||||
/* 0x18 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
|
||||
/* 0x1C */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
|
||||
/* 0x20 */ BT_S, BT_EXCL, BT_QUOT, BT_NUM,
|
||||
/* 0x24 */ BT_OTHER, BT_PERCNT, BT_AMP, BT_APOS,
|
||||
/* 0x28 */ BT_LPAR, BT_RPAR, BT_AST, BT_PLUS,
|
||||
/* 0x2C */ BT_COMMA, BT_MINUS, BT_NAME, BT_SOL,
|
||||
/* 0x30 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT,
|
||||
/* 0x34 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT,
|
||||
/* 0x38 */ BT_DIGIT, BT_DIGIT, BT_COLON, BT_SEMI,
|
||||
/* 0x3C */ BT_LT, BT_EQUALS, BT_GT, BT_QUEST,
|
||||
/* 0x40 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX,
|
||||
/* 0x44 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT,
|
||||
/* 0x48 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0x4C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0x50 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0x54 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0x58 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_LSQB,
|
||||
/* 0x5C */ BT_OTHER, BT_RSQB, BT_OTHER, BT_NMSTRT,
|
||||
/* 0x60 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX,
|
||||
/* 0x64 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT,
|
||||
/* 0x68 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0x6C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0x70 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0x74 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0x78 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER,
|
||||
/* 0x7C */ BT_VERBAR, BT_OTHER, BT_OTHER, BT_OTHER,
|
||||
|
66
vendor/POCO/XML/src/iasciitab.h
vendored
66
vendor/POCO/XML/src/iasciitab.h
vendored
@ -7,7 +7,9 @@
|
||||
|_| XML parser
|
||||
|
||||
Copyright (c) 1997-2000 Thai Open Source Software Center Ltd
|
||||
Copyright (c) 2000-2017 Expat development team
|
||||
Copyright (c) 2000 Clark Cooper <coopercc@users.sourceforge.net>
|
||||
Copyright (c) 2002 Fred L. Drake, Jr. <fdrake@users.sourceforge.net>
|
||||
Copyright (c) 2017 Sebastian Pipping <sebastian@pipping.org>
|
||||
Licensed under the MIT license:
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
@ -32,34 +34,34 @@
|
||||
|
||||
/* Like asciitab.h, except that 0xD has code BT_S rather than BT_CR */
|
||||
/* 0x00 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
|
||||
/* 0x04 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
|
||||
/* 0x08 */ BT_NONXML, BT_S, BT_LF, BT_NONXML,
|
||||
/* 0x0C */ BT_NONXML, BT_S, BT_NONXML, BT_NONXML,
|
||||
/* 0x10 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
|
||||
/* 0x14 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
|
||||
/* 0x18 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
|
||||
/* 0x1C */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
|
||||
/* 0x20 */ BT_S, BT_EXCL, BT_QUOT, BT_NUM,
|
||||
/* 0x24 */ BT_OTHER, BT_PERCNT, BT_AMP, BT_APOS,
|
||||
/* 0x28 */ BT_LPAR, BT_RPAR, BT_AST, BT_PLUS,
|
||||
/* 0x2C */ BT_COMMA, BT_MINUS, BT_NAME, BT_SOL,
|
||||
/* 0x30 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT,
|
||||
/* 0x34 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT,
|
||||
/* 0x38 */ BT_DIGIT, BT_DIGIT, BT_COLON, BT_SEMI,
|
||||
/* 0x3C */ BT_LT, BT_EQUALS, BT_GT, BT_QUEST,
|
||||
/* 0x40 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX,
|
||||
/* 0x44 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT,
|
||||
/* 0x48 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0x4C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0x50 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0x54 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0x58 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_LSQB,
|
||||
/* 0x5C */ BT_OTHER, BT_RSQB, BT_OTHER, BT_NMSTRT,
|
||||
/* 0x60 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX,
|
||||
/* 0x64 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT,
|
||||
/* 0x68 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0x6C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0x70 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0x74 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0x78 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER,
|
||||
/* 0x7C */ BT_VERBAR, BT_OTHER, BT_OTHER, BT_OTHER,
|
||||
/* 0x04 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
|
||||
/* 0x08 */ BT_NONXML, BT_S, BT_LF, BT_NONXML,
|
||||
/* 0x0C */ BT_NONXML, BT_S, BT_NONXML, BT_NONXML,
|
||||
/* 0x10 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
|
||||
/* 0x14 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
|
||||
/* 0x18 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
|
||||
/* 0x1C */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
|
||||
/* 0x20 */ BT_S, BT_EXCL, BT_QUOT, BT_NUM,
|
||||
/* 0x24 */ BT_OTHER, BT_PERCNT, BT_AMP, BT_APOS,
|
||||
/* 0x28 */ BT_LPAR, BT_RPAR, BT_AST, BT_PLUS,
|
||||
/* 0x2C */ BT_COMMA, BT_MINUS, BT_NAME, BT_SOL,
|
||||
/* 0x30 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT,
|
||||
/* 0x34 */ BT_DIGIT, BT_DIGIT, BT_DIGIT, BT_DIGIT,
|
||||
/* 0x38 */ BT_DIGIT, BT_DIGIT, BT_COLON, BT_SEMI,
|
||||
/* 0x3C */ BT_LT, BT_EQUALS, BT_GT, BT_QUEST,
|
||||
/* 0x40 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX,
|
||||
/* 0x44 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT,
|
||||
/* 0x48 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0x4C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0x50 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0x54 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0x58 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_LSQB,
|
||||
/* 0x5C */ BT_OTHER, BT_RSQB, BT_OTHER, BT_NMSTRT,
|
||||
/* 0x60 */ BT_OTHER, BT_HEX, BT_HEX, BT_HEX,
|
||||
/* 0x64 */ BT_HEX, BT_HEX, BT_HEX, BT_NMSTRT,
|
||||
/* 0x68 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0x6C */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0x70 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0x74 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0x78 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER,
|
||||
/* 0x7C */ BT_VERBAR, BT_OTHER, BT_OTHER, BT_OTHER,
|
||||
|
58
vendor/POCO/XML/src/internal.h
vendored
58
vendor/POCO/XML/src/internal.h
vendored
@ -25,8 +25,12 @@
|
||||
\___/_/\_\ .__/ \__,_|\__|
|
||||
|_| XML parser
|
||||
|
||||
Copyright (c) 1997-2000 Thai Open Source Software Center Ltd
|
||||
Copyright (c) 2000-2017 Expat development team
|
||||
Copyright (c) 2002-2003 Fred L. Drake, Jr. <fdrake@users.sourceforge.net>
|
||||
Copyright (c) 2002-2006 Karl Waclawek <karl@waclawek.net>
|
||||
Copyright (c) 2003 Greg Stein <gstein@users.sourceforge.net>
|
||||
Copyright (c) 2016-2021 Sebastian Pipping <sebastian@pipping.org>
|
||||
Copyright (c) 2018 Yury Gribov <tetra2005@gmail.com>
|
||||
Copyright (c) 2019 David Loffredo <loffredo@steptools.com>
|
||||
Licensed under the MIT license:
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
@ -101,22 +105,58 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include <limits.h> // ULONG_MAX
|
||||
|
||||
#if defined(_WIN32) && ! defined(__USE_MINGW_ANSI_STDIO)
|
||||
# define EXPAT_FMT_ULL(midpart) "%" midpart "I64u"
|
||||
# if defined(_WIN64) // Note: modifiers "td" and "zu" do not work for MinGW
|
||||
# define EXPAT_FMT_PTRDIFF_T(midpart) "%" midpart "I64d"
|
||||
# define EXPAT_FMT_SIZE_T(midpart) "%" midpart "I64u"
|
||||
# else
|
||||
# define EXPAT_FMT_PTRDIFF_T(midpart) "%" midpart "d"
|
||||
# define EXPAT_FMT_SIZE_T(midpart) "%" midpart "u"
|
||||
# endif
|
||||
#else
|
||||
# define EXPAT_FMT_ULL(midpart) "%" midpart "llu"
|
||||
# if ! defined(ULONG_MAX)
|
||||
# error Compiler did not define ULONG_MAX for us
|
||||
# elif ULONG_MAX == 18446744073709551615u // 2^64-1
|
||||
# define EXPAT_FMT_PTRDIFF_T(midpart) "%" midpart "ld"
|
||||
# define EXPAT_FMT_SIZE_T(midpart) "%" midpart "lu"
|
||||
# else
|
||||
# define EXPAT_FMT_PTRDIFF_T(midpart) "%" midpart "d"
|
||||
# define EXPAT_FMT_SIZE_T(midpart) "%" midpart "u"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef UNUSED_P
|
||||
# define UNUSED_P(p) (void)p
|
||||
#endif
|
||||
|
||||
/* NOTE BEGIN If you ever patch these defaults to greater values
|
||||
for non-attack XML payload in your environment,
|
||||
please file a bug report with libexpat. Thank you!
|
||||
*/
|
||||
#define EXPAT_BILLION_LAUGHS_ATTACK_PROTECTION_MAXIMUM_AMPLIFICATION_DEFAULT \
|
||||
100.0f
|
||||
#define EXPAT_BILLION_LAUGHS_ATTACK_PROTECTION_ACTIVATION_THRESHOLD_DEFAULT \
|
||||
8388608 // 8 MiB, 2^23
|
||||
/* NOTE END */
|
||||
|
||||
#include "Poco/XML/expat.h" // so we can use type XML_Parser below
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef XML_ENABLE_VISIBILITY
|
||||
# if XML_ENABLE_VISIBILITY
|
||||
__attribute__((visibility("default")))
|
||||
void _INTERNAL_trim_to_complete_utf8_characters(const char *from,
|
||||
const char **fromLimRef);
|
||||
|
||||
#if defined(XML_DTD)
|
||||
unsigned long long testingAccountingGetCountBytesDirect(XML_Parser parser);
|
||||
unsigned long long testingAccountingGetCountBytesIndirect(XML_Parser parser);
|
||||
const char *unsignedCharToPrintable(unsigned char c);
|
||||
# endif
|
||||
#endif
|
||||
void
|
||||
_INTERNAL_trim_to_complete_utf8_characters(const char *from,
|
||||
const char **fromLimRef);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
66
vendor/POCO/XML/src/latin1tab.h
vendored
66
vendor/POCO/XML/src/latin1tab.h
vendored
@ -7,7 +7,9 @@
|
||||
|_| XML parser
|
||||
|
||||
Copyright (c) 1997-2000 Thai Open Source Software Center Ltd
|
||||
Copyright (c) 2000-2017 Expat development team
|
||||
Copyright (c) 2000 Clark Cooper <coopercc@users.sourceforge.net>
|
||||
Copyright (c) 2002 Fred L. Drake, Jr. <fdrake@users.sourceforge.net>
|
||||
Copyright (c) 2017 Sebastian Pipping <sebastian@pipping.org>
|
||||
Licensed under the MIT license:
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
@ -31,34 +33,34 @@
|
||||
*/
|
||||
|
||||
/* 0x80 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
|
||||
/* 0x84 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
|
||||
/* 0x88 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
|
||||
/* 0x8C */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
|
||||
/* 0x90 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
|
||||
/* 0x94 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
|
||||
/* 0x98 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
|
||||
/* 0x9C */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
|
||||
/* 0xA0 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
|
||||
/* 0xA4 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
|
||||
/* 0xA8 */ BT_OTHER, BT_OTHER, BT_NMSTRT, BT_OTHER,
|
||||
/* 0xAC */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
|
||||
/* 0xB0 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
|
||||
/* 0xB4 */ BT_OTHER, BT_NMSTRT, BT_OTHER, BT_NAME,
|
||||
/* 0xB8 */ BT_OTHER, BT_OTHER, BT_NMSTRT, BT_OTHER,
|
||||
/* 0xBC */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
|
||||
/* 0xC0 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0xC4 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0xC8 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0xCC */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0xD0 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0xD4 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER,
|
||||
/* 0xD8 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0xDC */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0xE0 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0xE4 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0xE8 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0xEC */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0xF0 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0xF4 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER,
|
||||
/* 0xF8 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0xFC */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0x84 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
|
||||
/* 0x88 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
|
||||
/* 0x8C */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
|
||||
/* 0x90 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
|
||||
/* 0x94 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
|
||||
/* 0x98 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
|
||||
/* 0x9C */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
|
||||
/* 0xA0 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
|
||||
/* 0xA4 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
|
||||
/* 0xA8 */ BT_OTHER, BT_OTHER, BT_NMSTRT, BT_OTHER,
|
||||
/* 0xAC */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
|
||||
/* 0xB0 */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
|
||||
/* 0xB4 */ BT_OTHER, BT_NMSTRT, BT_OTHER, BT_NAME,
|
||||
/* 0xB8 */ BT_OTHER, BT_OTHER, BT_NMSTRT, BT_OTHER,
|
||||
/* 0xBC */ BT_OTHER, BT_OTHER, BT_OTHER, BT_OTHER,
|
||||
/* 0xC0 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0xC4 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0xC8 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0xCC */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0xD0 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0xD4 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER,
|
||||
/* 0xD8 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0xDC */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0xE0 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0xE4 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0xE8 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0xEC */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0xF0 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0xF4 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_OTHER,
|
||||
/* 0xF8 */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
/* 0xFC */ BT_NMSTRT, BT_NMSTRT, BT_NMSTRT, BT_NMSTRT,
|
||||
|
4
vendor/POCO/XML/src/nametab.h
vendored
4
vendor/POCO/XML/src/nametab.h
vendored
@ -6,8 +6,8 @@
|
||||
\___/_/\_\ .__/ \__,_|\__|
|
||||
|_| XML parser
|
||||
|
||||
Copyright (c) 1997-2000 Thai Open Source Software Center Ltd
|
||||
Copyright (c) 2000-2017 Expat development team
|
||||
Copyright (c) 2000 Clark Cooper <coopercc@users.sourceforge.net>
|
||||
Copyright (c) 2017 Sebastian Pipping <sebastian@pipping.org>
|
||||
Licensed under the MIT license:
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
|
11
vendor/POCO/XML/src/siphash.h
vendored
11
vendor/POCO/XML/src/siphash.h
vendored
@ -11,6 +11,9 @@
|
||||
* --------------------------------------------------------------------------
|
||||
* HISTORY:
|
||||
*
|
||||
* 2020-10-03 (Sebastian Pipping)
|
||||
* - Drop support for Visual Studio 9.0/2008 and earlier
|
||||
*
|
||||
* 2019-08-03 (Sebastian Pipping)
|
||||
* - Mark part of sip24_valid as to be excluded from clang-format
|
||||
* - Re-format code using clang-format 9
|
||||
@ -96,15 +99,7 @@
|
||||
#define SIPHASH_H
|
||||
|
||||
#include <stddef.h> /* size_t */
|
||||
|
||||
#if defined(_WIN32) && defined(_MSC_VER) && (_MSC_VER < 1600)
|
||||
/* For vs2003/7.1 up to vs2008/9.0; _MSC_VER 1600 is vs2010/10.0 */
|
||||
typedef unsigned __int8 uint8_t;
|
||||
typedef unsigned __int32 uint32_t;
|
||||
typedef unsigned __int64 uint64_t;
|
||||
#else
|
||||
# include <stdint.h> /* uint64_t uint32_t uint8_t */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Workaround to not require a C++11 compiler for using ULL suffix
|
||||
|
66
vendor/POCO/XML/src/utf8tab.h
vendored
66
vendor/POCO/XML/src/utf8tab.h
vendored
@ -7,7 +7,9 @@
|
||||
|_| XML parser
|
||||
|
||||
Copyright (c) 1997-2000 Thai Open Source Software Center Ltd
|
||||
Copyright (c) 2000-2017 Expat development team
|
||||
Copyright (c) 2000 Clark Cooper <coopercc@users.sourceforge.net>
|
||||
Copyright (c) 2002 Fred L. Drake, Jr. <fdrake@users.sourceforge.net>
|
||||
Copyright (c) 2017 Sebastian Pipping <sebastian@pipping.org>
|
||||
Licensed under the MIT license:
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
@ -31,34 +33,34 @@
|
||||
*/
|
||||
|
||||
/* 0x80 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
|
||||
/* 0x84 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
|
||||
/* 0x88 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
|
||||
/* 0x8C */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
|
||||
/* 0x90 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
|
||||
/* 0x94 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
|
||||
/* 0x98 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
|
||||
/* 0x9C */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
|
||||
/* 0xA0 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
|
||||
/* 0xA4 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
|
||||
/* 0xA8 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
|
||||
/* 0xAC */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
|
||||
/* 0xB0 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
|
||||
/* 0xB4 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
|
||||
/* 0xB8 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
|
||||
/* 0xBC */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
|
||||
/* 0xC0 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
|
||||
/* 0xC4 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
|
||||
/* 0xC8 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
|
||||
/* 0xCC */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
|
||||
/* 0xD0 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
|
||||
/* 0xD4 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
|
||||
/* 0xD8 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
|
||||
/* 0xDC */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
|
||||
/* 0xE0 */ BT_LEAD3, BT_LEAD3, BT_LEAD3, BT_LEAD3,
|
||||
/* 0xE4 */ BT_LEAD3, BT_LEAD3, BT_LEAD3, BT_LEAD3,
|
||||
/* 0xE8 */ BT_LEAD3, BT_LEAD3, BT_LEAD3, BT_LEAD3,
|
||||
/* 0xEC */ BT_LEAD3, BT_LEAD3, BT_LEAD3, BT_LEAD3,
|
||||
/* 0xF0 */ BT_LEAD4, BT_LEAD4, BT_LEAD4, BT_LEAD4,
|
||||
/* 0xF4 */ BT_LEAD4, BT_NONXML, BT_NONXML, BT_NONXML,
|
||||
/* 0xF8 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
|
||||
/* 0xFC */ BT_NONXML, BT_NONXML, BT_MALFORM, BT_MALFORM,
|
||||
/* 0x84 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
|
||||
/* 0x88 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
|
||||
/* 0x8C */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
|
||||
/* 0x90 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
|
||||
/* 0x94 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
|
||||
/* 0x98 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
|
||||
/* 0x9C */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
|
||||
/* 0xA0 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
|
||||
/* 0xA4 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
|
||||
/* 0xA8 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
|
||||
/* 0xAC */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
|
||||
/* 0xB0 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
|
||||
/* 0xB4 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
|
||||
/* 0xB8 */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
|
||||
/* 0xBC */ BT_TRAIL, BT_TRAIL, BT_TRAIL, BT_TRAIL,
|
||||
/* 0xC0 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
|
||||
/* 0xC4 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
|
||||
/* 0xC8 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
|
||||
/* 0xCC */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
|
||||
/* 0xD0 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
|
||||
/* 0xD4 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
|
||||
/* 0xD8 */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
|
||||
/* 0xDC */ BT_LEAD2, BT_LEAD2, BT_LEAD2, BT_LEAD2,
|
||||
/* 0xE0 */ BT_LEAD3, BT_LEAD3, BT_LEAD3, BT_LEAD3,
|
||||
/* 0xE4 */ BT_LEAD3, BT_LEAD3, BT_LEAD3, BT_LEAD3,
|
||||
/* 0xE8 */ BT_LEAD3, BT_LEAD3, BT_LEAD3, BT_LEAD3,
|
||||
/* 0xEC */ BT_LEAD3, BT_LEAD3, BT_LEAD3, BT_LEAD3,
|
||||
/* 0xF0 */ BT_LEAD4, BT_LEAD4, BT_LEAD4, BT_LEAD4,
|
||||
/* 0xF4 */ BT_LEAD4, BT_NONXML, BT_NONXML, BT_NONXML,
|
||||
/* 0xF8 */ BT_NONXML, BT_NONXML, BT_NONXML, BT_NONXML,
|
||||
/* 0xFC */ BT_NONXML, BT_NONXML, BT_MALFORM, BT_MALFORM,
|
||||
|
1247
vendor/POCO/XML/src/xmlparse.cpp
vendored
1247
vendor/POCO/XML/src/xmlparse.cpp
vendored
File diff suppressed because it is too large
Load Diff
17
vendor/POCO/XML/src/xmlrole.c
vendored
17
vendor/POCO/XML/src/xmlrole.c
vendored
@ -7,7 +7,14 @@
|
||||
|_| XML parser
|
||||
|
||||
Copyright (c) 1997-2000 Thai Open Source Software Center Ltd
|
||||
Copyright (c) 2000-2017 Expat development team
|
||||
Copyright (c) 2000 Clark Cooper <coopercc@users.sourceforge.net>
|
||||
Copyright (c) 2002 Greg Stein <gstein@users.sourceforge.net>
|
||||
Copyright (c) 2002-2006 Karl Waclawek <karl@waclawek.net>
|
||||
Copyright (c) 2002-2003 Fred L. Drake, Jr. <fdrake@users.sourceforge.net>
|
||||
Copyright (c) 2005-2009 Steven Solie <ssolie@users.sourceforge.net>
|
||||
Copyright (c) 2016-2021 Sebastian Pipping <sebastian@pipping.org>
|
||||
Copyright (c) 2017 Rhodri James <rhodri@wildebeest.org.uk>
|
||||
Copyright (c) 2019 David Loffredo <loffredo@steptools.com>
|
||||
Licensed under the MIT license:
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
@ -34,11 +41,9 @@
|
||||
|
||||
#ifdef EXPAT_WIN32
|
||||
#include "winconfig.h"
|
||||
#else
|
||||
#ifdef HAVE_EXPAT_CONFIG_H
|
||||
#include "expat_config.h"
|
||||
#endif
|
||||
#endif /* ndef EXPAT_WIN32 */
|
||||
|
||||
#include "expat_config.h"
|
||||
|
||||
#include "Poco/XML/expat_external.h"
|
||||
#include "internal.h"
|
||||
@ -1220,6 +1225,8 @@ common(PROLOG_STATE *state, int tok) {
|
||||
#ifdef XML_DTD
|
||||
if (! state->documentEntity && tok == XML_TOK_PARAM_ENTITY_REF)
|
||||
return XML_ROLE_INNER_PARAM_ENTITY_REF;
|
||||
#else
|
||||
UNUSED_P(tok);
|
||||
#endif
|
||||
state->handler = error;
|
||||
return XML_ROLE_ERROR;
|
||||
|
11
vendor/POCO/XML/src/xmlrole.h
vendored
11
vendor/POCO/XML/src/xmlrole.h
vendored
@ -7,7 +7,10 @@
|
||||
|_| XML parser
|
||||
|
||||
Copyright (c) 1997-2000 Thai Open Source Software Center Ltd
|
||||
Copyright (c) 2000-2017 Expat development team
|
||||
Copyright (c) 2000 Clark Cooper <coopercc@users.sourceforge.net>
|
||||
Copyright (c) 2002 Karl Waclawek <karl@waclawek.net>
|
||||
Copyright (c) 2002 Fred L. Drake, Jr. <fdrake@users.sourceforge.net>
|
||||
Copyright (c) 2017 Sebastian Pipping <sebastian@pipping.org>
|
||||
Licensed under the MIT license:
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
@ -33,6 +36,12 @@
|
||||
#ifndef XmlRole_INCLUDED
|
||||
#define XmlRole_INCLUDED 1
|
||||
|
||||
#ifdef __VMS
|
||||
/* 0 1 2 3 0 1 2 3
|
||||
1234567890123456789012345678901 1234567890123456789012345678901 */
|
||||
# define XmlPrologStateInitExternalEntity XmlPrologStateInitExternalEnt
|
||||
#endif
|
||||
|
||||
#include "xmltok.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
42
vendor/POCO/XML/src/xmltok.c
vendored
42
vendor/POCO/XML/src/xmltok.c
vendored
@ -7,7 +7,19 @@
|
||||
|_| XML parser
|
||||
|
||||
Copyright (c) 1997-2000 Thai Open Source Software Center Ltd
|
||||
Copyright (c) 2000-2017 Expat development team
|
||||
Copyright (c) 2000 Clark Cooper <coopercc@users.sourceforge.net>
|
||||
Copyright (c) 2001-2003 Fred L. Drake, Jr. <fdrake@users.sourceforge.net>
|
||||
Copyright (c) 2002 Greg Stein <gstein@users.sourceforge.net>
|
||||
Copyright (c) 2002-2016 Karl Waclawek <karl@waclawek.net>
|
||||
Copyright (c) 2005-2009 Steven Solie <ssolie@users.sourceforge.net>
|
||||
Copyright (c) 2016-2021 Sebastian Pipping <sebastian@pipping.org>
|
||||
Copyright (c) 2016 Pascal Cuoq <cuoq@trust-in-soft.com>
|
||||
Copyright (c) 2016 Don Lewis <truckman@apache.org>
|
||||
Copyright (c) 2017 Rhodri James <rhodri@wildebeest.org.uk>
|
||||
Copyright (c) 2017 Alexander Bluhm <alexander.bluhm@gmx.net>
|
||||
Copyright (c) 2017 Benbuck Nason <bnason@netflix.com>
|
||||
Copyright (c) 2017 José Gutiérrez de la Concha <jose@zeroc.com>
|
||||
Copyright (c) 2019 David Loffredo <loffredo@steptools.com>
|
||||
Licensed under the MIT license:
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
@ -32,23 +44,13 @@
|
||||
|
||||
#include <stddef.h>
|
||||
#include <string.h> /* memcpy */
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER <= 1700)
|
||||
/* for vs2012/11.0/1700 and earlier Visual Studio compilers */
|
||||
# define bool int
|
||||
# define false 0
|
||||
# define true 1
|
||||
#else
|
||||
# include <stdbool.h>
|
||||
#endif
|
||||
#include <stdbool.h>
|
||||
|
||||
#ifdef EXPAT_WIN32
|
||||
# include "winconfig.h"
|
||||
#else
|
||||
# ifdef HAVE_EXPAT_CONFIG_H
|
||||
# include "expat_config.h"
|
||||
# endif
|
||||
#endif /* ndef _WIN32 */
|
||||
#endif
|
||||
|
||||
#include "expat_config.h"
|
||||
|
||||
#include "Poco/XML/expat_external.h"
|
||||
#include "internal.h"
|
||||
@ -269,8 +271,14 @@ sb_byteToAscii(const ENCODING *enc, const char *p) {
|
||||
|
||||
#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
|
||||
#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
|
||||
#ifdef XML_MIN_SIZE
|
||||
# define IS_INVALID_CHAR(enc, p, n) \
|
||||
(AS_NORMAL_ENCODING(enc)->isInvalid##n \
|
||||
&& AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
|
||||
#else
|
||||
#define IS_INVALID_CHAR(enc, p, n) \
|
||||
(AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
|
||||
#endif
|
||||
|
||||
#ifdef XML_MIN_SIZE
|
||||
# define IS_NAME_CHAR_MINBPC(enc, p) \
|
||||
@ -589,13 +597,13 @@ static const struct normal_encoding ascii_encoding
|
||||
static int PTRFASTCALL
|
||||
unicode_byte_type(char hi, char lo) {
|
||||
switch ((unsigned char)hi) {
|
||||
/* 0xD800–0xDBFF first 16-bit code unit or high surrogate (W1) */
|
||||
/* 0xD800-0xDBFF first 16-bit code unit or high surrogate (W1) */
|
||||
case 0xD8:
|
||||
case 0xD9:
|
||||
case 0xDA:
|
||||
case 0xDB:
|
||||
return BT_LEAD4;
|
||||
/* 0xDC00–0xDFFF second 16-bit code unit or low surrogate (W2) */
|
||||
/* 0xDC00-0xDFFF second 16-bit code unit or low surrogate (W2) */
|
||||
case 0xDC:
|
||||
case 0xDD:
|
||||
case 0xDE:
|
||||
|
6
vendor/POCO/XML/src/xmltok.h
vendored
6
vendor/POCO/XML/src/xmltok.h
vendored
@ -7,7 +7,11 @@
|
||||
|_| XML parser
|
||||
|
||||
Copyright (c) 1997-2000 Thai Open Source Software Center Ltd
|
||||
Copyright (c) 2000-2017 Expat development team
|
||||
Copyright (c) 2000 Clark Cooper <coopercc@users.sourceforge.net>
|
||||
Copyright (c) 2002 Fred L. Drake, Jr. <fdrake@users.sourceforge.net>
|
||||
Copyright (c) 2002-2005 Karl Waclawek <karl@waclawek.net>
|
||||
Copyright (c) 2016-2017 Sebastian Pipping <sebastian@pipping.org>
|
||||
Copyright (c) 2017 Rhodri James <rhodri@wildebeest.org.uk>
|
||||
Licensed under the MIT license:
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
|
21
vendor/POCO/XML/src/xmltok_impl.c
vendored
21
vendor/POCO/XML/src/xmltok_impl.c
vendored
@ -1,4 +1,4 @@
|
||||
/* This file is included!
|
||||
/* This file is included (from xmltok.c, 1-3 times depending on XML_MIN_SIZE)!
|
||||
__ __ _
|
||||
___\ \/ /_ __ __ _| |_
|
||||
/ _ \\ /| '_ \ / _` | __|
|
||||
@ -7,7 +7,15 @@
|
||||
|_| XML parser
|
||||
|
||||
Copyright (c) 1997-2000 Thai Open Source Software Center Ltd
|
||||
Copyright (c) 2000-2017 Expat development team
|
||||
Copyright (c) 2000 Clark Cooper <coopercc@users.sourceforge.net>
|
||||
Copyright (c) 2002 Fred L. Drake, Jr. <fdrake@users.sourceforge.net>
|
||||
Copyright (c) 2002-2016 Karl Waclawek <karl@waclawek.net>
|
||||
Copyright (c) 2016-2021 Sebastian Pipping <sebastian@pipping.org>
|
||||
Copyright (c) 2017 Rhodri James <rhodri@wildebeest.org.uk>
|
||||
Copyright (c) 2018 Benjamin Peterson <benjamin@python.org>
|
||||
Copyright (c) 2018 Anton Maklakov <antmak.pub@gmail.com>
|
||||
Copyright (c) 2019 David Loffredo <loffredo@steptools.com>
|
||||
Copyright (c) 2020 Boris Kolpackov <boris@codesynthesis.com>
|
||||
Licensed under the MIT license:
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
@ -32,7 +40,7 @@
|
||||
|
||||
#ifdef XML_TOK_IMPL_C
|
||||
|
||||
# ifndef IS_INVALID_CHAR
|
||||
# ifndef IS_INVALID_CHAR // i.e. for UTF-16 and XML_MIN_SIZE not defined
|
||||
# define IS_INVALID_CHAR(enc, ptr, n) (0)
|
||||
# endif
|
||||
|
||||
@ -1768,13 +1776,14 @@ PREFIX(updatePosition)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
# define LEAD_CASE(n) \
|
||||
case BT_LEAD##n: \
|
||||
ptr += n; \
|
||||
pos->columnNumber++; \
|
||||
break;
|
||||
LEAD_CASE(2)
|
||||
LEAD_CASE(3)
|
||||
LEAD_CASE(4)
|
||||
# undef LEAD_CASE
|
||||
case BT_LF:
|
||||
pos->columnNumber = (XML_Size)-1;
|
||||
pos->columnNumber = 0;
|
||||
pos->lineNumber++;
|
||||
ptr += MINBPC(enc);
|
||||
break;
|
||||
@ -1783,13 +1792,13 @@ PREFIX(updatePosition)(const ENCODING *enc, const char *ptr, const char *end,
|
||||
ptr += MINBPC(enc);
|
||||
if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
|
||||
ptr += MINBPC(enc);
|
||||
pos->columnNumber = (XML_Size)-1;
|
||||
pos->columnNumber = 0;
|
||||
break;
|
||||
default:
|
||||
ptr += MINBPC(enc);
|
||||
pos->columnNumber++;
|
||||
break;
|
||||
}
|
||||
pos->columnNumber++;
|
||||
}
|
||||
}
|
||||
|
||||
|
3
vendor/POCO/XML/src/xmltok_impl.h
vendored
3
vendor/POCO/XML/src/xmltok_impl.h
vendored
@ -7,7 +7,8 @@
|
||||
|_| XML parser
|
||||
|
||||
Copyright (c) 1997-2000 Thai Open Source Software Center Ltd
|
||||
Copyright (c) 2000-2017 Expat development team
|
||||
Copyright (c) 2000 Clark Cooper <coopercc@users.sourceforge.net>
|
||||
Copyright (c) 2017-2019 Sebastian Pipping <sebastian@pipping.org>
|
||||
Licensed under the MIT license:
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
|
6
vendor/POCO/XML/src/xmltok_ns.c
vendored
6
vendor/POCO/XML/src/xmltok_ns.c
vendored
@ -7,7 +7,11 @@
|
||||
|_| XML parser
|
||||
|
||||
Copyright (c) 1997-2000 Thai Open Source Software Center Ltd
|
||||
Copyright (c) 2000-2017 Expat development team
|
||||
Copyright (c) 2000 Clark Cooper <coopercc@users.sourceforge.net>
|
||||
Copyright (c) 2002 Greg Stein <gstein@users.sourceforge.net>
|
||||
Copyright (c) 2002 Fred L. Drake, Jr. <fdrake@users.sourceforge.net>
|
||||
Copyright (c) 2002-2006 Karl Waclawek <karl@waclawek.net>
|
||||
Copyright (c) 2017 Sebastian Pipping <sebastian@pipping.org>
|
||||
Licensed under the MIT license:
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
|
Reference in New Issue
Block a user