Mercurial > mxe-octave
comparison src/of-signal-2-fixes.patch @ 4727:4ec5d6df4c4a
Fix compiling of-signal with Octave 5.0 dev (bug #54010).
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Wed, 30 May 2018 19:41:01 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
4726:586fe990bcd7 | 4727:4ec5d6df4c4a |
---|---|
1 diff -uNr a/src/cl2bp.cc b/src/cl2bp.cc | |
2 --- a/src/cl2bp.cc 2015-05-25 20:22:36.842410900 -0400 | |
3 +++ b/src/cl2bp.cc 2018-04-09 12:48:37.336964071 -0400 | |
4 @@ -89,27 +89,27 @@ | |
5 | |
6 const int m = args(0).int_value(true); | |
7 if (error_state) { | |
8 - gripe_wrong_type_arg ("cl2bp", args(0)); | |
9 + err_wrong_type_arg ("cl2bp", args(0)); | |
10 return retval; | |
11 } | |
12 const double w1 = args(1).double_value(); | |
13 if (error_state) { | |
14 - gripe_wrong_type_arg ("cl2bp", args(1)); | |
15 + err_wrong_type_arg ("cl2bp", args(1)); | |
16 return retval; | |
17 } | |
18 const double w2 = args(2).double_value(); | |
19 if (error_state) { | |
20 - gripe_wrong_type_arg ("cl2bp", args(2)); | |
21 + err_wrong_type_arg ("cl2bp", args(2)); | |
22 return retval; | |
23 } | |
24 const ColumnVector up_vector(args(3).vector_value()); | |
25 if (error_state) { | |
26 - gripe_wrong_type_arg ("cl2bp", args(3)); | |
27 + err_wrong_type_arg ("cl2bp", args(3)); | |
28 return retval; | |
29 } | |
30 const ColumnVector lo_vector(args(4).vector_value()); | |
31 if (error_state) { | |
32 - gripe_wrong_type_arg ("cl2bp", args(4)); | |
33 + err_wrong_type_arg ("cl2bp", args(4)); | |
34 return retval; | |
35 } | |
36 if (up_vector.length() != 3 || lo_vector.length() != 3) { | |
37 @@ -126,7 +126,7 @@ | |
38 | |
39 const int L = args(5).int_value(true); | |
40 if (error_state) { | |
41 - gripe_wrong_type_arg ("cl2bp", args(5)); | |
42 + err_wrong_type_arg ("cl2bp", args(5)); | |
43 return retval; | |
44 } | |
45 if (L > 1000000) { | |
46 diff -uNr a/src/medfilt1.cc b/src/medfilt1.cc | |
47 --- a/src/medfilt1.cc 2015-05-25 20:22:36.846411059 -0400 | |
48 +++ b/src/medfilt1.cc 2018-04-09 12:48:37.336964071 -0400 | |
49 @@ -326,7 +326,7 @@ | |
50 { | |
51 if (args(1).is_numeric_type ()) | |
52 { | |
53 - if (args(1).numel () != 1 || args(1).is_complex_type ()) | |
54 + if (args(1).numel () != 1 || args(1).iscomplex ()) | |
55 error ("medfilt1: N must be a real scalar"); | |
56 else | |
57 n = args(1).idx_type_value (); | |
58 @@ -340,7 +340,7 @@ | |
59 { | |
60 if (args(3).numel () != 1) | |
61 error ("medfilt1: DIM must be a scalar"); | |
62 - else if (args(3).is_complex_type ()) | |
63 + else if (args(3).iscomplex ()) | |
64 error ("medfilt1: DIM must be real"); | |
65 | |
66 dim = round (args(3).double_value ()); | |
67 diff -uNr a/src/remez.cc b/src/remez.cc | |
68 --- a/src/remez.cc 2015-05-25 20:22:36.846411059 -0400 | |
69 +++ b/src/remez.cc 2018-04-09 12:48:37.340963884 -0400 | |
70 @@ -789,7 +789,7 @@ | |
71 return retval; | |
72 } | |
73 | |
74 - int numtaps = NINT (args(0).double_value()) + 1; // #coeff = filter order+1 | |
75 + int numtaps = octave::math::nint (args(0).double_value()) + 1; // #coeff = filter order+1 | |
76 if (numtaps < 4) { | |
77 error("remez: number of taps must be an integer greater than 3"); | |
78 return retval; | |
79 @@ -846,7 +846,7 @@ | |
80 if (args(4).is_string() && !args(3).is_string()) | |
81 stype = args(4).string_value(); | |
82 else if (args(4).is_real_scalar()) | |
83 - density = NINT (args(4).double_value()); | |
84 + density = octave::math::nint (args(4).double_value ()); | |
85 else { | |
86 error("remez: incorrect argument list"); | |
87 return retval; | |
88 @@ -855,7 +855,7 @@ | |
89 if (nargin > 5) { | |
90 if (args(5).is_real_scalar() | |
91 && !args(4).is_real_scalar()) | |
92 - density = NINT (args(5).double_value()); | |
93 + density = octave::math::nint (args(5).double_value ()); | |
94 else { | |
95 error("remez: incorrect argument list"); | |
96 return retval; | |
97 diff -uNr a/src/sosfilt.cc b/src/sosfilt.cc | |
98 --- a/src/sosfilt.cc 2015-05-25 20:22:36.846411059 -0400 | |
99 +++ b/src/sosfilt.cc 2018-04-09 12:52:45.933287424 -0400 | |
100 @@ -21,7 +21,7 @@ | |
101 #include <octave/oct.h> | |
102 #include <octave/defun-dld.h> | |
103 #include <octave/error.h> | |
104 -#include <octave/gripes.h> | |
105 +#include <octave/errwarn.h> | |
106 #include <octave/pager.h> | |
107 #include <octave/quit.h> | |
108 #include <octave/variables.h> | |
109 @@ -56,7 +56,7 @@ | |
110 | |
111 if (error_state) | |
112 { | |
113 - gripe_wrong_type_arg ("sosfilt", args(0)); | |
114 + err_wrong_type_arg ("sosfilt", args(0)); | |
115 return retval; | |
116 } | |
117 | |
118 @@ -70,7 +70,7 @@ | |
119 | |
120 if (error_state) | |
121 { | |
122 - gripe_wrong_type_arg ("sosfilt", args(1)); | |
123 + err_wrong_type_arg ("sosfilt", args(1)); | |
124 return retval; | |
125 } | |
126 | |
127 diff -uNr a/src/upfirdn.cc b/src/upfirdn.cc | |
128 --- a/src/upfirdn.cc 2015-05-25 20:22:36.846411059 -0400 | |
129 +++ b/src/upfirdn.cc 2018-04-09 12:52:37.249695083 -0400 | |
130 @@ -21,7 +21,7 @@ | |
131 #include <octave/oct.h> | |
132 #include <octave/defun-dld.h> | |
133 #include <octave/error.h> | |
134 -#include <octave/gripes.h> | |
135 +#include <octave/errwarn.h> | |
136 #include <octave/pager.h> | |
137 #include <octave/quit.h> | |
138 #include <octave/variables.h> | |
139 @@ -109,7 +109,7 @@ | |
140 | |
141 if (error_state) | |
142 { | |
143 - gripe_wrong_type_arg ("upfirdn", args(1)); | |
144 + err_wrong_type_arg ("upfirdn", args(1)); | |
145 return retval; | |
146 } | |
147 | |
148 @@ -117,7 +117,7 @@ | |
149 | |
150 if (error_state) | |
151 { | |
152 - gripe_wrong_type_arg ("upfirdn", args(2)); | |
153 + err_wrong_type_arg ("upfirdn", args(2)); | |
154 return retval; | |
155 } | |
156 | |
157 @@ -125,7 +125,7 @@ | |
158 | |
159 if (error_state) | |
160 { | |
161 - gripe_wrong_type_arg ("upfirdn", args(3)); | |
162 + err_wrong_type_arg ("upfirdn", args(3)); | |
163 return retval; | |
164 } | |
165 | |
166 @@ -135,19 +135,19 @@ | |
167 Matrix x = args (0).matrix_value (); | |
168 if (error_state) | |
169 { | |
170 - gripe_wrong_type_arg ("upfirdn", args(0)); | |
171 + err_wrong_type_arg ("upfirdn", args(0)); | |
172 return retval; | |
173 } | |
174 | |
175 Matrix y = upfirdn (x, h, p, q); | |
176 retval (0) = y; | |
177 } | |
178 - else if (args (0).is_complex_type ()) | |
179 + else if (args (0).iscomplex ()) | |
180 { | |
181 ComplexMatrix x = args (0).complex_matrix_value (); | |
182 if (error_state) | |
183 { | |
184 - gripe_wrong_type_arg ("upfirdn", args(0)); | |
185 + err_wrong_type_arg ("upfirdn", args(0)); | |
186 return retval; | |
187 } | |
188 | |
189 @@ -156,7 +156,7 @@ | |
190 } | |
191 else | |
192 { | |
193 - gripe_wrong_type_arg ("upfirdn", args(0)); | |
194 + err_wrong_type_arg ("upfirdn", args(0)); | |
195 return retval; | |
196 } | |
197 |