use 4 spaces to indent XML output

This commit is contained in:
Sebastian Hoogen 2014-12-10 01:01:35 +01:00
parent d4a5249b4b
commit fc14611c93
2 changed files with 14 additions and 8 deletions

View File

@ -163,19 +163,25 @@ const std::vector<std::string>& Writer::getFilenames() const
void Writer::incInd(void)
{
if (indent < 255) {
indBuf[indent] = '\t';
indBuf[indent+1] = '\0';
indent++;
if (indent < 1020) {
indBuf[indent ] = ' ';
indBuf[indent+1] = ' ';
indBuf[indent+2] = ' ';
indBuf[indent+3] = ' ';
indBuf[indent+4] = '\0';
indent += 4;
}
}
void Writer::decInd(void)
{
if (indent > 0) {
indent--;
indBuf[indent] = '\0';
if (indent >= 4) {
indent -= 4;
}
else {
indent = 0;
}
indBuf[indent] = '\0';
}
ZipWriter::ZipWriter(const char* FileName)

View File

@ -105,7 +105,7 @@ protected:
std::vector<std::string> FileNames;
short indent;
char indBuf[256];
char indBuf[1024];
bool forceXML;
int fileVersion;