mirror of
https://github.com/aportelli/LatAnalyze.git
synced 2024-11-10 08:55:37 +00:00
Plot: minor fix in temporary file management
This commit is contained in:
parent
ff968efd94
commit
6657cba5c8
@ -65,14 +65,14 @@ void PlotObject::pushTmpFile(const std::string &fileName)
|
|||||||
// PlotObject dump a matrix to a temporary file ////////////////////////////////
|
// PlotObject dump a matrix to a temporary file ////////////////////////////////
|
||||||
string PlotObject::dumpToTmpFile(const DMat &m)
|
string PlotObject::dumpToTmpFile(const DMat &m)
|
||||||
{
|
{
|
||||||
char tmpFileName[MAX_PATH_LENGTH];
|
char tmpFileName[MAX_PATH_LENGTH];
|
||||||
int fd;
|
int fd;
|
||||||
FILE *tmpFile;
|
FILE *tmpFile;
|
||||||
|
|
||||||
for (Index j = 0; j < m.cols(); ++j)
|
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);
|
fd = mkstemps(tmpFileName, 4);
|
||||||
if (fd == -1)
|
if (fd == -1)
|
||||||
{
|
{
|
||||||
@ -384,6 +384,7 @@ void Plot::reset(void)
|
|||||||
{
|
{
|
||||||
headCommand_.clear();
|
headCommand_.clear();
|
||||||
plotCommand_.clear();
|
plotCommand_.clear();
|
||||||
|
tmpFileName_.clear();
|
||||||
initOptions();
|
initOptions();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user