MCPcopy Create free account
hub / github.com/Kitware/VTK / xmlTextWriterWriteVFormatElement

Function xmlTextWriterWriteVFormatElement

ThirdParty/libxml2/vtklibxml2/xmlwriter.c:2189–2208  ·  view source on GitHub ↗

* xmlTextWriterWriteVFormatElement: * @writer: the xmlTextWriterPtr * @name: element name * @format: format string (see printf) * @argptr: pointer to the first member of the variable argument list. * * Write a formatted xml element. * * Returns the bytes written (may be 0 because of buffering) or -1 in case of error */

Source from the content-addressed store, hash-verified

2187 * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
2188 */
2189int
2190xmlTextWriterWriteVFormatElement(xmlTextWriterPtr writer,
2191 const xmlChar * name, const char *format,
2192 va_list argptr)
2193{
2194 int rc;
2195 xmlChar *buf;
2196
2197 if (writer == NULL)
2198 return -1;
2199
2200 buf = xmlTextWriterVSprintf(format, argptr);
2201 if (buf == NULL)
2202 return -1;
2203
2204 rc = xmlTextWriterWriteElement(writer, name, buf);
2205
2206 xmlFree(buf);
2207 return rc;
2208}
2209
2210/**
2211 * xmlTextWriterWriteElement:

Callers 1

Calls 2

xmlTextWriterVSprintfFunction · 0.85

Tested by

no test coverage detected