diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2010-05-07 19:37:33 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2010-05-07 19:37:33 (GMT) |
commit | a3b06c4fd310fdeda48a4730139cee09b5302072 (patch) | |
tree | 58636054e8f52c5851109b908053cc4da26b060a /src/outputgen.cpp | |
parent | 368c93a05bf38e440dba3f033f6e2e1cbeb2f379 (diff) | |
download | Doxygen-a3b06c4fd310fdeda48a4730139cee09b5302072.zip Doxygen-a3b06c4fd310fdeda48a4730139cee09b5302072.tar.gz Doxygen-a3b06c4fd310fdeda48a4730139cee09b5302072.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() |