delete the plt and data files after writing eps or png
(only if gnuplot_terminal is set to eps/quit of png/quit)
This commit is contained in:
parent
8efa08602a
commit
52584312c3
|
|
@ -16,7 +16,12 @@
|
||||||
#include "ngspice/dvec.h"
|
#include "ngspice/dvec.h"
|
||||||
#include "ngspice/fteparse.h"
|
#include "ngspice/fteparse.h"
|
||||||
#include "gnuplot.h"
|
#include "gnuplot.h"
|
||||||
|
#if defined(__MINGW32__) || defined(_MSC_VER)
|
||||||
|
#undef BOOLEAN
|
||||||
|
#include <windows.h>
|
||||||
|
#else
|
||||||
|
#include <unistd.h.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#define GP_MAXVECTORS 64
|
#define GP_MAXVECTORS 64
|
||||||
|
|
||||||
|
|
@ -338,6 +343,23 @@ ft_gnuplot(double *xlims, double *ylims, char *filename, char *title, char *xlab
|
||||||
#endif
|
#endif
|
||||||
err = system(buf);
|
err = system(buf);
|
||||||
|
|
||||||
|
/* delete the plt and data files */
|
||||||
|
if ((terminal_type == 3) || (terminal_type == 5)) {
|
||||||
|
/* wait for gnuplot generating eps or png file */
|
||||||
|
#if defined(__MINGW32__) || defined(_MSC_VER)
|
||||||
|
Sleep(200);
|
||||||
|
#else
|
||||||
|
usleep(200000);
|
||||||
|
#endif
|
||||||
|
if (remove(filename_data)) {
|
||||||
|
fprintf(stderr, "Could not remove file %s\n", filename_data);
|
||||||
|
perror(NULL);
|
||||||
|
}
|
||||||
|
if (remove(filename_plt)) {
|
||||||
|
fprintf(stderr, "Could not remove file %s\n", filename_plt);
|
||||||
|
perror(NULL);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue