From 759afd1f844678dada95c2704e8aed56f8f047a8 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Sun, 24 Feb 2019 19:39:54 +0100 Subject: [PATCH] fix a typo, correct writing to files under Linux --- src/frontend/plotting/gnuplot.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/frontend/plotting/gnuplot.c b/src/frontend/plotting/gnuplot.c index a3bd3ee74..2d5220d03 100644 --- a/src/frontend/plotting/gnuplot.c +++ b/src/frontend/plotting/gnuplot.c @@ -20,7 +20,7 @@ #undef BOOLEAN #include #else -#include +#include #endif #define GP_MAXVECTORS 64 @@ -335,7 +335,11 @@ ft_gnuplot(double *xlims, double *ylims, char *filename, char *title, char *xlab #else /* for external fcn system() from LINUX environment */ if (terminal_type == 3) { - fprintf(cp_out, "writing plot to file %s\n", filename_plt); + fprintf(cp_out, "writing plot to file %s.png\n", filename); + (void) sprintf(buf, "gnuplot %s", filename_plt); + } + else if (terminal_type == 5) { + fprintf(cp_out, "writing plot to file %s.eps\n", filename); (void) sprintf(buf, "gnuplot %s", filename_plt); } else