Dear PLplot developers,

SWIG support for Octave 6.0 was broken, but this has been fixed in release 4.1. I am therefore planning to reintroduce the plplot-octave package in Debian.

When compiling the package against Octave 7, several warnings regarding operators .- and .+ are issued, like this one:

    warning: the '.-' operator was deprecated in version 7 and will not be 
allowed in a future version of Octave; please use '-' instead;

Please, find attached to this message a patch that fixes the problem.

Best,

Rafael Laboissière
Description: Do not use deprecated operators .- and .+
Author: Rafael Laboissière <raf...@debian.org>
Forwarded: no
Last-Update: 2022-12-26

--- plplot-5.15.0+dfsg.orig/bindings/octave/PLplot/support/__pl_plotit.m
+++ plplot-5.15.0+dfsg/bindings/octave/PLplot/support/__pl_plotit.m
@@ -240,13 +240,13 @@ function __pl_plotit
 
 	    pllsty(1); # solid bars
 	    if (xc == 2)
-	      xm = x(:,1) .- x(:,2); xM = x(:,1) .+ x(:,2);
+	      xm = x(:,1) - x(:,2); xM = x(:,1) + x(:,2);
 	    elseif (xc == 3)
 	      xm = x(:,2); xM = x(:,3);
 	    endif
 
 	    if (yc == 2)
-	      ym = y(:,1) .- y(:,2); yM = y(:,1) .+ y(:,2);
+	      ym = y(:,1) - y(:,2); yM = y(:,1) + y(:,2);
 	    elseif (yc == 3)
 	      ym = y(:,2); yM = y(:,3);
 	    endif
--- plplot-5.15.0+dfsg.orig/examples/octave/p14.m
+++ plplot-5.15.0+dfsg/examples/octave/p14.m
@@ -36,7 +36,7 @@ function p14(fg)
   x = y = linspace(-l, l, 30);
 
   [xx,yy] = meshgrid(x,y);
-  r = yy .* exp(-(xx.^2 .+ yy.^2));
+  r = yy .* exp(-(xx.^2 + yy.^2));
 
   axis([-l l -l l min(min(r)) max(max(r))]);
 
--- plplot-5.15.0+dfsg.orig/examples/octave/p5.m
+++ plplot-5.15.0+dfsg/examples/octave/p5.m
@@ -19,7 +19,7 @@ function p5
   pl_automatic_replot = 0;
 
   x=-pi:0.01:pi;
-  y=sin(x).+cos(3*x);
+  y=sin(x)+cos(3*x);
 
   og = grid ("on");
   title("Polar example");
--- plplot-5.15.0+dfsg.orig/examples/octave/x09c.m
+++ plplot-5.15.0+dfsg/examples/octave/x09c.m
@@ -249,11 +249,11 @@ endif
 	    argy = yy * pi/2;
 	    distort = 0.4;
 
-	    xg3(i+1,:) = xx .+ distort .* cos(argx);
-	    yg3(i+1,:) = yy .- distort .* cos(argy);
+	    xg3(i+1,:) = xx + distort .* cos(argx);
+	    yg3(i+1,:) = yy - distort .* cos(argy);
 
-	    xg2(i+1,:) = xx .+ distort .* cos(argx) .* cos(argy);
-	    yg2(i+1,:) = yy .- distort .* cos(argx) .* cos(argy);
+	    xg2(i+1,:) = xx + distort .* cos(argx) .* cos(argy);
+	    yg2(i+1,:) = yy - distort .* cos(argx) .* cos(argy);
 	  endfor
 
 	  xg1 = xg3(:,1);
--- plplot-5.15.0+dfsg.orig/examples/octave/x16c.m
+++ plplot-5.15.0+dfsg/examples/octave/x16c.m
@@ -79,17 +79,17 @@ function ix16c
   for i = 0:nx-1
     x = (i - fix(nx / 2)) / fix(nx / 2);
     j = 0:ny-1;
-    y = (j .- fix(ny / 2)) ./ fix(ny / 2) - 1.0;
+    y = (j - fix(ny / 2)) ./ fix(ny / 2) - 1.0;
 
-    z(i+1,:) = - sin(7.*x) .* cos(7.*y) .+ x*x - y.*y;
-    w(i+1,:) = - cos(7.*x) .* sin(7.*y) .+ 2 .* x .* y;
+    z(i+1,:) = - sin(7.*x) .* cos(7.*y) + x*x - y.*y;
+    w(i+1,:) = - cos(7.*x) .* sin(7.*y) + 2 .* x .* y;
   endfor
 
   zmin=min(min(z));
   zmax=max(max(z));
 
   i = 0:ns-1;
-  clevel = (zmin .+ (zmax - zmin) .* (i + 0.5) ./ ns)';
+  clevel = (zmin + (zmax - zmin) .* (i + 0.5) ./ ns)';
   i = 0:ns;
   shedge = zmin + (zmax - zmin) * i / ns;
 
@@ -103,11 +103,11 @@ function ix16c
     argy = y * pi/2;
     distort = 0.4;
 
-    xg1(i+1,:) = x .+ distort .* cos(argx);
-    yg1(i+1,:) = y .- distort .* cos(argy);
+    xg1(i+1,:) = x + distort .* cos(argx);
+    yg1(i+1,:) = y - distort .* cos(argy);
 
-    xg2(i+1,:) = x .+ distort .* cos(argx) .* cos(argy);
-    yg2(i+1,:) = y .- distort .* cos(argx) .* cos(argy);
+    xg2(i+1,:) = x + distort .* cos(argx) .* cos(argy);
+    yg2(i+1,:) = y - distort .* cos(argx) .* cos(argy);
   endfor
 
   xg1 = xg1(:,1);
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to