aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/libxml/SAX2.c
diff options
context:
space:
mode:
authororivej <orivej@yandex-team.ru>2022-02-10 16:45:01 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:01 +0300
commit2d37894b1b037cf24231090eda8589bbb44fb6fc (patch)
treebe835aa92c6248212e705f25388ebafcf84bc7a1 /contrib/libs/libxml/SAX2.c
parent718c552901d703c502ccbefdfc3c9028d608b947 (diff)
downloadydb-2d37894b1b037cf24231090eda8589bbb44fb6fc.tar.gz
Restoring authorship annotation for <orivej@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/libxml/SAX2.c')
-rw-r--r--contrib/libs/libxml/SAX2.c80
1 files changed, 40 insertions, 40 deletions
diff --git a/contrib/libs/libxml/SAX2.c b/contrib/libs/libxml/SAX2.c
index ec4f2d09e8..5f141f9a3c 100644
--- a/contrib/libs/libxml/SAX2.c
+++ b/contrib/libs/libxml/SAX2.c
@@ -12,7 +12,7 @@
#include <stdlib.h>
#include <string.h>
#include <limits.h>
-#include <stddef.h>
+#include <stddef.h>
#include <libxml/xmlmemory.h>
#include <libxml/tree.h>
#include <libxml/parser.h>
@@ -40,7 +40,7 @@
* TODO:
*
* macro to flag unimplemented blocks
- * XML_CATALOG_PREFER user env to select between system/public preferred
+ * XML_CATALOG_PREFER user env to select between system/public preferred
* option. C.f. Richard Tobin <richard@cogsci.ed.ac.uk>
*> Just FYI, I am using an environment variable XML_CATALOG_PREFER with
*> values "system" and "public". I have made the default be "system" to
@@ -56,7 +56,7 @@
* @ctxt: an XML validation parser context
* @msg: a string to accompany the error message
*/
-static void LIBXML_ATTR_FORMAT(2,0)
+static void LIBXML_ATTR_FORMAT(2,0)
xmlSAX2ErrMemory(xmlParserCtxtPtr ctxt, const char *msg) {
xmlStructuredErrorFunc schannel = NULL;
const char *str1 = "out of memory\n";
@@ -94,7 +94,7 @@ xmlSAX2ErrMemory(xmlParserCtxtPtr ctxt, const char *msg) {
*
* Handle a validation error
*/
-static void LIBXML_ATTR_FORMAT(3,0)
+static void LIBXML_ATTR_FORMAT(3,0)
xmlErrValid(xmlParserCtxtPtr ctxt, xmlParserErrors error,
const char *msg, const char *str1, const char *str2)
{
@@ -134,7 +134,7 @@ xmlErrValid(xmlParserCtxtPtr ctxt, xmlParserErrors error,
*
* Handle a fatal parser error, i.e. violating Well-Formedness constraints
*/
-static void LIBXML_ATTR_FORMAT(3,0)
+static void LIBXML_ATTR_FORMAT(3,0)
xmlFatalErrMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
const char *msg, const xmlChar *str1, const xmlChar *str2)
{
@@ -165,7 +165,7 @@ xmlFatalErrMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
*
* Handle a parser warning
*/
-static void LIBXML_ATTR_FORMAT(3,0)
+static void LIBXML_ATTR_FORMAT(3,0)
xmlWarnMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
const char *msg, const xmlChar *str1)
{
@@ -190,7 +190,7 @@ xmlWarnMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
*
* Handle a namespace error
*/
-static void LIBXML_ATTR_FORMAT(3,0)
+static void LIBXML_ATTR_FORMAT(3,0)
xmlNsErrMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
const char *msg, const xmlChar *str1, const xmlChar *str2)
{
@@ -214,7 +214,7 @@ xmlNsErrMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
*
* Handle a namespace warning
*/
-static void LIBXML_ATTR_FORMAT(3,0)
+static void LIBXML_ATTR_FORMAT(3,0)
xmlNsWarnMsg(xmlParserCtxtPtr ctxt, xmlParserErrors error,
const char *msg, const xmlChar *str1, const xmlChar *str2)
{
@@ -1182,8 +1182,8 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname,
xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElement");
if (name != NULL)
xmlFree(name);
- if (nval != NULL)
- xmlFree(nval);
+ if (nval != NULL)
+ xmlFree(nval);
return;
}
} else {
@@ -1245,8 +1245,8 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname,
xmlFree(ns);
if (name != NULL)
xmlFree(name);
- if (nval != NULL)
- xmlFree(nval);
+ if (nval != NULL)
+ xmlFree(nval);
return;
}
} else {
@@ -1316,8 +1316,8 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname,
name, namespace->href);
ctxt->wellFormed = 0;
if (ctxt->recovery == 0) ctxt->disableSAX = 1;
- if (name != NULL)
- xmlFree(name);
+ if (name != NULL)
+ xmlFree(name);
goto error;
}
}
@@ -1512,8 +1512,8 @@ process_external_subset:
attr = elemDecl->attributes;
while (attr != NULL) {
/*
- * Make sure that attributes redefinition occurring in the
- * internal subset are not overridden by definitions in the
+ * Make sure that attributes redefinition occurring in the
+ * internal subset are not overridden by definitions in the
* external subset.
*/
if (attr->defaultValue != NULL) {
@@ -1665,13 +1665,13 @@ xmlSAX2StartElement(void *ctx, const xmlChar *fullname, const xmlChar **atts)
#ifdef DEBUG_SAX_TREE
xmlGenericError(xmlGenericErrorContext, "pushing(%s)\n", name);
#endif
- if (nodePush(ctxt, ret) < 0) {
- xmlUnlinkNode(ret);
- xmlFreeNode(ret);
- if (prefix != NULL)
- xmlFree(prefix);
- return;
- }
+ if (nodePush(ctxt, ret) < 0) {
+ xmlUnlinkNode(ret);
+ xmlFreeNode(ret);
+ if (prefix != NULL)
+ xmlFree(prefix);
+ return;
+ }
/*
* Link the child element
@@ -1736,8 +1736,8 @@ xmlSAX2StartElement(void *ctx, const xmlChar *fullname, const xmlChar **atts)
}
/*
- * set the namespace node, making sure that if the default namespace
- * is unbound on a parent we simply keep it NULL
+ * set the namespace node, making sure that if the default namespace
+ * is unbound on a parent we simply keep it NULL
*/
if ((ns != NULL) && (ns->href != NULL) &&
((ns->href[0] != 0) || (ns->prefix != NULL)))
@@ -1921,7 +1921,7 @@ skip:
else {
ret->line = 65535;
if (ctxt->options & XML_PARSE_BIG_LINES)
- ret->psvi = (void *) (ptrdiff_t) ctxt->input->line;
+ ret->psvi = (void *) (ptrdiff_t) ctxt->input->line;
}
}
}
@@ -2012,7 +2012,7 @@ xmlSAX2AttributeNs(xmlParserCtxtPtr ctxt,
else
ret->name = xmlStrdup(localname);
- /* link at the end to preserve order, TODO speed up with a last */
+ /* link at the end to preserve order, TODO speed up with a last */
if (ctxt->node->properties == NULL) {
ctxt->node->properties = ret;
} else {
@@ -2104,7 +2104,7 @@ xmlSAX2AttributeNs(xmlParserCtxtPtr ctxt,
} else {
/*
* dup now contains a string of the flattened attribute
- * content with entities substituted. Check if we need to
+ * content with entities substituted. Check if we need to
* apply an extra layer of normalization.
* It need to be done twice ... it's an extra burden related
* to the ability to keep references in attributes
@@ -2137,7 +2137,7 @@ xmlSAX2AttributeNs(xmlParserCtxtPtr ctxt,
}
} else {
/*
- * if entities already have been substituted, then
+ * if entities already have been substituted, then
* the attribute as passed is already normalized
*/
dup = xmlStrndup(value, valueend - value);
@@ -2263,7 +2263,7 @@ xmlSAX2StartElementNs(void *ctx,
ctxt->freeElems = ret->next;
ctxt->freeElemsNr--;
memset(ret, 0, sizeof(xmlNode));
- ret->doc = ctxt->myDoc;
+ ret->doc = ctxt->myDoc;
ret->type = XML_ELEMENT_NODE;
if (ctxt->dictNames)
@@ -2325,7 +2325,7 @@ xmlSAX2StartElementNs(void *ctx,
} else {
/*
* any out of memory error would already have been raised
- * but we can't be guaranteed it's the actual error due to the
+ * but we can't be guaranteed it's the actual error due to the
* API, best is to skip in this case
*/
continue;
@@ -2343,11 +2343,11 @@ xmlSAX2StartElementNs(void *ctx,
/*
* We are parsing a new node.
*/
- if (nodePush(ctxt, ret) < 0) {
- xmlUnlinkNode(ret);
- xmlFreeNode(ret);
- return;
- }
+ if (nodePush(ctxt, ret) < 0) {
+ xmlUnlinkNode(ret);
+ xmlFreeNode(ret);
+ return;
+ }
/*
* Link the child element
@@ -2400,7 +2400,7 @@ xmlSAX2StartElementNs(void *ctx,
if (nb_attributes > 0) {
for (j = 0,i = 0;i < nb_attributes;i++,j+=5) {
/*
- * Handle the rare case of an undefined attribute prefix
+ * Handle the rare case of an undefined attribute prefix
*/
if ((attributes[j+1] != NULL) && (attributes[j+2] == NULL)) {
if (ctxt->dictNames) {
@@ -2586,7 +2586,7 @@ xmlSAX2Characters(void *ctx, const xmlChar *ch, int len)
* The whole point of maintaining nodelen and nodemem,
* xmlTextConcat is too costly, i.e. compute length,
* reallocate a new buffer, move data, append ch. Here
- * We try to minimize realloc() uses and avoid copying
+ * We try to minimize realloc() uses and avoid copying
* and recomputing length over and over.
*/
if (lastChild->content == (xmlChar *)&(lastChild->properties)) {
@@ -2823,8 +2823,8 @@ xmlSAX2CDataBlock(void *ctx, const xmlChar *value, int len)
xmlTextConcat(lastChild, value, len);
} else {
ret = xmlNewCDataBlock(ctxt->myDoc, value, len);
- if (xmlAddChild(ctxt->node, ret) == NULL)
- xmlFreeNode(ret);
+ if (xmlAddChild(ctxt->node, ret) == NULL)
+ xmlFreeNode(ret);
}
}