aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/libxml/xmlsave.c
diff options
context:
space:
mode:
authororivej <orivej@yandex-team.ru>2022-02-10 16:44:49 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:44:49 +0300
commit718c552901d703c502ccbefdfc3c9028d608b947 (patch)
tree46534a98bbefcd7b1f3faa5b52c138ab27db75b7 /contrib/libs/libxml/xmlsave.c
parente9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (diff)
downloadydb-718c552901d703c502ccbefdfc3c9028d608b947.tar.gz
Restoring authorship annotation for <orivej@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/libxml/xmlsave.c')
-rw-r--r--contrib/libs/libxml/xmlsave.c72
1 files changed, 36 insertions, 36 deletions
diff --git a/contrib/libs/libxml/xmlsave.c b/contrib/libs/libxml/xmlsave.c
index fa00915371..888412075a 100644
--- a/contrib/libs/libxml/xmlsave.c
+++ b/contrib/libs/libxml/xmlsave.c
@@ -1,5 +1,5 @@
/*
- * xmlsave.c: Implementation of the document serializer
+ * xmlsave.c: Implementation of the document serializer
*
* See Copyright for the status of this software.
*
@@ -355,7 +355,7 @@ xmlSaveCtxtInit(xmlSaveCtxtPtr ctxt)
/**
* xmlFreeSaveCtxt:
*
- * Free a saving context, destroying the output in any remaining buffer
+ * Free a saving context, destroying the output in any remaining buffer
*/
static void
xmlFreeSaveCtxt(xmlSaveCtxtPtr ctxt)
@@ -1587,31 +1587,31 @@ xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
if (cur->properties != NULL)
xhtmlAttrListDumpOutput(ctxt, cur->properties);
- if ((cur->type == XML_ELEMENT_NODE) &&
- (cur->parent != NULL) &&
- (cur->parent->parent == (xmlNodePtr) cur->doc) &&
- xmlStrEqual(cur->name, BAD_CAST"head") &&
- xmlStrEqual(cur->parent->name, BAD_CAST"html")) {
-
- tmp = cur->children;
- while (tmp != NULL) {
- if (xmlStrEqual(tmp->name, BAD_CAST"meta")) {
- xmlChar *httpequiv;
-
- httpequiv = xmlGetProp(tmp, BAD_CAST"http-equiv");
- if (httpequiv != NULL) {
- if (xmlStrcasecmp(httpequiv, BAD_CAST"Content-Type") == 0) {
- xmlFree(httpequiv);
- break;
- }
- xmlFree(httpequiv);
- }
- }
- tmp = tmp->next;
- }
- if (tmp == NULL)
- addmeta = 1;
- }
+ if ((cur->type == XML_ELEMENT_NODE) &&
+ (cur->parent != NULL) &&
+ (cur->parent->parent == (xmlNodePtr) cur->doc) &&
+ xmlStrEqual(cur->name, BAD_CAST"head") &&
+ xmlStrEqual(cur->parent->name, BAD_CAST"html")) {
+
+ tmp = cur->children;
+ while (tmp != NULL) {
+ if (xmlStrEqual(tmp->name, BAD_CAST"meta")) {
+ xmlChar *httpequiv;
+
+ httpequiv = xmlGetProp(tmp, BAD_CAST"http-equiv");
+ if (httpequiv != NULL) {
+ if (xmlStrcasecmp(httpequiv, BAD_CAST"Content-Type") == 0) {
+ xmlFree(httpequiv);
+ break;
+ }
+ xmlFree(httpequiv);
+ }
+ }
+ tmp = tmp->next;
+ }
+ if (tmp == NULL)
+ addmeta = 1;
+ }
if ((cur->type == XML_ELEMENT_NODE) && (cur->children == NULL)) {
if (((cur->ns == NULL) || (cur->ns->prefix == NULL)) &&
@@ -2089,8 +2089,8 @@ xmlBufAttrSerializeTxtContent(xmlBufPtr buf, xmlDocPtr doc,
xmlBufAdd(buf, BAD_CAST "&amp;", 5);
cur++;
base = cur;
- } else if ((*cur >= 0x80) && (cur[1] != 0) &&
- ((doc == NULL) || (doc->encoding == NULL))) {
+ } else if ((*cur >= 0x80) && (cur[1] != 0) &&
+ ((doc == NULL) || (doc->encoding == NULL))) {
/*
* We assume we have UTF-8 content.
*/
@@ -2111,14 +2111,14 @@ xmlBufAttrSerializeTxtContent(xmlBufPtr buf, xmlDocPtr doc,
val <<= 6;
val |= (cur[1]) & 0x3F;
l = 2;
- } else if ((*cur < 0xF0) && (cur [2] != 0)) {
+ } else if ((*cur < 0xF0) && (cur [2] != 0)) {
val = (cur[0]) & 0x0F;
val <<= 6;
val |= (cur[1]) & 0x3F;
val <<= 6;
val |= (cur[2]) & 0x3F;
l = 3;
- } else if ((*cur < 0xF8) && (cur [2] != 0) && (cur[3] != 0)) {
+ } else if ((*cur < 0xF8) && (cur [2] != 0) && (cur[3] != 0)) {
val = (cur[0]) & 0x07;
val <<= 6;
val |= (cur[1]) & 0x3F;
@@ -2186,9 +2186,9 @@ xmlAttrSerializeTxtContent(xmlBufferPtr buf, xmlDocPtr doc,
*
* Dump an XML node, recursive behaviour,children are printed too.
* Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1
- * or xmlKeepBlanksDefault(0) was called.
+ * or xmlKeepBlanksDefault(0) was called.
* Since this is using xmlBuffer structures it is limited to 2GB and somehow
- * deprecated, use xmlNodeDumpOutput() instead.
+ * deprecated, use xmlNodeDumpOutput() instead.
*
* Returns the number of bytes written to the buffer or -1 in case of error
*/
@@ -2588,7 +2588,7 @@ xmlDocDump(FILE *f, xmlDocPtr cur) {
* xmlSaveFileTo:
* @buf: an output I/O buffer
* @cur: the document
- * @encoding: the encoding if any assuming the I/O layer handles the transcoding
+ * @encoding: the encoding if any assuming the I/O layer handles the transcoding
*
* Dump an XML document to an I/O buffer.
* Warning ! This call xmlOutputBufferClose() on buf which is not available
@@ -2622,7 +2622,7 @@ xmlSaveFileTo(xmlOutputBufferPtr buf, xmlDocPtr cur, const char *encoding) {
* xmlSaveFormatFileTo:
* @buf: an output I/O buffer
* @cur: the document
- * @encoding: the encoding if any assuming the I/O layer handles the transcoding
+ * @encoding: the encoding if any assuming the I/O layer handles the transcoding
* @format: should formatting spaces been added
*
* Dump an XML document to an I/O buffer.
@@ -2691,7 +2691,7 @@ xmlSaveFormatFileEnc( const char * filename, xmlDocPtr cur,
return(-1);
}
-#ifdef LIBXML_ZLIB_ENABLED
+#ifdef LIBXML_ZLIB_ENABLED
if (cur->compression < 0) cur->compression = xmlGetCompressMode();
#endif
/*