diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2010-05-07 19:37:33 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2010-05-07 19:37:33 (GMT) |
commit | 0fb3f32dfd7ac31a2677d76647700cd3fb730ef6 (patch) | |
tree | 58636054e8f52c5851109b908053cc4da26b060a /src/outputgen.cpp | |
parent | 600fbfb8b03442ff97f4fb94964b2e0e11d14bd4 (diff) | |
download | Doxygen-0fb3f32dfd7ac31a2677d76647700cd3fb730ef6.zip Doxygen-0fb3f32dfd7ac31a2677d76647700cd3fb730ef6.tar.gz Doxygen-0fb3f32dfd7ac31a2677d76647700cd3fb730ef6.tar.bz2 |
Release-1.6.3-20100507
Diffstat (limited to 'src/outputgen.cpp')
-rw-r--r-- | src/outputgen.cpp | 50 |
1 files changed, 2 insertions, 48 deletions
diff --git a/src/outputgen.cpp b/src/outputgen.cpp index 0d19776..4e91156 100644 --- a/src/outputgen.cpp +++ b/src/outputgen.cpp @@ -26,10 +26,6 @@ OutputGenerator::OutputGenerator() { //printf("OutputGenerator::OutputGenerator()\n"); file=0; - b.setBuffer(a); - b.open( IO_WriteOnly ); - t.setDevice(&b); - t.setEncoding(QTextStream::UnicodeUTF8); active=TRUE; genStack = new QStack<bool>; genStack->setAutoDelete(TRUE); @@ -57,55 +53,13 @@ void OutputGenerator::startPlainFile(const char *name) err("Could not open file %s for writing\n",fileName.data()); exit(1); } - fs.setDevice(file); + t.setDevice(file); } void OutputGenerator::endPlainFile() { - bool converted=false; - if (!encoding.isEmpty()) - { - QByteArray enc(a.size()*4); - void *cd = portable_iconv_open(encoding,"UTF-8"); - if (cd!=(void *)(-1)) - { - size_t iLeft=a.size(); - size_t oLeft=enc.size(); - const char *inputPtr = a.data(); - char *outputPtr = enc.data(); - if (!portable_iconv(cd, &inputPtr, &iLeft, &outputPtr, &oLeft)) - { - enc.resize(enc.size()-oLeft); - postProcess(enc); - //printf("a.size()=%d enc.size()=%d iLeft=%d oLeft=%d enc2.size()=%d\n", - // a.size(),enc.size(),iLeft,oLeft,enc2.size()); - fs.writeRawBytes(enc.data(),enc.size()) ; // write string buffer to file - converted=TRUE; - } - portable_iconv_close(cd); - } - } - if (!converted) - { - //printf("endPlainFile(%s)\n",file->name()); - fs.writeRawBytes(a.data(),a.size()) ; // write string buffer to file - } - b.close(); - delete file; + delete file; file=0; - a.resize(0); - b.setBuffer(a); - b.open(IO_WriteOnly); - t.setDevice(&b); -} - -QCString OutputGenerator::getContents() const -{ - QCString s; - s.resize(a.size()+1); - memcpy(s.data(),a.data(),a.size()); - s.at(a.size())='\0'; - return s; } void OutputGenerator::pushGeneratorState() |