[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #47912] __gnuplot_drawnow__.m arguments do not
From: |
Dan Sebald |
Subject: |
[Octave-bug-tracker] [bug #47912] __gnuplot_drawnow__.m arguments do not match the calling C arguments |
Date: |
Fri, 13 May 2016 08:42:39 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0 |
URL:
<http://savannah.gnu.org/bugs/?47912>
Summary: __gnuplot_drawnow__.m arguments do not match the
calling C arguments
Project: GNU Octave
Submitted by: sebald
Submitted on: Fri 13 May 2016 08:42:38 AM GMT
Category: Plotting with gnuplot
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Other
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: Any
_______________________________________________________
Details:
The debugging method of
drawnow (TERM, FILE, MONO, DEBUG_FILE)
no longer works, giving the following errors:
>> sombrero
>> drawnow ("x11", "/dev/null", false, "sombrero_copper.gp");
error: wrong type argument 'bool'
error: fopen: filename must be a string
The reason for the error is that the __gnuplot_drawnow__.m routine has one
fewer input arguments than the calling C code. Here is how I've fixed the
problem and I added a comment near the calling code to illustrate the number
of input arguments.
diff --git a/libinterp/dldfcn/__init_gnuplot__.cc
b/libinterp/dldfcn/__init_gnuplot__.cc
--- a/libinterp/dldfcn/__init_gnuplot__.cc
+++ b/libinterp/dldfcn/__init_gnuplot__.cc
@@ -110,6 +110,7 @@ public:
{
octave_value_list args;
if (! debug_file.empty ())
+// Number of arguments is one more than __gnuplot_drawnow__()
args(4) = debug_file;
args(3) = mono;
args(2) = file;
diff --git a/scripts/plot/util/__gnuplot_drawnow__.m
b/scripts/plot/util/__gnuplot_drawnow__.m
--- a/scripts/plot/util/__gnuplot_drawnow__.m
+++ b/scripts/plot/util/__gnuplot_drawnow__.m
@@ -23,7 +23,7 @@
## Author: jwe
-function __gnuplot_drawnow__ (h, term, file, debug_file)
+function __gnuplot_drawnow__ (h, term, file, mono, debug_file)
if (nargin < 1 || nargin > 5 || nargin == 2)
print_usage ();
There no longer appears to be use of 'mono' in the __gnuplot_drawnow__
routine, so perhaps the intension was to remove the 'mono' and reduce the
number of options sent into the routine. That would mean that the
print_figure() mono variable is unused.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?47912>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #47912] __gnuplot_drawnow__.m arguments do not match the calling C arguments,
Dan Sebald <=