* xmlTextWriterWriteIndent: * @writer: the xmlTextWriterPtr * * Write indent string. * * Returns -1 on error or the number of strings written. */
| 4645 | * Returns -1 on error or the number of strings written. |
| 4646 | */ |
| 4647 | static int |
| 4648 | xmlTextWriterWriteIndent(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: |
no test coverage detected