gnuplot.c, ft_writesimple(), command 'wrdate', use the given filename literally
This commit is contained in:
parent
c260a83114
commit
c44c96c0d0
|
|
@ -307,8 +307,6 @@ ft_writesimple(double *xlims, double *ylims, char *filename, char *title, char *
|
||||||
int i, numVecs;
|
int i, numVecs;
|
||||||
bool appendwrite;
|
bool appendwrite;
|
||||||
|
|
||||||
char filename_data[128];
|
|
||||||
|
|
||||||
NG_IGNORE(xlims);
|
NG_IGNORE(xlims);
|
||||||
NG_IGNORE(ylims);
|
NG_IGNORE(ylims);
|
||||||
NG_IGNORE(title);
|
NG_IGNORE(title);
|
||||||
|
|
@ -317,7 +315,6 @@ ft_writesimple(double *xlims, double *ylims, char *filename, char *title, char *
|
||||||
NG_IGNORE(gridtype);
|
NG_IGNORE(gridtype);
|
||||||
NG_IGNORE(plottype);
|
NG_IGNORE(plottype);
|
||||||
|
|
||||||
sprintf(filename_data, "%s.data", filename);
|
|
||||||
appendwrite = cp_getvar("appendwrite", CP_BOOL, NULL);
|
appendwrite = cp_getvar("appendwrite", CP_BOOL, NULL);
|
||||||
|
|
||||||
/* Sanity checking. */
|
/* Sanity checking. */
|
||||||
|
|
@ -328,7 +325,7 @@ ft_writesimple(double *xlims, double *ylims, char *filename, char *title, char *
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Open the output data file. */
|
/* Open the output data file. */
|
||||||
if ((file_data = fopen(filename_data, appendwrite ? "a" : "w")) == NULL) {
|
if ((file_data = fopen(filename, appendwrite ? "a" : "w")) == NULL) {
|
||||||
perror(filename);
|
perror(filename);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue