mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-24 13:33:01 +03:00
Remove unused encoding parameter of HTML output functions
The encoding string is unused. Encodings are set by way of the output buffer.
This commit is contained in:
34
HTMLtree.c
34
HTMLtree.c
@@ -518,7 +518,7 @@ htmlNodeDumpFileFormat(FILE *out, xmlDocPtr doc,
|
|||||||
buf = xmlOutputBufferCreateFile(out, handler);
|
buf = xmlOutputBufferCreateFile(out, handler);
|
||||||
if (buf == NULL) return(0);
|
if (buf == NULL) return(0);
|
||||||
|
|
||||||
htmlNodeDumpFormatOutput(buf, doc, cur, encoding, format);
|
htmlNodeDumpFormatOutput(buf, doc, cur, NULL, format);
|
||||||
|
|
||||||
ret = xmlOutputBufferClose(buf);
|
ret = xmlOutputBufferClose(buf);
|
||||||
return(ret);
|
return(ret);
|
||||||
@@ -670,13 +670,11 @@ htmlDtdDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
|
|||||||
* @buf: the HTML buffer output
|
* @buf: the HTML buffer output
|
||||||
* @doc: the document
|
* @doc: the document
|
||||||
* @cur: the attribute pointer
|
* @cur: the attribute pointer
|
||||||
* @encoding: the encoding string
|
|
||||||
*
|
*
|
||||||
* Dump an HTML attribute
|
* Dump an HTML attribute
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
htmlAttrDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlAttrPtr cur,
|
htmlAttrDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlAttrPtr cur) {
|
||||||
const char *encoding ATTRIBUTE_UNUSED) {
|
|
||||||
xmlChar *value;
|
xmlChar *value;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -737,14 +735,15 @@ htmlAttrDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlAttrPtr cur,
|
|||||||
* @buf: the HTML buffer output
|
* @buf: the HTML buffer output
|
||||||
* @doc: the document
|
* @doc: the document
|
||||||
* @cur: the current node
|
* @cur: the current node
|
||||||
* @encoding: the encoding string
|
* @encoding: the encoding string (unused)
|
||||||
* @format: should formatting spaces been added
|
* @format: should formatting spaces been added
|
||||||
*
|
*
|
||||||
* Dump an HTML node, recursive behaviour,children are printed too.
|
* Dump an HTML node, recursive behaviour,children are printed too.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
|
htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
|
||||||
xmlNodePtr cur, const char *encoding, int format) {
|
xmlNodePtr cur, const char *encoding ATTRIBUTE_UNUSED,
|
||||||
|
int format) {
|
||||||
xmlNodePtr root;
|
xmlNodePtr root;
|
||||||
xmlAttrPtr attr;
|
xmlAttrPtr attr;
|
||||||
const htmlElemDesc * info;
|
const htmlElemDesc * info;
|
||||||
@@ -788,7 +787,7 @@ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
|
|||||||
xmlNsListDumpOutput(buf, cur->nsDef);
|
xmlNsListDumpOutput(buf, cur->nsDef);
|
||||||
attr = cur->properties;
|
attr = cur->properties;
|
||||||
while (attr != NULL) {
|
while (attr != NULL) {
|
||||||
htmlAttrDumpOutput(buf, doc, attr, encoding);
|
htmlAttrDumpOutput(buf, doc, attr);
|
||||||
attr = attr->next;
|
attr = attr->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -835,7 +834,7 @@ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case XML_ATTRIBUTE_NODE:
|
case XML_ATTRIBUTE_NODE:
|
||||||
htmlAttrDumpOutput(buf, doc, (xmlAttrPtr) cur, encoding);
|
htmlAttrDumpOutput(buf, doc, (xmlAttrPtr) cur);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HTML_TEXT_NODE:
|
case HTML_TEXT_NODE:
|
||||||
@@ -955,44 +954,45 @@ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
|
|||||||
* @buf: the HTML buffer output
|
* @buf: the HTML buffer output
|
||||||
* @doc: the document
|
* @doc: the document
|
||||||
* @cur: the current node
|
* @cur: the current node
|
||||||
* @encoding: the encoding string
|
* @encoding: the encoding string (unused)
|
||||||
*
|
*
|
||||||
* Dump an HTML node, recursive behaviour,children are printed too,
|
* Dump an HTML node, recursive behaviour,children are printed too,
|
||||||
* and formatting returns/spaces are added.
|
* and formatting returns/spaces are added.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
htmlNodeDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
|
htmlNodeDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
|
||||||
xmlNodePtr cur, const char *encoding) {
|
xmlNodePtr cur, const char *encoding ATTRIBUTE_UNUSED) {
|
||||||
htmlNodeDumpFormatOutput(buf, doc, cur, encoding, 1);
|
htmlNodeDumpFormatOutput(buf, doc, cur, NULL, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* htmlDocContentDumpFormatOutput:
|
* htmlDocContentDumpFormatOutput:
|
||||||
* @buf: the HTML buffer output
|
* @buf: the HTML buffer output
|
||||||
* @cur: the document
|
* @cur: the document
|
||||||
* @encoding: the encoding string
|
* @encoding: the encoding string (unused)
|
||||||
* @format: should formatting spaces been added
|
* @format: should formatting spaces been added
|
||||||
*
|
*
|
||||||
* Dump an HTML document.
|
* Dump an HTML document.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
htmlDocContentDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr cur,
|
htmlDocContentDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr cur,
|
||||||
const char *encoding, int format) {
|
const char *encoding ATTRIBUTE_UNUSED,
|
||||||
htmlNodeDumpFormatOutput(buf, cur, (xmlNodePtr) cur, encoding, format);
|
int format) {
|
||||||
|
htmlNodeDumpFormatOutput(buf, cur, (xmlNodePtr) cur, NULL, format);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* htmlDocContentDumpOutput:
|
* htmlDocContentDumpOutput:
|
||||||
* @buf: the HTML buffer output
|
* @buf: the HTML buffer output
|
||||||
* @cur: the document
|
* @cur: the document
|
||||||
* @encoding: the encoding string
|
* @encoding: the encoding string (unused)
|
||||||
*
|
*
|
||||||
* Dump an HTML document. Formatting return/spaces are added.
|
* Dump an HTML document. Formatting return/spaces are added.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
htmlDocContentDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr cur,
|
htmlDocContentDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr cur,
|
||||||
const char *encoding) {
|
const char *encoding ATTRIBUTE_UNUSED) {
|
||||||
htmlNodeDumpFormatOutput(buf, cur, (xmlNodePtr) cur, encoding, 1);
|
htmlNodeDumpFormatOutput(buf, cur, (xmlNodePtr) cur, NULL, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
|
|||||||
Reference in New Issue
Block a user