1
0
mirror of https://github.com/aportelli/LatAnalyze.git synced 2024-09-20 05:25:37 +01:00

Plot: minor fix in temporary file management

This commit is contained in:
Antonin Portelli 2015-12-09 18:12:39 +00:00 committed by Antonin Portelli
parent ff968efd94
commit 6657cba5c8

View File

@ -65,14 +65,14 @@ void PlotObject::pushTmpFile(const std::string &fileName)
// PlotObject dump a matrix to a temporary file ////////////////////////////////
string PlotObject::dumpToTmpFile(const DMat &m)
{
char tmpFileName[MAX_PATH_LENGTH];
int fd;
FILE *tmpFile;
char tmpFileName[MAX_PATH_LENGTH];
int fd;
FILE *tmpFile;
for (Index j = 0; j < m.cols(); ++j)
{
}
strcpy(tmpFileName, "/tmp/latan_plot_tmp.XXXXXX.dat");
sprintf(tmpFileName, "%s/latan_plot_tmp.XXXXXX.dat", P_tmpdir);
fd = mkstemps(tmpFileName, 4);
if (fd == -1)
{
@ -384,6 +384,7 @@ void Plot::reset(void)
{
headCommand_.clear();
plotCommand_.clear();
tmpFileName_.clear();
initOptions();
}