diff --git a/dvisourcesplitter.cpp b/dvisourcesplitter.cpp index a9096ea37..a3b84127b 100644 --- a/dvisourcesplitter.cpp +++ b/dvisourcesplitter.cpp @@ -7,11 +7,13 @@ // #include - #include #include "dvisourcesplitter.h" +//#define DEBUG_SOURCESPLITTER + + DVI_SourceFileSplitter::DVI_SourceFileSplitter(const QString &srclink, const QString &dviFile) { QString filepart = srclink, linepart; @@ -19,7 +21,10 @@ DVI_SourceFileSplitter::DVI_SourceFileSplitter(const QString &srclink, const QSt //then there could be a mix up, i.e. src:123file.tex //line 123 and file.tex or line 12 and 3file.tex? - kdDebug() << "DVI_SourceSplitter: srclink " << srclink << endl; +#ifdef DEBUG_SOURCESPLITTER + kdDebug(4300) << "DVI_SourceSplitter: srclink " << srclink << endl; +#endif + //remove src: if necessary if ( filepart.left(4) == "src:" ) filepart = srclink.mid(4); @@ -36,8 +41,10 @@ DVI_SourceFileSplitter::DVI_SourceFileSplitter(const QString &srclink, const QSt filepart = filepart.stripWhiteSpace(); linepart = linepart.stripWhiteSpace(); +#ifdef DEBUG_SOURCESPLITTER kdDebug() << "DVI_SourceSplitter: filepart " << filepart << " linepart " << linepart << endl; - +#endif + //test if the file exists m_fileInfo.setFile(QFileInfo(dviFile).dir(true), filepart); bool fiExists = m_fileInfo.exists(); @@ -58,10 +65,14 @@ DVI_SourceFileSplitter::DVI_SourceFileSplitter(const QString &srclink, const QSt for ( index = 1; index < maxindex; ++index) { tempInfo.setFile(linepart.right(index) + tempFileName); +#ifdef DEBUG_SOURCESPLITTER kdDebug() << "DVI_SourceSplitter: trying " << tempInfo.fileName() << endl; +#endif if ( tempInfo.exists() ) { found = true; break;} tempInfo.setFile(linepart.right(index) + tempFileName + ".tex"); +#ifdef DEBUG_SOURCESPLITTER kdDebug() << "DVI_SourceSplitter: trying " << tempInfo.fileName() << endl; +#endif if ( tempInfo.exists() ) { found = true; break;} } @@ -76,5 +87,7 @@ DVI_SourceFileSplitter::DVI_SourceFileSplitter(const QString &srclink, const QSt m_line = linepart.toInt(&ok); if (!ok) m_line = 0; +#ifdef DEBUG_SOURCESPLITTER kdDebug() << "DVI_SourceSplitter: result: file " << m_fileInfo.absFilePath() << " line " << m_line << endl; +#endif } diff --git a/psgs.cpp b/psgs.cpp index e64a00646..c0ba67ac2 100644 --- a/psgs.cpp +++ b/psgs.cpp @@ -20,6 +20,7 @@ extern const char psheader[]; +//#define DEBUG_PSGS pageInfo::pageInfo(QString _PostScriptString) { @@ -55,8 +56,9 @@ ghostscript_interface::~ghostscript_interface() { void ghostscript_interface::setPostScript(PageNumber page, QString PostScript) { - - kdError(4300) << "ghostscript_interface::setPostScript( " << page << ", ... )" << endl; +#ifdef DEBUG_PSGS + kdDebug(4300) << "ghostscript_interface::setPostScript( " << page << ", ... )" << endl; +#endif if (pageList.find(page) == 0) { pageInfo *info = new pageInfo(PostScript); diff --git a/special.cpp b/special.cpp index 8472367eb..b222e275f 100644 --- a/special.cpp +++ b/special.cpp @@ -228,7 +228,6 @@ void parse_special_argument(QString strg, const char *argument_name, int *variab void dviRenderer::epsf_special(QString cp) { - kdError(4300) << "epsf-special: psfile=" << cp <