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

Function xmlTextWriterWriteIndent

ThirdParty/libxml2/vtklibxml2/xmlwriter.c:4647–4665  ·  view source on GitHub ↗

* xmlTextWriterWriteIndent: * @writer: the xmlTextWriterPtr * * Write indent string. * * Returns -1 on error or the number of strings written. */

Source from the content-addressed store, hash-verified

4645 * Returns -1 on error or the number of strings written.
4646 */
4647static int
4648xmlTextWriterWriteIndent(xmlTextWriterPtr writer)
4649{
4650 int lksize;
4651 int i;
4652 int ret;
4653
4654 lksize = xmlListSize(writer->nodes);
4655 if (lksize < 1)
4656 return (-1); /* list is empty */
4657 for (i = 0; i < (lksize - 1); i++) {
4658 ret = xmlOutputBufferWriteString(writer->out,
4659 (const char *) writer->ichar);
4660 if (ret == -1)
4661 return (-1);
4662 }
4663
4664 return (lksize - 1);
4665}
4666
4667/**
4668 * xmlTextWriterHandleStateDependencies:

Calls 2

xmlListSizeFunction · 0.85

Tested by

no test coverage detected