* xmlTextWriterWriteVFormatPI: * @writer: the xmlTextWriterPtr * @target: PI target * @format: format string (see printf) * @argptr: pointer to the first member of the variable argument list. * * Write a formatted xml PI. * * Returns the bytes written (may be 0 because of buffering) or -1 in case of error */
| 2540 | * Returns the bytes written (may be 0 because of buffering) or -1 in case of error |
| 2541 | */ |
| 2542 | int |
| 2543 | xmlTextWriterWriteVFormatPI(xmlTextWriterPtr writer, |
| 2544 | const xmlChar * target, const char *format, |
| 2545 | va_list argptr) |
| 2546 | { |
| 2547 | int rc; |
| 2548 | xmlChar *buf; |
| 2549 | |
| 2550 | if (writer == NULL) |
| 2551 | return -1; |
| 2552 | |
| 2553 | buf = xmlTextWriterVSprintf(format, argptr); |
| 2554 | if (buf == NULL) |
| 2555 | return -1; |
| 2556 | |
| 2557 | rc = xmlTextWriterWritePI(writer, target, buf); |
| 2558 | |
| 2559 | xmlFree(buf); |
| 2560 | return rc; |
| 2561 | } |
| 2562 | |
| 2563 | /** |
| 2564 | * xmlTextWriterWritePI: |
no test coverage detected