changeset 5522:98691610b386

[project @ 2005-10-30 19:33:42 by jwe]
author jwe
date Sun, 30 Oct 2005 19:33:43 +0000
parents 9d45e5bfdaff
children 451ad352b288
files src/ChangeLog src/DLD-FUNCTIONS/gplot.l
diffstat 2 files changed, 35 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Sun Oct 30 16:21:26 2005 +0000
+++ b/src/ChangeLog	Sun Oct 30 19:33:43 2005 +0000
@@ -1,3 +1,14 @@
+2005-10-30  John W. Eaton  <jwe@octave.org>
+
+	* DLD-FUNCTIONS/gplot.l (gnuplot::set_gnuplot_exe,
+	gnuplot::do_set_gnuplot_exe): New functions.
+	(gnuplot_binary): Call gnuplot::set_gnuplot_exe here.
+
+	* DLD-FUNCTIONS/gplot.l (gnuplot::set_gnuplot_use_title_option,
+	gnuplot::do_set_gnuplot_use_title_option): New functions.
+	(gnuplot_use_title_option):
+	Call gnuplot::set_gnuplot_use_title_option here.
+
 2005-10-27  James R. Van Zandt  <jrvz@comcast.net>
 
 	* mappers.cc: Doc fix for lgamma.
--- a/src/DLD-FUNCTIONS/gplot.l	Sun Oct 30 16:21:26 2005 +0000
+++ b/src/DLD-FUNCTIONS/gplot.l	Sun Oct 30 19:33:43 2005 +0000
@@ -759,6 +759,18 @@
       instance->do_show (argv);
   }
 
+  static void set_gnuplot_exe (const std::string& exe)
+  {
+    if (ensure_instance ())
+      instance->do_set_gnuplot_exe (exe);
+  }
+
+  static void set_gnuplot_use_title_option (bool opt)
+  {
+    if (ensure_instance ())
+      instance->do_set_gnuplot_use_title_option (opt);
+  }
+
   // XXX FIXME XXX -- should only remove tmp files associated with
   // gnuplot?
   static void cleanup_tmp_files (void) { ::cleanup_tmp_files (); }
@@ -815,6 +827,10 @@
 
   void do_show (const string_vector& argv);
 
+  void do_set_gnuplot_exe (const std::string& exe) { gnuplot_exe = exe; }
+
+  void do_set_gnuplot_use_title_option (bool opt) { use_title_option = opt; }
+
   void do_plot (const string_vector& argv);
 
   void do_init (void);
@@ -1476,7 +1492,12 @@
 static int
 gnuplot_binary (void)
 {
-  return set_string_var (Vgnuplot_binary, "gnuplot_binary");
+  int status = set_string_var (Vgnuplot_binary, "gnuplot_binary");
+
+  if (status == 0)
+    gnuplot::set_gnuplot_exe (Vgnuplot_binary);
+
+  return status;
 }
 
 static int
@@ -1532,6 +1553,8 @@
 {
   Vgnuplot_use_title_option = check_preference ("gnuplot_use_title_option");
 
+  gnuplot::set_gnuplot_use_title_option (Vgnuplot_use_title_option);
+
   return 0;
 }