From 9450e98030627c38b0df37bd1d5501055c8a37f2 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Sun, 22 Dec 2019 16:54:58 +0100 Subject: Removed exitCode parameter as it is always 1 --- src/commentscan.l | 2 +- src/configimpl.l | 46 ++++++++++++++++++++++---------------------- src/defgen.cpp | 2 +- src/diagram.cpp | 2 +- src/docbookgen.cpp | 2 +- src/docsets.cpp | 8 ++++---- src/dot.cpp | 4 ++-- src/dotgfxhierarchytable.cpp | 2 +- src/dotgraph.cpp | 2 +- src/doxygen.cpp | 16 +++++++-------- src/eclipsehelp.cpp | 2 +- src/formula.cpp | 2 +- src/htmlgen.cpp | 2 +- src/htmlhelp.cpp | 6 +++--- src/latexgen.cpp | 6 +++--- src/mangen.cpp | 4 ++-- src/message.cpp | 18 ++--------------- src/message.h | 3 +-- src/outputgen.cpp | 2 +- src/perlmodgen.cpp | 2 +- src/qhp.cpp | 2 +- src/rtfgen.cpp | 2 +- src/util.cpp | 4 ++-- 23 files changed, 63 insertions(+), 78 deletions(-) diff --git a/src/commentscan.l b/src/commentscan.l index 89a97e3..35001c3 100644 --- a/src/commentscan.l +++ b/src/commentscan.l @@ -327,7 +327,7 @@ class DocCmdMapper { if (m_map.find(p->cmdName)!=0) { - term(1,"DocCmdMapper: command %s already added\n",p->cmdName); + term("DocCmdMapper: command %s already added\n",p->cmdName); } Cmd *cmd = new Cmd; cmd->func = p->handler; diff --git a/src/configimpl.l b/src/configimpl.l index 9aae6f6..4da1634 100644 --- a/src/configimpl.l +++ b/src/configimpl.l @@ -56,14 +56,14 @@ void config_err(const char *fmt, ...) vfprintf(stderr, (QCString(error_str) + fmt).data(), args); va_end(args); } -void config_term(const int exitVal, const char *fmt, ...) +void config_term(const char *fmt, ...) { va_list args; va_start(args, fmt); vfprintf(stderr, (QCString(error_str) + fmt).data(), args); va_end(args); fprintf(stderr, "%s\n", "Exiting..."); - exit(exitVal); + exit(1); } void config_warn(const char *fmt, ...) @@ -223,11 +223,11 @@ QCString &ConfigImpl::getString(const char *fileName,int num,const char *name) c ConfigOption *opt = m_dict->find(name); if (opt==0) { - config_term(1,"%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name); + config_term("%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name); } else if (opt->kind()!=ConfigOption::O_String) { - config_term(1,"%s<%d>: Internal error: Requested option %s not of string type!\n",fileName,num,name); + config_term("%s<%d>: Internal error: Requested option %s not of string type!\n",fileName,num,name); } return *((ConfigString *)opt)->valueRef(); } @@ -237,11 +237,11 @@ QStrList &ConfigImpl::getList(const char *fileName,int num,const char *name) con ConfigOption *opt = m_dict->find(name); if (opt==0) { - config_term(1,"%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name); + config_term("%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name); } else if (opt->kind()!=ConfigOption::O_List) { - config_term(1,"%s<%d>: Internal error: Requested option %s not of list type!\n",fileName,num,name); + config_term("%s<%d>: Internal error: Requested option %s not of list type!\n",fileName,num,name); } return *((ConfigList *)opt)->valueRef(); } @@ -251,11 +251,11 @@ QCString &ConfigImpl::getEnum(const char *fileName,int num,const char *name) con ConfigOption *opt = m_dict->find(name); if (opt==0) { - config_term(1,"%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name); + config_term("%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name); } else if (opt->kind()!=ConfigOption::O_Enum) { - config_term(1,"%s<%d>: Internal error: Requested option %s not of enum type!\n",fileName,num,name); + config_term("%s<%d>: Internal error: Requested option %s not of enum type!\n",fileName,num,name); } return *((ConfigEnum *)opt)->valueRef(); } @@ -265,11 +265,11 @@ int &ConfigImpl::getInt(const char *fileName,int num,const char *name) const ConfigOption *opt = m_dict->find(name); if (opt==0) { - config_term(1,"%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name); + config_term("%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name); } else if (opt->kind()!=ConfigOption::O_Int) { - config_term(1,"%s<%d>: Internal error: Requested option %s not of integer type!\n",fileName,num,name); + config_term("%s<%d>: Internal error: Requested option %s not of integer type!\n",fileName,num,name); } return *((ConfigInt *)opt)->valueRef(); } @@ -279,11 +279,11 @@ bool &ConfigImpl::getBool(const char *fileName,int num,const char *name) const ConfigOption *opt = m_dict->find(name); if (opt==0) { - config_term(1,"%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name); + config_term("%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name); } else if (opt->kind()!=ConfigOption::O_Bool) { - config_term(1,"%s<%d>: Internal error: Requested option %s not of boolean type!\n",fileName,num,name); + config_term("%s<%d>: Internal error: Requested option %s not of boolean type!\n",fileName,num,name); } return *((ConfigBool *)opt)->valueRef(); } @@ -566,7 +566,7 @@ static QCString configStringRecode( void *cd = portable_iconv_open(outputEncoding,inputEncoding); if (cd==(void *)(-1)) { - config_term(1,"Error: unsupported character conversion: '%s'->'%s'\n", + config_term("Error: unsupported character conversion: '%s'->'%s'\n", inputEncoding.data(),outputEncoding.data()); } size_t iLeft=(size_t)inputSize; @@ -582,7 +582,7 @@ static QCString configStringRecode( } else { - config_term(1,"Error: failed to translate characters from %s to %s: %s\n", + config_term("Error: failed to translate characters from %s to %s: %s\n", inputEncoding.data(),outputEncoding.data(),strerror(errno)); } portable_iconv_close(cd); @@ -636,7 +636,7 @@ static FILE *findFile(const char *fileName) static void readIncludeFile(const char *incName) { if (includeDepth==MAX_INCLUDE_DEPTH) { - config_term(1,"maximum include depth (%d) reached, %s is not included. Aborting...\n", + config_term("maximum include depth (%d) reached, %s is not included. Aborting...\n", MAX_INCLUDE_DEPTH,incName); } @@ -675,7 +675,7 @@ static void readIncludeFile(const char *incName) } else { - config_term(1,"@INCLUDE = %s: not found!\n",inc.data()); + config_term("@INCLUDE = %s: not found!\n",inc.data()); } } @@ -1157,7 +1157,7 @@ void ConfigImpl::init() ConfigOption * opt = ConfigImpl::instance()->get(depName); if (opt==0) { - config_term(1,"Config option '%s' has invalid depends relation on unknown option '%s'\n", + config_term("Config option '%s' has invalid depends relation on unknown option '%s'\n", option->name().data(),depName.data()); } } @@ -1224,7 +1224,7 @@ static QCString configFileToString(const char *name) } if (!fileOpened) { - config_term(1,"cannot open file '%s' for reading\n",name); + config_term("cannot open file '%s' for reading\n",name); } return ""; } @@ -1434,7 +1434,7 @@ void Config::checkAndCorrect() QFileInfo fi(headerFile); if (!fi.exists()) { - term(1,"tag HTML_HEADER: header file '%s' " + config_term("tag HTML_HEADER: header file '%s' " "does not exist\n",headerFile.data()); } } @@ -1445,7 +1445,7 @@ void Config::checkAndCorrect() QFileInfo fi(footerFile); if (!fi.exists()) { - term(1,"tag HTML_FOOTER: footer file '%s' " + config_term("tag HTML_FOOTER: footer file '%s' " "does not exist\n",footerFile.data()); } } @@ -1459,7 +1459,7 @@ void Config::checkAndCorrect() QFileInfo fi(MathJaxCodefile); if (!fi.exists()) { - term(1,"tag MATHJAX_CODEFILE file '%s' " + config_term("tag MATHJAX_CODEFILE file '%s' " "does not exist\n",MathJaxCodefile.data()); } } @@ -1478,7 +1478,7 @@ void Config::checkAndCorrect() QFileInfo fi(latexHeaderFile); if (!fi.exists()) { - term(1,"tag LATEX_HEADER: header file '%s' " + config_term("tag LATEX_HEADER: header file '%s' " "does not exist\n",latexHeaderFile.data()); } } @@ -1489,7 +1489,7 @@ void Config::checkAndCorrect() QFileInfo fi(latexFooterFile); if (!fi.exists()) { - term(1,"tag LATEX_FOOTER: footer file '%s' " + config_term("tag LATEX_FOOTER: footer file '%s' " "does not exist\n",latexFooterFile.data()); } } diff --git a/src/defgen.cpp b/src/defgen.cpp index 23fb674..b145f0e 100644 --- a/src/defgen.cpp +++ b/src/defgen.cpp @@ -572,7 +572,7 @@ void generateDEF() dir.setPath(QDir::currentDirPath()); if (!dir.mkdir(outputDirectory)) { - term(1,"tag OUTPUT_DIRECTORY: Output directory '%s' does not " + term("tag OUTPUT_DIRECTORY: Output directory '%s' does not " "exist and cannot be created\n",outputDirectory.data()); } else diff --git a/src/diagram.cpp b/src/diagram.cpp index cce06ab..18817e9 100644 --- a/src/diagram.cpp +++ b/src/diagram.cpp @@ -1101,7 +1101,7 @@ void ClassDiagram::writeFigure(FTextStream &output,const char *path, f1.setName(epsName.data()); if (!f1.open(IO_WriteOnly)) { - term(1,"Could not open file %s for writing\n",f1.name().data()); + term("Could not open file %s for writing\n",f1.name().data()); } FTextStream t(&f1); diff --git a/src/docbookgen.cpp b/src/docbookgen.cpp index 8040c92..51f37db 100644 --- a/src/docbookgen.cpp +++ b/src/docbookgen.cpp @@ -289,7 +289,7 @@ void DocbookGenerator::init() QDir d(dir); if (!d.exists() && !d.mkdir(dir)) { - term(1,"Could not create output directory %s\n",dir.data()); + term("Could not create output directory %s\n",dir.data()); } createSubDirs(d); diff --git a/src/docsets.cpp b/src/docsets.cpp index b33aea5..439e924 100644 --- a/src/docsets.cpp +++ b/src/docsets.cpp @@ -62,7 +62,7 @@ void DocSets::initialize() QFile makefile(mfName); if (!makefile.open(IO_WriteOnly)) { - term(1,"Could not open file %s for writing\n",mfName.data()); + term("Could not open file %s for writing\n",mfName.data()); } FTextStream ts(&makefile); @@ -112,7 +112,7 @@ void DocSets::initialize() QFile plist(plName); if (!plist.open(IO_WriteOnly)) { - term(1,"Could not open file %s for writing\n",plName.data()); + term("Could not open file %s for writing\n",plName.data()); } FTextStream ts(&plist); @@ -147,7 +147,7 @@ void DocSets::initialize() m_nf = new QFile(notes); if (!m_nf->open(IO_WriteOnly)) { - term(1,"Could not open file %s for writing\n",notes.data()); + term("Could not open file %s for writing\n",notes.data()); } //QCString indexName=Config_getBool(GENERATE_TREEVIEW)?"main":"index"; QCString indexName="index"; @@ -167,7 +167,7 @@ void DocSets::initialize() m_tf = new QFile(tokens); if (!m_tf->open(IO_WriteOnly)) { - term(1,"Could not open file %s for writing\n",tokens.data()); + term("Could not open file %s for writing\n",tokens.data()); } m_tts.setDevice(m_tf); m_tts << "" << endl; diff --git a/src/dot.cpp b/src/dot.cpp index 2ba5e92..f26bee4 100644 --- a/src/dot.cpp +++ b/src/dot.cpp @@ -272,7 +272,7 @@ void writeDotGraphFromFile(const char *inFile,const char *outDir, QDir d(outDir); if (!d.exists()) { - term(1,"Output dir %s does not exist!\n",outDir); + term("Output dir %s does not exist!\n",outDir); } QCString imgExt = getDotImageExtension(); @@ -325,7 +325,7 @@ void writeDotImageMapFromFile(FTextStream &t, QDir d(outDir); if (!d.exists()) { - term(1,"Output dir %s does not exist!\n",outDir.data()); + term("Output dir %s does not exist!\n",outDir.data()); } QCString mapName = baseName+".map"; diff --git a/src/dotgfxhierarchytable.cpp b/src/dotgfxhierarchytable.cpp index df9f48f..3d56de8 100644 --- a/src/dotgfxhierarchytable.cpp +++ b/src/dotgfxhierarchytable.cpp @@ -86,7 +86,7 @@ void DotGfxHierarchyTable::writeGraph(FTextStream &out, // store the original directory if (!d.exists()) { - term(1,"Output dir %s does not exist!\n",path); + term("Output dir %s does not exist!\n",path); } // put each connected subgraph of the hierarchy in a row of the HTML output diff --git a/src/dotgraph.cpp b/src/dotgraph.cpp index c17523b..0bfa712 100644 --- a/src/dotgraph.cpp +++ b/src/dotgraph.cpp @@ -147,7 +147,7 @@ bool DotGraph::prepareDotFile() { if (!m_dir.exists()) { - term(1,"Output dir %s does not exist!\n", m_dir.path().data()); + term("Output dir %s does not exist!\n", m_dir.path().data()); } QCString sigStr(33); diff --git a/src/doxygen.cpp b/src/doxygen.cpp index f42838f..ed1c5a8 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -8584,7 +8584,7 @@ static void computePageRelations(Entry *root) PageDef *subPd = Doxygen::pageSDict->find(bi.name); if (pd==subPd) { - term(1,"page defined at line %d of file %s with label %s is a direct " + term("page defined at line %d of file %s with label %s is a direct " "subpage of itself! Please remove this cyclic dependency.\n", pd->docLine(),pd->docFile().data(),pd->name().data()); } @@ -8611,7 +8611,7 @@ static void checkPageRelations() { if (ppd==pd) { - term(1,"page defined at line %d of file %s with label %s is a subpage " + term("page defined at line %d of file %s with label %s is a subpage " "of itself! Please remove this cyclic dependency.\n", pd->docLine(),pd->docFile().data(),pd->name().data()); } @@ -8946,7 +8946,7 @@ static void generateConfigFile(const char *configFile,bool shortList, } else { - term(1,"Cannot open file %s for writing\n",configFile); + term("Cannot open file %s for writing\n",configFile); } } static void compareDoxyfile() @@ -8963,7 +8963,7 @@ static void compareDoxyfile() } else { - term(1,"Cannot open file %s for writing\n",configFile); + term("Cannot open file %s for writing\n",configFile); } } //---------------------------------------------------------------------------- @@ -9602,14 +9602,14 @@ void readFormulaRepository(QCString dir, bool cmp) { if ((f=Doxygen::formulaDict->find(formText))==0) { - term(1,"discrepancy between formula repositories! Remove " + term("discrepancy between formula repositories! Remove " "formula.repository and from_* files from output directories."); } QCString formLabel; formLabel.sprintf("\\form#%d",f->getId()); if (formLabel != formName) { - term(1,"discrepancy between formula repositories! Remove " + term("discrepancy between formula repositories! Remove " "formula.repository and from_* files from output directories."); } new_repository++; @@ -9627,7 +9627,7 @@ void readFormulaRepository(QCString dir, bool cmp) } if (cmp && (current_repository != new_repository)) { - term(1,"size discrepancy between formula repositories! Remove " + term("size discrepancy between formula repositories! Remove " "formula.repository and from_* files from output directories."); } } @@ -11468,7 +11468,7 @@ void generateOutput() QDir searchDir(searchDirName); if (!searchDir.exists() && !searchDir.mkdir(searchDirName)) { - term(1,"Could not create search results directory '%s' $PWD='%s'\n", + term("Could not create search results directory '%s' $PWD='%s'\n", searchDirName.data(),QDir::currentDirPath().data()); } HtmlGenerator::writeSearchData(searchDirName); diff --git a/src/eclipsehelp.cpp b/src/eclipsehelp.cpp index 04f2947..bbb3b01 100644 --- a/src/eclipsehelp.cpp +++ b/src/eclipsehelp.cpp @@ -72,7 +72,7 @@ void EclipseHelp::initialize() m_tocfile = new QFile(name); if (!m_tocfile->open(IO_WriteOnly)) { - term(1,"Could not open file %s for writing\n", name.data()); + term("Could not open file %s for writing\n", name.data()); } // -- initialize its text stream diff --git a/src/formula.cpp b/src/formula.cpp index d74681a..77085f8 100644 --- a/src/formula.cpp +++ b/src/formula.cpp @@ -53,7 +53,7 @@ void FormulaList::generateBitmaps(const char *path) // store the original directory if (!d.exists()) { - term(1,"Output dir %s does not exist!\n",path); + term("Output dir %s does not exist!\n",path); } QCString oldDir = QDir::currentDirPath().utf8(); // go to the html output directory (i.e. path) diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index 926e04d..d47a38c 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -728,7 +728,7 @@ void HtmlGenerator::init() QDir d(dname); if (!d.exists() && !d.mkdir(dname)) { - term(1,"Could not create output directory %s\n",dname.data()); + term("Could not create output directory %s\n",dname.data()); } //writeLogo(dname); if (!Config_getString(HTML_HEADER).isEmpty()) diff --git a/src/htmlhelp.cpp b/src/htmlhelp.cpp index 6101984..066e6f7 100644 --- a/src/htmlhelp.cpp +++ b/src/htmlhelp.cpp @@ -308,7 +308,7 @@ void HtmlHelp::initialize() m_fromUtf8 = portable_iconv_open(str,"UTF-8"); if (m_fromUtf8==(void *)(-1)) { - term(1,"unsupported character conversion for CHM_INDEX_ENCODING: '%s'->'UTF-8'\n", str); + term("unsupported character conversion for CHM_INDEX_ENCODING: '%s'->'UTF-8'\n", str); } /* open the contents file */ @@ -316,7 +316,7 @@ void HtmlHelp::initialize() cf = new QFile(fName); if (!cf->open(IO_WriteOnly)) { - term(1,"Could not open file %s for writing\n",fName.data()); + term("Could not open file %s for writing\n",fName.data()); } /* Write the header of the contents file */ cts.setDevice(cf); @@ -332,7 +332,7 @@ void HtmlHelp::initialize() kf = new QFile(fName); if (!kf->open(IO_WriteOnly)) { - term(1,"Could not open file %s for writing\n",fName.data()); + term("Could not open file %s for writing\n",fName.data()); } /* Write the header of the contents file */ kts.setDevice(kf); diff --git a/src/latexgen.cpp b/src/latexgen.cpp index 27be5b3..addde4c 100644 --- a/src/latexgen.cpp +++ b/src/latexgen.cpp @@ -288,7 +288,7 @@ static void writeLatexMakefile() QFile file(fileName); if (!file.open(IO_WriteOnly)) { - term(1,"Could not open file %s for writing\n",fileName.data()); + term("Could not open file %s for writing\n",fileName.data()); } // inserted by KONNO Akihisa 2002-03-05 QCString latex_command = theTranslator->latexCommandName(); @@ -386,7 +386,7 @@ static void writeMakeBat() bool generateBib = !Doxygen::citeDict->isEmpty(); if (!file.open(IO_WriteOnly)) { - term(1,"Could not open file %s for writing\n",fileName.data()); + term("Could not open file %s for writing\n",fileName.data()); } FTextStream t(&file); t << "set Dir_Old=%cd%\n"; @@ -466,7 +466,7 @@ void LatexGenerator::init() QDir d(dir); if (!d.exists() && !d.mkdir(dir)) { - term(1,"Could not create output directory %s\n",dir.data()); + term("Could not create output directory %s\n",dir.data()); } writeLatexMakefile(); diff --git a/src/mangen.cpp b/src/mangen.cpp index f4eba20..832863e 100644 --- a/src/mangen.cpp +++ b/src/mangen.cpp @@ -112,12 +112,12 @@ void ManGenerator::init() QDir d(manOutput); if (!d.exists() && !d.mkdir(manOutput)) { - term(1,"Could not create output directory %s\n",manOutput.data()); + term("Could not create output directory %s\n",manOutput.data()); } d.setPath(manOutput + "/" + getSubdir()); if (!d.exists() && !d.mkdir(manOutput + "/" + getSubdir())) { - term(1,"Could not create output directory %s/%s\n",manOutput.data(), getSubdir().data()); + term("Could not create output directory %s/%s\n",manOutput.data(), getSubdir().data()); } createSubDirs(d); } diff --git a/src/message.cpp b/src/message.cpp index 70bcaac..d8f83ef 100644 --- a/src/message.cpp +++ b/src/message.cpp @@ -251,7 +251,7 @@ extern void err_full(const char *file,int line,const char *fmt, ...) va_end(args); } -void term(const int exitVal, const char *fmt, ...) +void term(const char *fmt, ...) { va_list args; va_start(args, fmt); @@ -262,21 +262,7 @@ void term(const int exitVal, const char *fmt, ...) for (int i = 0; i < strlen(error_str); i++) fprintf(warnFile, " "); fprintf(warnFile, "%s\n", "Exiting..."); } - exit(exitVal); -} - -extern void term_full(const int exitVal, const char *file,int line,const char *fmt, ...) -{ - va_list args; - va_start(args, fmt); - do_warn(TRUE, file, line, error_str, fmt, args); - va_end(args); - if (warnFile != stderr) - { - for (int i = 0; i < strlen(error_str); i++) fprintf(warnFile, " "); - fprintf(warnFile, "%s\n", "Exiting..."); - } - exit(exitVal); + exit(1); } void printlex(int dbg, bool enter, const char *lexName, const char *fileName) diff --git a/src/message.h b/src/message.h index 56e7e27..7b12ba8 100644 --- a/src/message.h +++ b/src/message.h @@ -30,8 +30,7 @@ extern void warn_doc_error(const char *file,int line,const char *fmt, ...); extern void warn_uncond(const char *fmt, ...); extern void err(const char *fmt, ...); extern void err_full(const char *file,int line,const char *fmt, ...); -extern void term(const int exitVal, const char *fmt, ...); -extern void term_full(const int exitVal, const char *file,int line,const char *fmt, ...); +extern void term(const char *fmt, ...); void initWarningFormat(); extern void printlex(int dbg, bool enter, const char *lexName, const char *fileName); diff --git a/src/outputgen.cpp b/src/outputgen.cpp index ea8fd5e..f54eaf1 100644 --- a/src/outputgen.cpp +++ b/src/outputgen.cpp @@ -46,7 +46,7 @@ void OutputGenerator::startPlainFile(const char *name) file = new QFile(fileName); if (!file->open(IO_WriteOnly)) { - term(1,"Could not open file %s for writing\n",fileName.data()); + term("Could not open file %s for writing\n",fileName.data()); } t.setDevice(file); } diff --git a/src/perlmodgen.cpp b/src/perlmodgen.cpp index bf20d45..97b3d3d 100644 --- a/src/perlmodgen.cpp +++ b/src/perlmodgen.cpp @@ -2271,7 +2271,7 @@ bool PerlModGenerator::createOutputDir(QDir &perlModDir) dir.setPath(QDir::currentDirPath()); if (!dir.mkdir(outputDirectory)) { - term(1,"tag OUTPUT_DIRECTORY: Output directory '%s' does not " + term("tag OUTPUT_DIRECTORY: Output directory '%s' does not " "exist and cannot be created\n",outputDirectory.data()); } else diff --git a/src/qhp.cpp b/src/qhp.cpp index 484475c..50f43ff 100644 --- a/src/qhp.cpp +++ b/src/qhp.cpp @@ -168,7 +168,7 @@ void Qhp::finalize() QFile file(fileName); if (!file.open(IO_WriteOnly)) { - term(1,"Could not open file %s for writing\n", fileName.data()); + term("Could not open file %s for writing\n", fileName.data()); } m_doc.dumpTo(file); } diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp index 2702cca..efc0f63 100644 --- a/src/rtfgen.cpp +++ b/src/rtfgen.cpp @@ -175,7 +175,7 @@ void RTFGenerator::init() QDir d(dir); if (!d.exists() && !d.mkdir(dir)) { - term(1,"Could not create output directory %s\n",dir.data()); + term("Could not create output directory %s\n",dir.data()); } rtf_Style.setAutoDelete(TRUE); diff --git a/src/util.cpp b/src/util.cpp index 9cff297..4c3ebb0 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -7958,7 +7958,7 @@ static int transcodeCharacterBuffer(const char *fileName,BufStr &srcBuf,int size void *cd = portable_iconv_open(outputEncoding,inputEncoding); if (cd==(void *)(-1)) { - term(1,"unsupported character conversion: '%s'->'%s': %s\n" + term("unsupported character conversion: '%s'->'%s': %s\n" "Check the INPUT_ENCODING setting in the config file!\n", inputEncoding,outputEncoding,strerror(errno)); } @@ -7978,7 +7978,7 @@ static int transcodeCharacterBuffer(const char *fileName,BufStr &srcBuf,int size } else { - term(1,"%s: failed to translate characters from %s to %s: check INPUT_ENCODING\n", + term("%s: failed to translate characters from %s to %s: check INPUT_ENCODING\n", fileName,inputEncoding,outputEncoding); } portable_iconv_close(cd); -- cgit v0.12