mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-28 23:14:57 +03:00
doc: Move brief to top, params to bottom of doc comments
This commit is contained in:
128
HTMLtree.c
128
HTMLtree.c
@@ -35,8 +35,6 @@
|
||||
************************************************************************/
|
||||
|
||||
/**
|
||||
* @param doc the document
|
||||
*
|
||||
* Look up and encoding declaration in the meta tags.
|
||||
*
|
||||
* Does not support `<meta charset="">` yet. Only supports deprecated
|
||||
@@ -45,6 +43,7 @@
|
||||
* The returned string points into attribute content. It should be
|
||||
* copied before modifying or freeing nodes.
|
||||
*
|
||||
* @param doc the document
|
||||
* @returns the encoding ot NULL if not found.
|
||||
*/
|
||||
const xmlChar *
|
||||
@@ -151,9 +150,6 @@ found_content:
|
||||
}
|
||||
|
||||
/**
|
||||
* @param doc the document
|
||||
* @param encoding the encoding string
|
||||
*
|
||||
* Creates or updates a meta tag with an encoding declaration.
|
||||
*
|
||||
* Does not support `<meta charset="">` yet. Only supports deprecated
|
||||
@@ -161,6 +157,8 @@ found_content:
|
||||
*
|
||||
* NOTE: This will not change the document content encoding.
|
||||
*
|
||||
* @param doc the document
|
||||
* @param encoding the encoding string
|
||||
* @returns 0 in case of success and -1 in case of error
|
||||
*/
|
||||
int
|
||||
@@ -312,13 +310,12 @@ static const char* const htmlBooleanAttrs[] = {
|
||||
|
||||
|
||||
/**
|
||||
* @param name the name of the attribute to check
|
||||
*
|
||||
* @deprecated Internal function, don't use.
|
||||
*
|
||||
* Determine if a given attribute is a boolean attribute. This
|
||||
* doesn't handle HTML5.
|
||||
*
|
||||
* @deprecated Internal function, don't use.
|
||||
*
|
||||
* @param name the name of the attribute to check
|
||||
* @returns false if the attribute is not boolean, true otherwise.
|
||||
*/
|
||||
int
|
||||
@@ -353,13 +350,12 @@ htmlFindOutputEncoder(const char *encoding, xmlCharEncodingHandler **out) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Serialize an HTML document to an xmlBuf.
|
||||
*
|
||||
* @param buf the xmlBufPtr output
|
||||
* @param doc the document
|
||||
* @param cur the current node
|
||||
* @param format should formatting newlines been added
|
||||
*
|
||||
* Serialize an HTML document to an xmlBuf.
|
||||
*
|
||||
* @returns the number of bytes written or -1 in case of error
|
||||
*/
|
||||
static size_t
|
||||
@@ -397,12 +393,11 @@ htmlBufNodeDumpFormat(xmlBufPtr buf, xmlDocPtr doc, xmlNodePtr cur,
|
||||
}
|
||||
|
||||
/**
|
||||
* Serialize an HTML node to an xmlBuffer. Always uses UTF-8.
|
||||
*
|
||||
* @param buf the HTML buffer output
|
||||
* @param doc the document
|
||||
* @param cur the current node
|
||||
*
|
||||
* Serialize an HTML node to an xmlBuffer. Always uses UTF-8.
|
||||
*
|
||||
* @returns the number of bytes written or -1 in case of error
|
||||
*/
|
||||
int
|
||||
@@ -429,18 +424,17 @@ htmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param out the FILE pointer
|
||||
* @param doc the document
|
||||
* @param cur the current node
|
||||
* @param encoding the document encoding (optional)
|
||||
* @param format should formatting newlines been added
|
||||
*
|
||||
* Serialize an HTML node to an xmlBuffer.
|
||||
*
|
||||
* If encoding is NULL, ASCII with HTML 4.0 named character entities
|
||||
* will be used. This is inefficient compared to UTF-8 and might be
|
||||
* changed in a future version.
|
||||
*
|
||||
* @param out the FILE pointer
|
||||
* @param doc the document
|
||||
* @param cur the current node
|
||||
* @param encoding the document encoding (optional)
|
||||
* @param format should formatting newlines been added
|
||||
* @returns the number of bytes written or -1 in case of failure.
|
||||
*/
|
||||
int
|
||||
@@ -468,13 +462,13 @@ htmlNodeDumpFileFormat(FILE *out, xmlDocPtr doc,
|
||||
}
|
||||
|
||||
/**
|
||||
* @param out the FILE pointer
|
||||
* @param doc the document
|
||||
* @param cur the current node
|
||||
*
|
||||
* Same as htmlNodeDumpFileFormat() with `format` set to 1 which is
|
||||
* typically undesired. Use of this function is DISCOURAGED in favor
|
||||
* of htmlNodeDumpFileFormat().
|
||||
*
|
||||
* @param out the FILE pointer
|
||||
* @param doc the document
|
||||
* @param cur the current node
|
||||
*/
|
||||
void
|
||||
htmlNodeDumpFile(FILE *out, xmlDocPtr doc, xmlNodePtr cur) {
|
||||
@@ -482,11 +476,6 @@ htmlNodeDumpFile(FILE *out, xmlDocPtr doc, xmlNodePtr cur) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param cur the document
|
||||
* @param mem OUT: the memory pointer
|
||||
* @param size OUT: the memory length
|
||||
* @param format should formatting newlines been added
|
||||
*
|
||||
* Serialize an HTML node to a memory, also returning the size of
|
||||
* the result. It's up to the caller to free the memory.
|
||||
*
|
||||
@@ -498,6 +487,10 @@ htmlNodeDumpFile(FILE *out, xmlDocPtr doc, xmlNodePtr cur) {
|
||||
*
|
||||
* Use of this function is therefore DISCOURAGED in favor of
|
||||
* htmlDocContentDumpFormatOutput().
|
||||
* @param cur the document
|
||||
* @param mem OUT: the memory pointer
|
||||
* @param size OUT: the memory length
|
||||
* @param format should formatting newlines been added
|
||||
*/
|
||||
void
|
||||
htmlDocDumpMemoryFormat(xmlDocPtr cur, xmlChar**mem, int *size, int format) {
|
||||
@@ -539,14 +532,14 @@ htmlDocDumpMemoryFormat(xmlDocPtr cur, xmlChar**mem, int *size, int format) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param cur the document
|
||||
* @param mem OUT: the memory pointer
|
||||
* @param size OUT: the memory length
|
||||
*
|
||||
* Same as htmlDocDumpMemoryFormat() with `format` set to 1 which
|
||||
* is typically undesired. Also see the warnings there. Use of
|
||||
* this function is DISCOURAGED in favor of
|
||||
* htmlDocContentDumpFormatOutput().
|
||||
*
|
||||
* @param cur the document
|
||||
* @param mem OUT: the memory pointer
|
||||
* @param size OUT: the memory length
|
||||
*/
|
||||
void
|
||||
htmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size) {
|
||||
@@ -561,13 +554,12 @@ htmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size) {
|
||||
************************************************************************/
|
||||
|
||||
/**
|
||||
* @param buf the HTML buffer output
|
||||
* @param doc the document
|
||||
* @param encoding the encoding string (unused)
|
||||
*
|
||||
* Serialize the HTML document's DTD, if any.
|
||||
*
|
||||
* Ignores `encoding` and uses the encoding of the output buffer.
|
||||
* @param buf the HTML buffer output
|
||||
* @param doc the document
|
||||
* @param encoding the encoding string (unused)
|
||||
*/
|
||||
static void
|
||||
htmlDtdDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
|
||||
@@ -594,11 +586,11 @@ htmlDtdDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
|
||||
}
|
||||
|
||||
/**
|
||||
* Serialize an HTML attribute.
|
||||
*
|
||||
* @param buf the HTML buffer output
|
||||
* @param doc the document
|
||||
* @param cur the attribute pointer
|
||||
*
|
||||
* Serialize an HTML attribute.
|
||||
*/
|
||||
static void
|
||||
htmlAttrDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlAttrPtr cur) {
|
||||
@@ -663,15 +655,14 @@ htmlAttrDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlAttrPtr cur) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Serialize an HTML node to an output buffer.
|
||||
*
|
||||
* Ignores `encoding` and uses the encoding of the output buffer.
|
||||
* @param buf the HTML buffer output
|
||||
* @param doc the document
|
||||
* @param cur the current node
|
||||
* @param encoding the encoding string (unused)
|
||||
* @param format should formatting newlines been added
|
||||
*
|
||||
* Serialize an HTML node to an output buffer.
|
||||
*
|
||||
* Ignores `encoding` and uses the encoding of the output buffer.
|
||||
*/
|
||||
void
|
||||
htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
|
||||
@@ -899,16 +890,15 @@ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
|
||||
}
|
||||
|
||||
/**
|
||||
* @param buf the HTML buffer output
|
||||
* @param doc the document
|
||||
* @param cur the current node
|
||||
* @param encoding the encoding string (unused)
|
||||
*
|
||||
* Same as htmlNodeDumpFormatOutput() with `format` set to 1 which is
|
||||
* typically undesired. Use of this function is DISCOURAGED in favor
|
||||
* of htmlNodeDumpFormatOutput().
|
||||
*
|
||||
* Ignores `encoding` and uses the encoding of the output buffer.
|
||||
* @param buf the HTML buffer output
|
||||
* @param doc the document
|
||||
* @param cur the current node
|
||||
* @param encoding the encoding string (unused)
|
||||
*/
|
||||
void
|
||||
htmlNodeDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
|
||||
@@ -917,14 +907,13 @@ htmlNodeDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
|
||||
}
|
||||
|
||||
/**
|
||||
* Serialize an HTML document to an output buffer.
|
||||
*
|
||||
* Ignores `encoding` and uses the encoding of the output buffer.
|
||||
* @param buf the HTML buffer output
|
||||
* @param cur the document
|
||||
* @param encoding the encoding string (unused)
|
||||
* @param format should formatting newlines been added
|
||||
*
|
||||
* Serialize an HTML document to an output buffer.
|
||||
*
|
||||
* Ignores `encoding` and uses the encoding of the output buffer.
|
||||
*/
|
||||
void
|
||||
htmlDocContentDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr cur,
|
||||
@@ -941,15 +930,14 @@ htmlDocContentDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr cur,
|
||||
}
|
||||
|
||||
/**
|
||||
* @param buf the HTML buffer output
|
||||
* @param cur the document
|
||||
* @param encoding the encoding string (unused)
|
||||
*
|
||||
* Same as htmlNodeDumpFormatOutput() with `format` set to 1 which is
|
||||
* typically undesired. Use of this function is DISCOURAGED in favor
|
||||
* of htmlDocContentDumpFormatOutput().
|
||||
*
|
||||
* Ignores `encoding` and uses the encoding of the output buffer.
|
||||
* @param buf the HTML buffer output
|
||||
* @param cur the document
|
||||
* @param encoding the encoding string (unused)
|
||||
*/
|
||||
void
|
||||
htmlDocContentDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr cur,
|
||||
@@ -964,9 +952,6 @@ htmlDocContentDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr cur,
|
||||
************************************************************************/
|
||||
|
||||
/**
|
||||
* @param f the FILE*
|
||||
* @param cur the document
|
||||
*
|
||||
* Serialize an HTML document to an open `FILE`.
|
||||
*
|
||||
* WARNING: Uses the encoding from a deprecated meta tag, see
|
||||
@@ -981,6 +966,8 @@ htmlDocContentDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr cur,
|
||||
* Use of this function is DISCOURAGED in favor of
|
||||
* htmlNodeDumpFileFormat().
|
||||
*
|
||||
* @param f the FILE*
|
||||
* @param cur the document
|
||||
* @returns the number of bytes written or -1 in case of failure.
|
||||
*/
|
||||
int
|
||||
@@ -1009,9 +996,6 @@ htmlDocDump(FILE *f, xmlDocPtr cur) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param filename the filename (or URL)
|
||||
* @param cur the document
|
||||
*
|
||||
* Serialize an HTML document to a file. If `filename` is `"-"`,
|
||||
* stdout is used. This is potentially insecure and might be
|
||||
* changed in a future version.
|
||||
@@ -1028,6 +1012,8 @@ htmlDocDump(FILE *f, xmlDocPtr cur) {
|
||||
* Use of this function is DISCOURAGED in favor of
|
||||
* htmlSaveFileFormat().
|
||||
*
|
||||
* @param filename the filename (or URL)
|
||||
* @param cur the document
|
||||
* @returns the number of bytes written or -1 in case of failure.
|
||||
*/
|
||||
int
|
||||
@@ -1056,11 +1042,6 @@ htmlSaveFile(const char *filename, xmlDocPtr cur) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param filename the filename
|
||||
* @param cur the document
|
||||
* @param format should formatting newlines been added
|
||||
* @param encoding the document encoding (optional)
|
||||
*
|
||||
* Serialize an HTML document to a file using a given encoding.
|
||||
* If `filename` is `"-"`, stdout is used. This is potentially
|
||||
* insecure and might be changed in a future version.
|
||||
@@ -1069,6 +1050,10 @@ htmlSaveFile(const char *filename, xmlDocPtr cur) {
|
||||
* will be used. This is inefficient compared to UTF-8 and might be
|
||||
* changed in a future version.
|
||||
*
|
||||
* @param filename the filename
|
||||
* @param cur the document
|
||||
* @param format should formatting newlines been added
|
||||
* @param encoding the document encoding (optional)
|
||||
* @returns the number of bytes written or -1 in case of failure.
|
||||
*/
|
||||
int
|
||||
@@ -1104,14 +1089,13 @@ htmlSaveFileFormat(const char *filename, xmlDocPtr cur,
|
||||
}
|
||||
|
||||
/**
|
||||
* @param filename the filename
|
||||
* @param cur the document
|
||||
* @param encoding the document encoding
|
||||
*
|
||||
* Same as htmlSaveFileFormat() with `format` set to 1 which is
|
||||
* typically undesired. Also see the warnings there. Use of this
|
||||
* function is DISCOURAGED in favor of htmlSaveFileFormat().
|
||||
*
|
||||
* @param filename the filename
|
||||
* @param cur the document
|
||||
* @param encoding the document encoding
|
||||
* @returns the number of bytes written or -1 in case of failure.
|
||||
*/
|
||||
int
|
||||
|
||||
Reference in New Issue
Block a user