From 38ea8fa9dea1ff4777c17581350795a3691ee88a Mon Sep 17 00:00:00 2001 From: Nick Wellnhofer Date: Tue, 6 May 2025 18:31:45 +0200 Subject: [PATCH] doc: Fix varargs --- include/libxml/parser.h | 8 +++----- include/libxml/relaxng.h | 6 ++---- include/libxml/schematron.h | 6 ++---- include/libxml/xmlschemas.h | 6 ++---- parserInternals.c | 3 +-- runtest.c | 9 +++------ testlimits.c | 9 +++------ xmlstring.c | 6 ++---- xmlwriter.c | 39 +++++++++++++------------------------ 9 files changed, 31 insertions(+), 61 deletions(-) diff --git a/include/libxml/parser.h b/include/libxml/parser.h index a3aae942..ee0987f6 100644 --- a/include/libxml/parser.h +++ b/include/libxml/parser.h @@ -730,20 +730,18 @@ typedef void (*cdataBlockSAXFunc) ( /** * Display and format a warning messages, callback. * - * @...: extra parameters for the message display - * * @param ctx an XML parser context * @param msg the message to display/transmit + * @param ... extra parameters for the message display */ typedef void (*warningSAXFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3); /** * Display and format an error messages, callback. * - * @...: extra parameters for the message display - * * @param ctx an XML parser context * @param msg the message to display/transmit + * @param ... extra parameters for the message display */ typedef void (*errorSAXFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3); @@ -752,10 +750,10 @@ typedef void (*errorSAXFunc) (void *ctx, * Note: so far fatalError() SAX callbacks are not used, error() * get all the callbacks for errors. * - * @...: extra parameters for the message display * * @param ctx an XML parser context * @param msg the message to display/transmit + * @param ... extra parameters for the message display */ typedef void (*fatalErrorSAXFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3); diff --git a/include/libxml/relaxng.h b/include/libxml/relaxng.h index 654244aa..5f698ce7 100644 --- a/include/libxml/relaxng.h +++ b/include/libxml/relaxng.h @@ -32,10 +32,9 @@ typedef xmlRelaxNG *xmlRelaxNGPtr; /** * Signature of an error callback from a Relax-NG validation * - * @...: extra arguments - * * @param ctx the validation context * @param msg the message + * @param ... extra arguments */ typedef void (*xmlRelaxNGValidityErrorFunc) (void *ctx, const char *msg, @@ -44,10 +43,9 @@ typedef void (*xmlRelaxNGValidityErrorFunc) (void *ctx, /** * Signature of a warning callback from a Relax-NG validation * - * @...: extra arguments - * * @param ctx the validation context * @param msg the message + * @param ... extra arguments */ typedef void (*xmlRelaxNGValidityWarningFunc) (void *ctx, const char *msg, diff --git a/include/libxml/schematron.h b/include/libxml/schematron.h index 9b30faf1..8620a3ed 100644 --- a/include/libxml/schematron.h +++ b/include/libxml/schematron.h @@ -44,20 +44,18 @@ typedef xmlSchematron *xmlSchematronPtr; /** * Signature of an error callback from a Schematron validation * - * @...: extra arguments - * * @param ctx the validation context * @param msg the message + * @param ... extra arguments */ typedef void (*xmlSchematronValidityErrorFunc) (void *ctx, const char *msg, ...); /** * Signature of a warning callback from a Schematron validation * - * @...: extra arguments - * * @param ctx the validation context * @param msg the message + * @param ... extra arguments */ typedef void (*xmlSchematronValidityWarningFunc) (void *ctx, const char *msg, ...); diff --git a/include/libxml/xmlschemas.h b/include/libxml/xmlschemas.h index 8766aaae..4bbdf9ac 100644 --- a/include/libxml/xmlschemas.h +++ b/include/libxml/xmlschemas.h @@ -92,10 +92,9 @@ typedef xmlSchema *xmlSchemaPtr; /** * Signature of an error callback from an XSD validation * - * @...: extra arguments - * * @param ctx the validation context * @param msg the message + * @param ... extra arguments */ typedef void (*xmlSchemaValidityErrorFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3); @@ -103,10 +102,9 @@ typedef void (*xmlSchemaValidityErrorFunc) /** * Signature of a warning callback from an XSD validation * - * @...: extra arguments - * * @param ctx the validation context * @param msg the message + * @param ... extra arguments */ typedef void (*xmlSchemaValidityWarningFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3); diff --git a/parserInternals.c b/parserInternals.c index 9fa070de..a9eccacf 100644 --- a/parserInternals.c +++ b/parserInternals.c @@ -395,8 +395,6 @@ xmlCtxtVErr(xmlParserCtxtPtr ctxt, xmlNodePtr node, xmlErrorDomain domain, /** * Raise a parser error. * - * @...: extra parameters for the message display - * * @param ctxt a parser context * @param node the current node or NULL * @param domain the domain for the error @@ -407,6 +405,7 @@ xmlCtxtVErr(xmlParserCtxtPtr ctxt, xmlNodePtr node, xmlErrorDomain domain, * @param str3 extra string info * @param int1 extra int info * @param msg the message to display/transmit + * @param ... extra parameters for the message display */ void xmlCtxtErr(xmlParserCtxtPtr ctxt, xmlNodePtr node, xmlErrorDomain domain, diff --git a/runtest.c b/runtest.c index 812c8528..96c75d88 100644 --- a/runtest.c +++ b/runtest.c @@ -1121,10 +1121,9 @@ commentDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *value) * Display and format a warning messages, gives file, line, position and * extra parameters. * - * @...: extra parameters for the message display - * * @param ctxt An XML parser context * @param msg the message to display/transmit + * @param ... extra parameters for the message display */ static void warningDebug(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...) @@ -1144,10 +1143,9 @@ warningDebug(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...) * Display and format a error messages, gives file, line, position and * extra parameters. * - * @...: extra parameters for the message display - * * @param ctxt An XML parser context * @param msg the message to display/transmit + * @param ... extra parameters for the message display */ static void errorDebug(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...) @@ -1167,10 +1165,9 @@ errorDebug(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...) * Display and format a fatalError messages, gives file, line, position and * extra parameters. * - * @...: extra parameters for the message display - * * @param ctxt An XML parser context * @param msg the message to display/transmit + * @param ... extra parameters for the message display */ static void fatalErrorDebug(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...) diff --git a/testlimits.c b/testlimits.c index 54b6c259..e951a8fd 100644 --- a/testlimits.c +++ b/testlimits.c @@ -758,10 +758,9 @@ commentCallback(void *ctx ATTRIBUTE_UNUSED, * Display and format a warning messages, gives file, line, position and * extra parameters. * - * @...: extra parameters for the message display - * * @param ctxt An XML parser context * @param msg the message to display/transmit + * @param ... extra parameters for the message display */ static void warningCallback(void *ctx ATTRIBUTE_UNUSED, @@ -774,10 +773,9 @@ warningCallback(void *ctx ATTRIBUTE_UNUSED, * Display and format a error messages, gives file, line, position and * extra parameters. * - * @...: extra parameters for the message display - * * @param ctxt An XML parser context * @param msg the message to display/transmit + * @param ... extra parameters for the message display */ static void errorCallback(void *ctx ATTRIBUTE_UNUSED, const char *msg ATTRIBUTE_UNUSED, @@ -790,10 +788,9 @@ errorCallback(void *ctx ATTRIBUTE_UNUSED, const char *msg ATTRIBUTE_UNUSED, * Display and format a fatalError messages, gives file, line, position and * extra parameters. * - * @...: extra parameters for the message display - * * @param ctxt An XML parser context * @param msg the message to display/transmit + * @param ... extra parameters for the message display */ static void fatalErrorCallback(void *ctx ATTRIBUTE_UNUSED, diff --git a/xmlstring.c b/xmlstring.c index 1c306d2e..4a152bc7 100644 --- a/xmlstring.c +++ b/xmlstring.c @@ -506,11 +506,10 @@ xmlStrcat(xmlChar *cur, const xmlChar *add) { /** * Formats `msg` and places result into `buf`. * - * @...: extra parameters for the message. - * * @param buf the result buffer. * @param len the result buffer length. * @param msg the message with printf formatting. + * @param ... extra parameters for the message. * @returns the number of characters written to `buf` or -1 if an error occurs. */ int @@ -672,11 +671,10 @@ xmlStrVASPrintf(xmlChar **out, int maxSize, const char *msg, va_list ap) { /** * See xmlStrVASPrintf(). * - * @...: arguments for format string - * * @param out pointer to the resulting string * @param maxSize maximum size of the output buffer * @param msg printf format string + * @param ... arguments for format string * @returns 0 on success, 1 if the result was truncated or on other * errors, -1 if a memory allocation failed. */ diff --git a/xmlwriter.c b/xmlwriter.c index 4939baa0..7eeca65d 100644 --- a/xmlwriter.c +++ b/xmlwriter.c @@ -822,10 +822,9 @@ xmlTextWriterEndComment(xmlTextWriterPtr writer) /** * Write an xml comment. * - * @...: extra parameters for the format - * * @param writer the xmlTextWriterPtr * @param format format string (see printf) + * @param ... extra parameters for the format * @returns the bytes written (may be 0 because of buffering) or -1 in case of error */ int @@ -1237,10 +1236,9 @@ xmlTextWriterFullEndElement(xmlTextWriterPtr writer) /** * Write a formatted raw xml text. * - * @...: extra parameters for the format - * * @param writer the xmlTextWriterPtr * @param format format string (see printf) + * @param ... extra parameters for the format * @returns the bytes written (may be 0 because of buffering) or -1 in case of error */ int @@ -1356,10 +1354,9 @@ xmlTextWriterWriteRaw(xmlTextWriterPtr writer, const xmlChar * content) /** * Write a formatted xml text. * - * @...: extra parameters for the format - * * @param writer the xmlTextWriterPtr * @param format format string (see printf) + * @param ... extra parameters for the format * @returns the bytes written (may be 0 because of buffering) or -1 in case of error */ int @@ -1880,11 +1877,10 @@ xmlTextWriterEndAttribute(xmlTextWriterPtr writer) /** * Write a formatted xml attribute. * - * @...: extra parameters for the format - * * @param writer the xmlTextWriterPtr * @param name attribute name * @param format format string (see printf) + * @param ... extra parameters for the format * @returns the bytes written (may be 0 because of buffering) or -1 in case of error */ int @@ -1968,13 +1964,12 @@ xmlTextWriterWriteAttribute(xmlTextWriterPtr writer, const xmlChar * name, /** * Write a formatted xml attribute.with namespace support * - * @...: extra parameters for the format - * * @param writer the xmlTextWriterPtr * @param prefix namespace prefix * @param name attribute local name * @param namespaceURI namespace URI * @param format format string (see printf) + * @param ... extra parameters for the format * @returns the bytes written (may be 0 because of buffering) or -1 in case of error */ int @@ -2073,11 +2068,10 @@ xmlTextWriterWriteAttributeNS(xmlTextWriterPtr writer, /** * Write a formatted xml element. * - * @...: extra parameters for the format - * * @param writer the xmlTextWriterPtr * @param name element name * @param format format string (see printf) + * @param ... extra parameters for the format * @returns the bytes written (may be 0 because of buffering) or -1 in case of error */ int @@ -2163,13 +2157,12 @@ xmlTextWriterWriteElement(xmlTextWriterPtr writer, const xmlChar * name, /** * Write a formatted xml element with namespace support. * - * @...: extra parameters for the format - * * @param writer the xmlTextWriterPtr * @param prefix namespace prefix * @param name element local name * @param namespaceURI namespace URI * @param format format string (see printf) + * @param ... extra parameters for the format * @returns the bytes written (may be 0 because of buffering) or -1 in case of error */ int @@ -2413,11 +2406,10 @@ xmlTextWriterEndPI(xmlTextWriterPtr writer) /** * Write a formatted PI. * - * @...: extra parameters for the format - * * @param writer the xmlTextWriterPtr * @param target PI target * @param format format string (see printf) + * @param ... extra parameters for the format * @returns the bytes written (may be 0 because of buffering) or -1 in case of error */ int @@ -2620,10 +2612,9 @@ xmlTextWriterEndCDATA(xmlTextWriterPtr writer) /** * Write a formatted xml CDATA. * - * @...: extra parameters for the format - * * @param writer the xmlTextWriterPtr * @param format format string (see printf) + * @param ... extra parameters for the format * @returns the bytes written (may be 0 because of buffering) or -1 in case of error */ int @@ -2917,13 +2908,12 @@ xmlTextWriterEndDTD(xmlTextWriterPtr writer) /** * Write a DTD with a formatted markup declarations part. * - * @...: extra parameters for the format - * * @param writer the xmlTextWriterPtr * @param name the name of the DTD * @param pubid the public identifier, which is an alternative to the system identifier * @param sysid the system identifier, which is the URI of the DTD * @param format format string (see printf) + * @param ... extra parameters for the format * @returns the bytes written (may be 0 because of buffering) or -1 in case of error */ int @@ -3154,11 +3144,10 @@ xmlTextWriterEndDTDElement(xmlTextWriterPtr writer) /** * Write a formatted DTD element. * - * @...: extra parameters for the format - * * @param writer the xmlTextWriterPtr * @param name the name of the DTD element * @param format format string (see printf) + * @param ... extra parameters for the format * @returns the bytes written (may be 0 because of buffering) or -1 in case of error */ int @@ -3382,11 +3371,10 @@ xmlTextWriterEndDTDAttlist(xmlTextWriterPtr writer) /** * Write a formatted DTD ATTLIST. * - * @...: extra parameters for the format - * * @param writer the xmlTextWriterPtr * @param name the name of the DTD ATTLIST * @param format format string (see printf) + * @param ... extra parameters for the format * @returns the bytes written (may be 0 because of buffering) or -1 in case of error */ int @@ -3630,12 +3618,11 @@ xmlTextWriterEndDTDEntity(xmlTextWriterPtr writer) /** * Write a formatted DTD internal entity. * - * @...: extra parameters for the format - * * @param writer the xmlTextWriterPtr * @param pe TRUE if this is a parameter entity, FALSE if not * @param name the name of the DTD entity * @param format format string (see printf) + * @param ... extra parameters for the format * @returns the bytes written (may be 0 because of buffering) or -1 in case of error */ int