summaryrefslogtreecommitdiffstats
path: root/src/formula.cpp
diff options
context:
space:
mode:
authorTobias Off <tobias.off@redheads.de>2019-11-19 12:01:27 (GMT)
committerTobias Off <tobias.off@redheads.de>2019-11-28 09:43:57 (GMT)
commit6382986b77d302be187d95aaa850eff132ec1d7d (patch)
tree37babfa1b0b12db5ccdb7fa4f386690e6e949a66 /src/formula.cpp
parent2972f6ddc491f615f814b1277ec715b6f707c419 (diff)
downloadDoxygen-6382986b77d302be187d95aaa850eff132ec1d7d.zip
Doxygen-6382986b77d302be187d95aaa850eff132ec1d7d.tar.gz
Doxygen-6382986b77d302be187d95aaa850eff132ec1d7d.tar.bz2
Refactoring of portable.h and portable.cpp functions to be contained in a namespace
Fixing some memory issues caused by not correctly freed pointers
Diffstat (limited to 'src/formula.cpp')
-rw-r--r--src/formula.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/formula.cpp b/src/formula.cpp
index 3d8e6ce..9224c56 100644
--- a/src/formula.cpp
+++ b/src/formula.cpp
@@ -100,15 +100,15 @@ void FormulaList::generateBitmaps(const char *path)
//printf("Running latex...\n");
//system("latex _formulas.tex </dev/null >/dev/null");
QCString latexCmd = "latex";
- portable_sysTimerStart();
- if (portable_system(latexCmd,"_formulas.tex")!=0)
+ Portables::sysTimerStart();
+ if (Portables::system(latexCmd,"_formulas.tex")!=0)
{
err("Problems running latex. Check your installation or look "
"for typos in _formulas.tex and check _formulas.log!\n");
formulaError=TRUE;
//return;
}
- portable_sysTimerStop();
+ Portables::sysTimerStop();
//printf("Running dvips...\n");
QListIterator<int> pli(pagesToGenerate);
int *pagePtr;
@@ -125,27 +125,27 @@ void FormulaList::generateBitmaps(const char *path)
// postscript file.
sprintf(dviArgs,"-q -D 600 -n 1 -p %d -o %s_tmp.ps _formulas.dvi",
pageIndex,formBase.data());
- portable_sysTimerStart();
- if (portable_system("dvips",dviArgs)!=0)
+ Portables::sysTimerStart();
+ if (Portables::system("dvips",dviArgs)!=0)
{
err("Problems running dvips. Check your installation!\n");
- portable_sysTimerStop();
+ Portables::sysTimerStop();
QDir::setCurrent(oldDir);
return;
}
- portable_sysTimerStop();
+ Portables::sysTimerStop();
// run ps2epsi to convert to an encapsulated postscript file with
// boundingbox (dvips with -E has some problems here).
sprintf(psArgs,"%s_tmp.ps %s.eps",formBase.data(),formBase.data());
- portable_sysTimerStart();
- if (portable_system("ps2epsi",psArgs)!=0)
+ Portables::sysTimerStart();
+ if (Portables::system("ps2epsi",psArgs)!=0)
{
err("Problems running ps2epsi. Check your installation!\n");
- portable_sysTimerStop();
+ Portables::sysTimerStop();
QDir::setCurrent(oldDir);
return;
}
- portable_sysTimerStop();
+ Portables::sysTimerStop();
// now we read the generated postscript file to extract the bounding box
QFileInfo fi(formBase+".eps");
if (fi.exists())
@@ -198,15 +198,15 @@ void FormulaList::generateBitmaps(const char *path)
gx,gy,(int)(scaleFactor*72),(int)(scaleFactor*72),
formBase.data(),formBase.data()
);
- portable_sysTimerStart();
- if (portable_system(portable_ghostScriptCommand(),gsArgs)!=0)
+ Portables::sysTimerStart();
+ if (Portables::system(Portables::ghostScriptCommand(),gsArgs)!=0)
{
- err("Problem running ghostscript %s %s. Check your installation!\n",portable_ghostScriptCommand(),gsArgs);
- portable_sysTimerStop();
+ err("Problem running ghostscript %s %s. Check your installation!\n",Portables::ghostScriptCommand(),gsArgs);
+ Portables::sysTimerStop();
QDir::setCurrent(oldDir);
return;
}
- portable_sysTimerStop();
+ Portables::sysTimerStop();
f.setName(formBase+".pnm");
uint imageX=0,imageY=0;
// we read the generated image again, to obtain the pixel data.