diff options
author | wawaka <wawaka@yandex-team.ru> | 2022-02-10 16:47:48 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:48 +0300 |
commit | ed524783c88c81047033c5d6e5543db3a2251ad5 (patch) | |
tree | 5c595c0ac1b14fbb70e7e71df44b52e47f850387 /contrib/libs/libxml/SAX.c | |
parent | 11ec0273ab97c87692cd0004865c7f24d14f9902 (diff) | |
download | ydb-ed524783c88c81047033c5d6e5543db3a2251ad5.tar.gz |
Restoring authorship annotation for <wawaka@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/libxml/SAX.c')
-rw-r--r-- | contrib/libs/libxml/SAX.c | 360 |
1 files changed, 180 insertions, 180 deletions
diff --git a/contrib/libs/libxml/SAX.c b/contrib/libs/libxml/SAX.c index 292af57e97..5fc2d55d17 100644 --- a/contrib/libs/libxml/SAX.c +++ b/contrib/libs/libxml/SAX.c @@ -1,180 +1,180 @@ -/* - * SAX.c : Old SAX v1 handlers to build a tree. - * Deprecated except for compatibility - * - * See Copyright for the status of this software. - * - * Daniel Veillard <daniel@veillard.com> - */ - - -#define IN_LIBXML -#include "libxml.h" -#include <stdlib.h> -#include <string.h> -#include <libxml/xmlmemory.h> -#include <libxml/tree.h> -#include <libxml/parser.h> -#include <libxml/parserInternals.h> -#include <libxml/valid.h> -#include <libxml/entities.h> -#include <libxml/xmlerror.h> -#include <libxml/debugXML.h> -#include <libxml/xmlIO.h> -#include <libxml/SAX.h> -#include <libxml/uri.h> -#include <libxml/valid.h> -#include <libxml/HTMLtree.h> -#include <libxml/globals.h> -#include <libxml/SAX2.h> - -#ifdef LIBXML_LEGACY_ENABLED -#ifdef LIBXML_SAX1_ENABLED -/** - * initxmlDefaultSAXHandler: - * @hdlr: the SAX handler - * @warning: flag if non-zero sets the handler warning procedure - * - * Initialize the default XML SAX version 1 handler - * DEPRECATED: use xmlSAX2InitDefaultSAXHandler() for the new SAX2 blocks - */ -void -initxmlDefaultSAXHandler(xmlSAXHandlerV1 *hdlr, int warning) -{ - - if(hdlr->initialized == 1) - return; - - hdlr->internalSubset = xmlSAX2InternalSubset; - hdlr->externalSubset = xmlSAX2ExternalSubset; - hdlr->isStandalone = xmlSAX2IsStandalone; - hdlr->hasInternalSubset = xmlSAX2HasInternalSubset; - hdlr->hasExternalSubset = xmlSAX2HasExternalSubset; - hdlr->resolveEntity = xmlSAX2ResolveEntity; - hdlr->getEntity = xmlSAX2GetEntity; - hdlr->getParameterEntity = xmlSAX2GetParameterEntity; - hdlr->entityDecl = xmlSAX2EntityDecl; - hdlr->attributeDecl = xmlSAX2AttributeDecl; - hdlr->elementDecl = xmlSAX2ElementDecl; - hdlr->notationDecl = xmlSAX2NotationDecl; - hdlr->unparsedEntityDecl = xmlSAX2UnparsedEntityDecl; - hdlr->setDocumentLocator = xmlSAX2SetDocumentLocator; - hdlr->startDocument = xmlSAX2StartDocument; - hdlr->endDocument = xmlSAX2EndDocument; - hdlr->startElement = xmlSAX2StartElement; - hdlr->endElement = xmlSAX2EndElement; - hdlr->reference = xmlSAX2Reference; - hdlr->characters = xmlSAX2Characters; - hdlr->cdataBlock = xmlSAX2CDataBlock; - hdlr->ignorableWhitespace = xmlSAX2Characters; - hdlr->processingInstruction = xmlSAX2ProcessingInstruction; - if (warning == 0) - hdlr->warning = NULL; - else - hdlr->warning = xmlParserWarning; - hdlr->error = xmlParserError; - hdlr->fatalError = xmlParserError; - - hdlr->initialized = 1; -} - -#ifdef LIBXML_HTML_ENABLED - -/** - * inithtmlDefaultSAXHandler: - * @hdlr: the SAX handler - * - * Initialize the default HTML SAX version 1 handler - * DEPRECATED: use xmlSAX2InitHtmlDefaultSAXHandler() for the new SAX2 blocks - */ -void -inithtmlDefaultSAXHandler(xmlSAXHandlerV1 *hdlr) -{ - if(hdlr->initialized == 1) - return; - - hdlr->internalSubset = xmlSAX2InternalSubset; - hdlr->externalSubset = NULL; - hdlr->isStandalone = NULL; - hdlr->hasInternalSubset = NULL; - hdlr->hasExternalSubset = NULL; - hdlr->resolveEntity = NULL; - hdlr->getEntity = xmlSAX2GetEntity; - hdlr->getParameterEntity = NULL; - hdlr->entityDecl = NULL; - hdlr->attributeDecl = NULL; - hdlr->elementDecl = NULL; - hdlr->notationDecl = NULL; - hdlr->unparsedEntityDecl = NULL; - hdlr->setDocumentLocator = xmlSAX2SetDocumentLocator; - hdlr->startDocument = xmlSAX2StartDocument; - hdlr->endDocument = xmlSAX2EndDocument; - hdlr->startElement = xmlSAX2StartElement; - hdlr->endElement = xmlSAX2EndElement; - hdlr->reference = NULL; - hdlr->characters = xmlSAX2Characters; - hdlr->cdataBlock = xmlSAX2CDataBlock; - hdlr->ignorableWhitespace = xmlSAX2IgnorableWhitespace; - hdlr->processingInstruction = xmlSAX2ProcessingInstruction; - hdlr->comment = xmlSAX2Comment; - hdlr->warning = xmlParserWarning; - hdlr->error = xmlParserError; - hdlr->fatalError = xmlParserError; - - hdlr->initialized = 1; -} - -#endif /* LIBXML_HTML_ENABLED */ - -#ifdef LIBXML_DOCB_ENABLED -/** - * initdocbDefaultSAXHandler: - * @hdlr: the SAX handler - * - * Initialize the default DocBook SAX version 1 handler - * DEPRECATED: use xmlSAX2InitDocbDefaultSAXHandler() for the new SAX2 blocks - */ -void -initdocbDefaultSAXHandler(xmlSAXHandlerV1 *hdlr) -{ - if(hdlr->initialized == 1) - return; - - hdlr->internalSubset = xmlSAX2InternalSubset; - hdlr->externalSubset = NULL; - hdlr->isStandalone = xmlSAX2IsStandalone; - hdlr->hasInternalSubset = xmlSAX2HasInternalSubset; - hdlr->hasExternalSubset = xmlSAX2HasExternalSubset; - hdlr->resolveEntity = xmlSAX2ResolveEntity; - hdlr->getEntity = xmlSAX2GetEntity; - hdlr->getParameterEntity = NULL; - hdlr->entityDecl = xmlSAX2EntityDecl; - hdlr->attributeDecl = NULL; - hdlr->elementDecl = NULL; - hdlr->notationDecl = NULL; - hdlr->unparsedEntityDecl = NULL; - hdlr->setDocumentLocator = xmlSAX2SetDocumentLocator; - hdlr->startDocument = xmlSAX2StartDocument; - hdlr->endDocument = xmlSAX2EndDocument; - hdlr->startElement = xmlSAX2StartElement; - hdlr->endElement = xmlSAX2EndElement; - hdlr->reference = xmlSAX2Reference; - hdlr->characters = xmlSAX2Characters; - hdlr->cdataBlock = NULL; - hdlr->ignorableWhitespace = xmlSAX2IgnorableWhitespace; - hdlr->processingInstruction = NULL; - hdlr->comment = xmlSAX2Comment; - hdlr->warning = xmlParserWarning; - hdlr->error = xmlParserError; - hdlr->fatalError = xmlParserError; - - hdlr->initialized = 1; -} - -#endif /* LIBXML_DOCB_ENABLED */ - -#endif /* LIBXML_SAX1_ENABLED */ - -#define bottom_SAX -#include "elfgcchack.h" -#endif /* LIBXML_LEGACY_ENABLED */ +/* + * SAX.c : Old SAX v1 handlers to build a tree. + * Deprecated except for compatibility + * + * See Copyright for the status of this software. + * + * Daniel Veillard <daniel@veillard.com> + */ + + +#define IN_LIBXML +#include "libxml.h" +#include <stdlib.h> +#include <string.h> +#include <libxml/xmlmemory.h> +#include <libxml/tree.h> +#include <libxml/parser.h> +#include <libxml/parserInternals.h> +#include <libxml/valid.h> +#include <libxml/entities.h> +#include <libxml/xmlerror.h> +#include <libxml/debugXML.h> +#include <libxml/xmlIO.h> +#include <libxml/SAX.h> +#include <libxml/uri.h> +#include <libxml/valid.h> +#include <libxml/HTMLtree.h> +#include <libxml/globals.h> +#include <libxml/SAX2.h> + +#ifdef LIBXML_LEGACY_ENABLED +#ifdef LIBXML_SAX1_ENABLED +/** + * initxmlDefaultSAXHandler: + * @hdlr: the SAX handler + * @warning: flag if non-zero sets the handler warning procedure + * + * Initialize the default XML SAX version 1 handler + * DEPRECATED: use xmlSAX2InitDefaultSAXHandler() for the new SAX2 blocks + */ +void +initxmlDefaultSAXHandler(xmlSAXHandlerV1 *hdlr, int warning) +{ + + if(hdlr->initialized == 1) + return; + + hdlr->internalSubset = xmlSAX2InternalSubset; + hdlr->externalSubset = xmlSAX2ExternalSubset; + hdlr->isStandalone = xmlSAX2IsStandalone; + hdlr->hasInternalSubset = xmlSAX2HasInternalSubset; + hdlr->hasExternalSubset = xmlSAX2HasExternalSubset; + hdlr->resolveEntity = xmlSAX2ResolveEntity; + hdlr->getEntity = xmlSAX2GetEntity; + hdlr->getParameterEntity = xmlSAX2GetParameterEntity; + hdlr->entityDecl = xmlSAX2EntityDecl; + hdlr->attributeDecl = xmlSAX2AttributeDecl; + hdlr->elementDecl = xmlSAX2ElementDecl; + hdlr->notationDecl = xmlSAX2NotationDecl; + hdlr->unparsedEntityDecl = xmlSAX2UnparsedEntityDecl; + hdlr->setDocumentLocator = xmlSAX2SetDocumentLocator; + hdlr->startDocument = xmlSAX2StartDocument; + hdlr->endDocument = xmlSAX2EndDocument; + hdlr->startElement = xmlSAX2StartElement; + hdlr->endElement = xmlSAX2EndElement; + hdlr->reference = xmlSAX2Reference; + hdlr->characters = xmlSAX2Characters; + hdlr->cdataBlock = xmlSAX2CDataBlock; + hdlr->ignorableWhitespace = xmlSAX2Characters; + hdlr->processingInstruction = xmlSAX2ProcessingInstruction; + if (warning == 0) + hdlr->warning = NULL; + else + hdlr->warning = xmlParserWarning; + hdlr->error = xmlParserError; + hdlr->fatalError = xmlParserError; + + hdlr->initialized = 1; +} + +#ifdef LIBXML_HTML_ENABLED + +/** + * inithtmlDefaultSAXHandler: + * @hdlr: the SAX handler + * + * Initialize the default HTML SAX version 1 handler + * DEPRECATED: use xmlSAX2InitHtmlDefaultSAXHandler() for the new SAX2 blocks + */ +void +inithtmlDefaultSAXHandler(xmlSAXHandlerV1 *hdlr) +{ + if(hdlr->initialized == 1) + return; + + hdlr->internalSubset = xmlSAX2InternalSubset; + hdlr->externalSubset = NULL; + hdlr->isStandalone = NULL; + hdlr->hasInternalSubset = NULL; + hdlr->hasExternalSubset = NULL; + hdlr->resolveEntity = NULL; + hdlr->getEntity = xmlSAX2GetEntity; + hdlr->getParameterEntity = NULL; + hdlr->entityDecl = NULL; + hdlr->attributeDecl = NULL; + hdlr->elementDecl = NULL; + hdlr->notationDecl = NULL; + hdlr->unparsedEntityDecl = NULL; + hdlr->setDocumentLocator = xmlSAX2SetDocumentLocator; + hdlr->startDocument = xmlSAX2StartDocument; + hdlr->endDocument = xmlSAX2EndDocument; + hdlr->startElement = xmlSAX2StartElement; + hdlr->endElement = xmlSAX2EndElement; + hdlr->reference = NULL; + hdlr->characters = xmlSAX2Characters; + hdlr->cdataBlock = xmlSAX2CDataBlock; + hdlr->ignorableWhitespace = xmlSAX2IgnorableWhitespace; + hdlr->processingInstruction = xmlSAX2ProcessingInstruction; + hdlr->comment = xmlSAX2Comment; + hdlr->warning = xmlParserWarning; + hdlr->error = xmlParserError; + hdlr->fatalError = xmlParserError; + + hdlr->initialized = 1; +} + +#endif /* LIBXML_HTML_ENABLED */ + +#ifdef LIBXML_DOCB_ENABLED +/** + * initdocbDefaultSAXHandler: + * @hdlr: the SAX handler + * + * Initialize the default DocBook SAX version 1 handler + * DEPRECATED: use xmlSAX2InitDocbDefaultSAXHandler() for the new SAX2 blocks + */ +void +initdocbDefaultSAXHandler(xmlSAXHandlerV1 *hdlr) +{ + if(hdlr->initialized == 1) + return; + + hdlr->internalSubset = xmlSAX2InternalSubset; + hdlr->externalSubset = NULL; + hdlr->isStandalone = xmlSAX2IsStandalone; + hdlr->hasInternalSubset = xmlSAX2HasInternalSubset; + hdlr->hasExternalSubset = xmlSAX2HasExternalSubset; + hdlr->resolveEntity = xmlSAX2ResolveEntity; + hdlr->getEntity = xmlSAX2GetEntity; + hdlr->getParameterEntity = NULL; + hdlr->entityDecl = xmlSAX2EntityDecl; + hdlr->attributeDecl = NULL; + hdlr->elementDecl = NULL; + hdlr->notationDecl = NULL; + hdlr->unparsedEntityDecl = NULL; + hdlr->setDocumentLocator = xmlSAX2SetDocumentLocator; + hdlr->startDocument = xmlSAX2StartDocument; + hdlr->endDocument = xmlSAX2EndDocument; + hdlr->startElement = xmlSAX2StartElement; + hdlr->endElement = xmlSAX2EndElement; + hdlr->reference = xmlSAX2Reference; + hdlr->characters = xmlSAX2Characters; + hdlr->cdataBlock = NULL; + hdlr->ignorableWhitespace = xmlSAX2IgnorableWhitespace; + hdlr->processingInstruction = NULL; + hdlr->comment = xmlSAX2Comment; + hdlr->warning = xmlParserWarning; + hdlr->error = xmlParserError; + hdlr->fatalError = xmlParserError; + + hdlr->initialized = 1; +} + +#endif /* LIBXML_DOCB_ENABLED */ + +#endif /* LIBXML_SAX1_ENABLED */ + +#define bottom_SAX +#include "elfgcchack.h" +#endif /* LIBXML_LEGACY_ENABLED */ |