* xmlTextWriterWriteVFormatComment: * @writer: the xmlTextWriterPtr * @format: format string (see printf) * @argptr: pointer to the first member of the variable argument list. * * Write an xml comment. * * Returns the bytes written (may be 0 because of buffering) or -1 in case of error */
| 882 | * Returns the bytes written (may be 0 because of buffering) or -1 in case of error |
| 883 | */ |
| 884 | int |
| 885 | xmlTextWriterWriteVFormatComment(xmlTextWriterPtr writer, |
| 886 | const char *format, va_list argptr) |
| 887 | { |
| 888 | int rc; |
| 889 | xmlChar *buf; |
| 890 | |
| 891 | if (writer == NULL) { |
| 892 | xmlWriterErrMsg(writer, XML_ERR_INTERNAL_ERROR, |
| 893 | "xmlTextWriterWriteVFormatComment : invalid writer!\n"); |
| 894 | return -1; |
| 895 | } |
| 896 | |
| 897 | buf = xmlTextWriterVSprintf(format, argptr); |
| 898 | if (buf == NULL) |
| 899 | return -1; |
| 900 | |
| 901 | rc = xmlTextWriterWriteComment(writer, buf); |
| 902 | |
| 903 | xmlFree(buf); |
| 904 | return rc; |
| 905 | } |
| 906 | |
| 907 | /** |
| 908 | * xmlTextWriterWriteComment: |
no test coverage detected