changeset 5045:d475c9d019f3

of-signal: Update to v1.4.1 * dist-files.mk: remove patch refs * src/of-signal.mk: update version, checksum * src/of-signal-1-fixes.patch, src/of-signal-2-fixes.patch, src/of-signal-3-fixes.patch: removed files
author John Donoghue
date Fri, 05 Apr 2019 16:30:03 -0400
parents d0a95d2c44bf
children 5e4292853f84
files dist-files.mk src/of-signal-1-fixes.patch src/of-signal-2-fixes.patch src/of-signal-3-fixes.patch src/of-signal.mk
diffstat 5 files changed, 2 insertions(+), 353 deletions(-) [+]
line wrap: on
line diff
--- a/dist-files.mk	Thu Apr 04 11:28:25 2019 -0400
+++ b/dist-files.mk	Fri Apr 05 16:30:03 2019 -0400
@@ -519,9 +519,6 @@
   of-quaternion-2-dev-fixes.patch \
   of-quaternion.mk \
   of-queueing.mk \
-  of-signal-1-fixes.patch \
-  of-signal-2-fixes.patch \
-  of-signal-3-fixes.patch \
   of-signal.mk \
   of-sockets-1-cross-fixes.patch \
   of-sockets.mk \
--- a/src/of-signal-1-fixes.patch	Thu Apr 04 11:28:25 2019 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,118 +0,0 @@
-# HG changeset patch
-# User Mike Miller <mtmiller@octave.org>
-# Date 1525815613 25200
-# Node ID 3cbff3de1ebcb28a87ca0e0f8342ea393db19908
-# Parent  36e6b83ee1a1b178c58c14c5077038d7a6614118
-medfilt1: rewrite memory management, fix build error on MinGW (bug #53849)
-
-* medfilt1.cc (sorted_window::sorted_window): Make buf a unique_ptr. Use
-member initialiation list. (sorted_window::~sorted_window): Delete.
-(sorted_window::init): Use fill_n instead of bzero. (sorted_window::replace,
-sorted_window::add, sorted_window::remove): Update syntax to dereference
-offsets into buf.
-
-diff -r 36e6b83ee1a1 -r 3cbff3de1ebc src/medfilt1.cc
---- a/src/medfilt1.cc	Sun May 06 10:17:15 2018 +0200
-+++ b/src/medfilt1.cc	Tue May 08 14:40:13 2018 -0700
-@@ -27,9 +27,8 @@
-  One dimensional median filter, for real double variables.
-  */
- 
--//#ifdef HAVE_CONFIG_H
--//#  include "config.h"
--//#endif
-+#include <algorithm>
-+#include <memory>
- 
- #include "oct.h"
- #include "defun-dld.h"
-@@ -44,7 +43,7 @@
- // Keeps NaNs at the "top" (after Inf)
- class sorted_window
- {
--  double *buf;
-+  std::unique_ptr<double[]> buf;
-   octave_idx_type  numel;
-   octave_idx_type  numNaN;
-   bool nan_if_any_is;
-@@ -70,16 +69,8 @@
-   // If  skip_nan  then the median will consider only valid numbers within
-   // the window.  
-   sorted_window (octave_idx_type width, bool skip_nan = true)
--    {
--      numel = 0;
--      nan_if_any_is = ! skip_nan;
--      buf = new double [width];
--    }
--
--  ~sorted_window ()
--    {
--      delete [] buf;
--    }
-+    : buf (new double [width]), numel (0), numNaN (0),
-+      nan_if_any_is (! skip_nan) { }
- 
-   // Initialize to contain  seed,  and  zeros  additional zeros.
-   void init (const double *seed, octave_idx_type num, octave_idx_type stride,
-@@ -88,7 +79,7 @@
-       numel = zeros;
-       numNaN = 0;
- 
--      bzero (buf, zeros * sizeof (double));
-+      std::fill_n (&buf[0], zeros, 0.0);
- 
-       // Insert from seed.  Could sort if it is large
-       num *= stride;
-@@ -106,7 +97,7 @@
-           n_pos = find (next);
-           p_pos = find (prev, n_pos);
-           if (n_pos != p_pos)
--            std::copy_backward (buf + n_pos, buf + p_pos, buf + p_pos + 1);
-+            std::copy_backward (&buf[n_pos], &buf[p_pos], &buf[p_pos + 1]);
-         }
-       else if (next > prev)
-         {
-@@ -114,7 +105,7 @@
-           n_pos = find (next, p_pos);
-           if (n_pos != p_pos)
-             {
--              std::copy (buf + p_pos + 1, buf + n_pos, buf + p_pos);
-+              std::copy (&buf[p_pos + 1], &buf[n_pos], &buf[p_pos]);
-               n_pos--;            // position shifts due to deletion of p_pos
-             }
-         }
-@@ -123,13 +114,13 @@
-           if (next == next)
-             {
-               n_pos = find (next);
--              std::copy_backward (buf + n_pos, buf + numel - 1, buf + numel);
-+              std::copy_backward (&buf[n_pos], &buf[numel - 1], &buf[numel]);
-               numNaN--;
-             }
-           else if (prev == prev)
-             {
-               p_pos = find (prev);
--              std::copy (buf + p_pos + 1, buf + numel, buf + p_pos);
-+              std::copy (&buf[p_pos + 1], &buf[numel], &buf[p_pos]);
-               n_pos = numel - 1;
-               numNaN++;
-             }
-@@ -151,7 +142,7 @@
-         {
-           n_pos = find (next);
-           if (n_pos < numel)
--            std::copy_backward (buf + n_pos, buf + numel, buf + numel + 1);
-+            std::copy_backward (&buf[n_pos], &buf[numel], &buf[numel + 1]);
-         }
-       else              // NaN stored at end, so nothing to move.
-         {
-@@ -170,7 +161,7 @@
-       if (prev == prev)
-         {
-           p_pos = find (prev);
--          std::copy (buf + p_pos + 1, buf + numel, buf + p_pos);
-+          std::copy (&buf[p_pos + 1], &buf[numel], &buf[p_pos]);
-         }
-       else                  // NaN stored at end, so nothing to move.
-         numNaN--;
-
--- a/src/of-signal-2-fixes.patch	Thu Apr 04 11:28:25 2019 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,197 +0,0 @@
-diff -uNr a/src/cl2bp.cc b/src/cl2bp.cc
---- a/src/cl2bp.cc	2015-05-25 20:22:36.842410900 -0400
-+++ b/src/cl2bp.cc	2018-04-09 12:48:37.336964071 -0400
-@@ -89,27 +89,27 @@
- 
-   const int m = args(0).int_value(true);
-   if (error_state) {
--    gripe_wrong_type_arg ("cl2bp", args(0));
-+    err_wrong_type_arg ("cl2bp", args(0));
-     return retval;
-   }
-   const double w1 = args(1).double_value();
-   if (error_state) {
--    gripe_wrong_type_arg ("cl2bp", args(1));
-+    err_wrong_type_arg ("cl2bp", args(1));
-     return retval;
-   }
-   const double w2 = args(2).double_value();
-   if (error_state) {
--    gripe_wrong_type_arg ("cl2bp", args(2));
-+    err_wrong_type_arg ("cl2bp", args(2));
-     return retval;
-   }
-   const ColumnVector up_vector(args(3).vector_value());
-   if (error_state) {
--    gripe_wrong_type_arg ("cl2bp", args(3));
-+    err_wrong_type_arg ("cl2bp", args(3));
-     return retval;
-   }
-   const ColumnVector lo_vector(args(4).vector_value());
-   if (error_state) {
--    gripe_wrong_type_arg ("cl2bp", args(4));
-+    err_wrong_type_arg ("cl2bp", args(4));
-     return retval;
-   }
-   if (up_vector.length() != 3 || lo_vector.length() != 3) {
-@@ -126,7 +126,7 @@
- 
-   const int L = args(5).int_value(true);
-   if (error_state) {
--    gripe_wrong_type_arg ("cl2bp", args(5));
-+    err_wrong_type_arg ("cl2bp", args(5));
-     return retval;
-   }
-   if (L > 1000000) {
-diff -uNr a/src/medfilt1.cc b/src/medfilt1.cc
---- a/src/medfilt1.cc	2015-05-25 20:22:36.846411059 -0400
-+++ b/src/medfilt1.cc	2018-04-09 12:48:37.336964071 -0400
-@@ -326,7 +326,7 @@
-     {
-       if (args(1).is_numeric_type ())
-         {
--          if (args(1).numel () != 1 || args(1).is_complex_type ())
-+          if (args(1).numel () != 1 || args(1).iscomplex ())
-             error ("medfilt1: N must be a real scalar");
-           else
-             n = args(1).idx_type_value ();
-@@ -340,7 +340,7 @@
-           {
-             if (args(3).numel () != 1)
-               error ("medfilt1: DIM must be a scalar");
--            else if (args(3).is_complex_type ())
-+            else if (args(3).iscomplex ())
-               error ("medfilt1: DIM must be real");
- 
-             dim = round (args(3).double_value ());
-diff -uNr a/src/remez.cc b/src/remez.cc
---- a/src/remez.cc	2015-05-25 20:22:36.846411059 -0400
-+++ b/src/remez.cc	2018-04-09 12:48:37.340963884 -0400
-@@ -789,7 +789,7 @@
-     return retval;
-   }
- 
--  int numtaps = NINT (args(0).double_value()) + 1; // #coeff = filter order+1
-+  int numtaps = octave::math::nint (args(0).double_value()) + 1; // #coeff = filter order+1
-   if (numtaps < 4) {
-     error("remez: number of taps must be an integer greater than 3");
-     return retval;
-@@ -846,7 +846,7 @@
-     if (args(4).is_string() && !args(3).is_string())
-       stype = args(4).string_value();
-     else if (args(4).is_real_scalar())
--      density = NINT (args(4).double_value());
-+      density = octave::math::nint (args(4).double_value ());
-     else {
-       error("remez: incorrect argument list");
-       return retval;
-@@ -855,7 +855,7 @@
-   if (nargin > 5) {
-     if (args(5).is_real_scalar()
-         && !args(4).is_real_scalar())
--      density = NINT (args(5).double_value());
-+      density = octave::math::nint (args(5).double_value ());
-     else {
-       error("remez: incorrect argument list");
-       return retval;
-diff -uNr a/src/sosfilt.cc b/src/sosfilt.cc
---- a/src/sosfilt.cc	2015-05-25 20:22:36.846411059 -0400
-+++ b/src/sosfilt.cc	2018-04-09 12:52:45.933287424 -0400
-@@ -21,7 +21,7 @@
- #include <octave/oct.h>
- #include <octave/defun-dld.h>
- #include <octave/error.h>
--#include <octave/gripes.h>
-+#include <octave/errwarn.h>
- #include <octave/pager.h>
- #include <octave/quit.h>
- #include <octave/variables.h>
-@@ -56,7 +56,7 @@
- 
-   if (error_state)
-     {
--      gripe_wrong_type_arg ("sosfilt", args(0));
-+      err_wrong_type_arg ("sosfilt", args(0));
-       return retval;
-     }
- 
-@@ -70,7 +70,7 @@
- 
-   if (error_state)
-     {
--      gripe_wrong_type_arg ("sosfilt", args(1));
-+      err_wrong_type_arg ("sosfilt", args(1));
-       return retval;
-     }
- 
-diff -uNr a/src/upfirdn.cc b/src/upfirdn.cc
---- a/src/upfirdn.cc	2015-05-25 20:22:36.846411059 -0400
-+++ b/src/upfirdn.cc	2018-04-09 12:52:37.249695083 -0400
-@@ -21,7 +21,7 @@
- #include <octave/oct.h>
- #include <octave/defun-dld.h>
- #include <octave/error.h>
--#include <octave/gripes.h>
-+#include <octave/errwarn.h>
- #include <octave/pager.h>
- #include <octave/quit.h>
- #include <octave/variables.h>
-@@ -109,7 +109,7 @@
- 
-   if (error_state)
-     {
--      gripe_wrong_type_arg ("upfirdn", args(1));
-+      err_wrong_type_arg ("upfirdn", args(1));
-       return retval;
-     }
- 
-@@ -117,7 +117,7 @@
- 
-   if (error_state)
-     {
--      gripe_wrong_type_arg ("upfirdn", args(2));
-+      err_wrong_type_arg ("upfirdn", args(2));
-       return retval;
-     }
- 
-@@ -125,7 +125,7 @@
- 
-   if (error_state)
-     {
--      gripe_wrong_type_arg ("upfirdn", args(3));
-+      err_wrong_type_arg ("upfirdn", args(3));
-       return retval;
-     }
- 
-@@ -135,19 +135,19 @@
-       Matrix x = args (0).matrix_value ();
-       if (error_state)
-         {
--          gripe_wrong_type_arg ("upfirdn", args(0));
-+          err_wrong_type_arg ("upfirdn", args(0));
-           return retval;
-         }
- 
-       Matrix y = upfirdn (x, h, p, q);
-       retval (0) = y;
-     }
--  else if (args (0).is_complex_type ())
-+  else if (args (0).iscomplex ())
-     {
-       ComplexMatrix x = args (0).complex_matrix_value ();
-       if (error_state)
-         {
--          gripe_wrong_type_arg ("upfirdn", args(0));
-+          err_wrong_type_arg ("upfirdn", args(0));
-           return retval;
-         }
- 
-@@ -156,7 +156,7 @@
-     }
-   else
-     {
--      gripe_wrong_type_arg ("upfirdn", args(0));
-+      err_wrong_type_arg ("upfirdn", args(0));
-       return retval;
-     }
- 
--- a/src/of-signal-3-fixes.patch	Thu Apr 04 11:28:25 2019 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-diff -ur signal-1.4.0.old/src/medfilt1.cc signal-1.4.0/src/medfilt1.cc
---- signal-1.4.0.old/src/medfilt1.cc	2019-01-02 12:00:17.695424340 -0500
-+++ signal-1.4.0/src/medfilt1.cc	2019-01-02 12:01:01.900491183 -0500
-@@ -324,7 +324,7 @@
- 
-   if (nargin >= 2)
-     {
--      if (args(1).is_numeric_type ())
-+      if (args(1).isnumeric ())
-         {
-           if (args(1).numel () != 1 || args(1).iscomplex ())
-             error ("medfilt1: N must be a real scalar");
-@@ -336,7 +336,7 @@
-                args(1).type_name ().c_str ());
-     if (nargin >= 4)
-       {
--        if (args(3).is_numeric_type ())
-+        if (args(3).isnumeric ())
-           {
-             if (args(3).numel () != 1)
-               error ("medfilt1: DIM must be a scalar");
-diff -ur signal-1.4.0.orig/src/upfirdn.cc signal-1.4.0/src/upfirdn.cc
---- signal-1.4.0.orig/src/upfirdn.cc	2019-01-02 12:09:32.072780390 -0500
-+++ signal-1.4.0/src/upfirdn.cc	2019-01-02 12:09:52.581273776 -0500
-@@ -130,7 +130,7 @@
-     }
- 
-   // Do the dispatching
--  if (args (0).is_real_type ())
-+  if (args (0).isreal ())
-     {
-       Matrix x = args (0).matrix_value ();
-       if (error_state)
--- a/src/of-signal.mk	Thu Apr 04 11:28:25 2019 -0400
+++ b/src/of-signal.mk	Fri Apr 05 16:30:03 2019 -0400
@@ -3,8 +3,8 @@
 
 PKG             := of-signal
 $(PKG)_IGNORE   :=
-$(PKG)_VERSION  := 1.4.0
-$(PKG)_CHECKSUM := 2a2e8d19e28ff63df89130cc1bb832b477ff4587
+$(PKG)_VERSION  := 1.4.1
+$(PKG)_CHECKSUM := 67519c28868659a54363420d5bfc2621c31f8fdb
 $(PKG)_REMOTE_SUBDIR := 
 $(PKG)_SUBDIR   := signal-$($(PKG)_VERSION)
 $(PKG)_FILE     := signal-$($(PKG)_VERSION).tar.gz