From 6382986b77d302be187d95aaa850eff132ec1d7d Mon Sep 17 00:00:00 2001 From: Tobias Off Date: Tue, 19 Nov 2019 13:01:27 +0100 Subject: Refactoring of portable.h and portable.cpp functions to be contained in a namespace Fixing some memory issues caused by not correctly freed pointers --- src/cite.cpp | 6 +- src/config.xml | 2 +- src/configimpl.l | 16 +-- src/context.cpp | 34 +++--- src/definition.cpp | 16 +-- src/dia.cpp | 18 ++-- src/diagram.cpp | 8 +- src/docparser.cpp | 10 +- src/doctokenizer.l | 2 +- src/dot.cpp | 18 ++-- src/dotgroupcollaboration.cpp | 10 ++ src/dotrunner.cpp | 14 +-- src/doxygen.cpp | 34 +++--- src/filedef.cpp | 4 +- src/formula.cpp | 32 +++--- src/htags.cpp | 6 +- src/message.cpp | 2 +- src/msc.cpp | 8 +- src/plantuml.cpp | 16 +-- src/portable.cpp | 234 +++++++++++++++++++----------------------- src/portable.h | 57 +++++----- src/pre.l | 2 +- src/util.cpp | 20 ++-- src/vhdldocgen.cpp | 4 +- 24 files changed, 288 insertions(+), 285 deletions(-) diff --git a/src/cite.cpp b/src/cite.cpp index f15f595..40084b6 100644 --- a/src/cite.cpp +++ b/src/cite.cpp @@ -235,14 +235,14 @@ void CiteDict::generatePage() const // 5. run bib2xhtml perl script on the generated file which will insert the // bibliography in citelist.doc int exitCode; - portable_sysTimerStop(); - if ((exitCode=portable_system("perl","\""+bib2xhtmlFile+"\" "+bibOutputFiles+" \""+ + Portables::sysTimerStop(); + if ((exitCode=Portables::system("perl","\""+bib2xhtmlFile+"\" "+bibOutputFiles+" \""+ citeListFile+"\"")) != 0) { err("Problems running bibtex. Verify that the command 'perl --version' works from the command line. Exit code: %d\n", exitCode); } - portable_sysTimerStop(); + Portables::sysTimerStop(); QDir::setCurrent(oldDir); diff --git a/src/config.xml b/src/config.xml index d206203..fb0e01a 100644 --- a/src/config.xml +++ b/src/config.xml @@ -953,7 +953,7 @@ Go to the next section or return to the ]]> -