comparison src/of-odepkg-1-fixes.patch @ 4200:5cee475eceb0

temporary fixes for of-odepkg package
author John W. Eaton <jwe@octave.org>
date Wed, 31 Aug 2016 15:02:02 -0400
parents
children
comparison
equal deleted inserted replaced
4199:f7fce04ebafa 4200:5cee475eceb0
1 diff -uNr a/src/odepkg_octsolver_ddaskr.cc b/src/odepkg_octsolver_ddaskr.cc
2 --- a/src/odepkg_octsolver_ddaskr.cc 2015-05-19 09:48:44.000000000 -0400
3 +++ b/src/odepkg_octsolver_ddaskr.cc 2016-08-31 14:22:43.798913906 -0400
4 @@ -42,6 +42,10 @@
5 #include <parse.h>
6 #include "odepkg_auxiliary_functions.h"
7
8 +#if ! defined (GCC_ATTR_UNUSED)
9 +# define GCC_ATTR_UNUSED OCTAVE_UNUSED
10 +#endif
11 +
12 typedef octave_idx_type (*odepkg_ddaskr_restype)
13 (const double& T, const double* Y, const double* YPRIME,
14 const double& CJ, double* DELTA, octave_idx_type& IRES,
15 diff -uNr a/src/odepkg_octsolver_mebdfdae.cc b/src/odepkg_octsolver_mebdfdae.cc
16 --- a/src/odepkg_octsolver_mebdfdae.cc 2015-05-19 09:48:44.000000000 -0400
17 +++ b/src/odepkg_octsolver_mebdfdae.cc 2016-08-31 14:23:07.518439633 -0400
18 @@ -46,6 +46,10 @@
19 #include <parse.h>
20 #include "odepkg_auxiliary_functions.h"
21
22 +#if ! defined (GCC_ATTR_UNUSED)
23 +# define GCC_ATTR_UNUSED OCTAVE_UNUSED
24 +#endif
25 +
26 typedef octave_idx_type (*odepkg_mebdfdae_usrtype)
27 (const octave_idx_type& N, const double& T, const double* Y,
28 double* YDOT, const octave_idx_type* IPAR, const double* RPAR,
29 diff -uNr a/src/odepkg_octsolver_mebdfi.cc b/src/odepkg_octsolver_mebdfi.cc
30 --- a/src/odepkg_octsolver_mebdfi.cc 2015-05-19 09:48:44.000000000 -0400
31 +++ b/src/odepkg_octsolver_mebdfi.cc 2016-08-31 14:22:39.958990687 -0400
32 @@ -42,6 +42,10 @@
33 #include <parse.h>
34 #include "odepkg_auxiliary_functions.h"
35
36 +#if ! defined (GCC_ATTR_UNUSED)
37 +# define GCC_ATTR_UNUSED OCTAVE_UNUSED
38 +#endif
39 +
40 /* -*- texinfo -*-
41 * @subsection Source File @file{odepkg_octsolver_mebdfi.cc}
42 *
43 diff -uNr a/src/odepkg_octsolver_radau5.cc b/src/odepkg_octsolver_radau5.cc
44 --- a/src/odepkg_octsolver_radau5.cc 2015-05-19 09:48:44.000000000 -0400
45 +++ b/src/odepkg_octsolver_radau5.cc 2016-08-31 14:51:45.128382513 -0400
46 @@ -37,24 +37,28 @@
47 #include <parse.h>
48 #include "odepkg_auxiliary_functions.h"
49
50 -typedef octave_idx_type (*odepkg_radau5_usrtype)
51 +#if ! defined (GCC_ATTR_UNUSED)
52 +# define GCC_ATTR_UNUSED OCTAVE_UNUSED
53 +#endif
54 +
55 +typedef F77_RET_T (*odepkg_radau5_usrtype)
56 (const octave_idx_type& N, const double& X, const double* Y, double* F,
57 GCC_ATTR_UNUSED const double* RPAR,
58 GCC_ATTR_UNUSED const octave_idx_type* IPAR);
59
60 -typedef octave_idx_type (*odepkg_radau5_jactype)
61 +typedef F77_RET_T (*odepkg_radau5_jactype)
62 (const octave_idx_type& N, const double& X, const double* Y, double* DFY,
63 GCC_ATTR_UNUSED const octave_idx_type& LDFY,
64 GCC_ATTR_UNUSED const double* RPAR,
65 GCC_ATTR_UNUSED const octave_idx_type* IPAR);
66
67 -typedef octave_idx_type (*odepkg_radau5_masstype)
68 +typedef F77_RET_T (*odepkg_radau5_masstype)
69 (const octave_idx_type& N, double* AM,
70 GCC_ATTR_UNUSED const octave_idx_type* LMAS,
71 GCC_ATTR_UNUSED const double* RPAR,
72 GCC_ATTR_UNUSED const octave_idx_type* IPAR);
73
74 -typedef octave_idx_type (*odepkg_radau5_soltype)
75 +typedef F77_RET_T (*odepkg_radau5_soltype)
76 (const octave_idx_type& NR, const double& XOLD, const double& X,
77 const double* Y, const double* CONT, const octave_idx_type* LRC,
78 const octave_idx_type& N, GCC_ATTR_UNUSED const double* RPAR,
79 @@ -91,7 +95,7 @@
80 static octave_value vradau5mass;
81 static octave_value vradau5massstate;
82
83 -octave_idx_type odepkg_radau5_usrfcn
84 +F77_RET_T odepkg_radau5_usrfcn
85 (const octave_idx_type& N, const double& X, const double* Y,
86 double* F, GCC_ATTR_UNUSED const double* RPAR,
87 GCC_ATTR_UNUSED const octave_idx_type* IPAR) {
88 @@ -119,10 +123,10 @@
89 for (octave_idx_type vcnt = 0; vcnt < N; vcnt++)
90 F[vcnt] = vcol(vcnt);
91
92 - return (true);
93 + F77_RETURN (true);
94 }
95
96 -octave_idx_type odepkg_radau5_jacfcn
97 +F77_RET_T odepkg_radau5_jacfcn
98 (const octave_idx_type& N, const double& X, const double* Y,
99 double* DFY, GCC_ATTR_UNUSED const octave_idx_type& LDFY,
100 GCC_ATTR_UNUSED const double* RPAR,
101 @@ -146,7 +150,7 @@
102 for (octave_idx_type vrow = 0; vrow < N; vrow++)
103 DFY[vrow+vcol*N] = vdfy (vrow, vcol);
104
105 - return (true);
106 + F77_RETURN (true);
107 }
108
109 F77_RET_T odepkg_radau5_massfcn
110 @@ -176,10 +180,10 @@
111 for (octave_idx_type vcol = 0; vcol < N; vcol++)
112 AM[vrow+vcol*N] = vam (vrow, vcol);
113
114 - return (true);
115 + F77_RETURN (true);
116 }
117
118 -octave_idx_type odepkg_radau5_solfcn
119 +F77_RET_T odepkg_radau5_solfcn
120 (const octave_idx_type& NR, const double& XOLD, const double& X,
121 const double* Y, const double* CONT, const octave_idx_type* LRC,
122 const octave_idx_type& N, GCC_ATTR_UNUSED const double* RPAR,
123 @@ -241,7 +245,7 @@
124 (vradau5pltfun, vradau5outsel, vt, vy, vradau5extarg, 1);
125 }
126
127 - return (true);
128 + F77_RETURN (true);
129 }
130
131 // PKG_ADD: autoload ("ode5r", "dldsolver.oct");
132 diff -uNr a/src/odepkg_octsolver_radau.cc b/src/odepkg_octsolver_radau.cc
133 --- a/src/odepkg_octsolver_radau.cc 2015-05-19 09:48:44.000000000 -0400
134 +++ b/src/odepkg_octsolver_radau.cc 2016-08-31 14:44:01.261572457 -0400
135 @@ -37,24 +37,28 @@
136 #include <parse.h>
137 #include "odepkg_auxiliary_functions.h"
138
139 -typedef octave_idx_type (*odepkg_radau_usrtype)
140 +#if ! defined (GCC_ATTR_UNUSED)
141 +# define GCC_ATTR_UNUSED OCTAVE_UNUSED
142 +#endif
143 +
144 +typedef F77_RET_T (*odepkg_radau_usrtype)
145 (const octave_idx_type& N, const double& X, const double* Y, double* F,
146 GCC_ATTR_UNUSED const double* RPAR,
147 GCC_ATTR_UNUSED const octave_idx_type* IPAR);
148
149 -typedef octave_idx_type (*odepkg_radau_jactype)
150 +typedef F77_RET_T (*odepkg_radau_jactype)
151 (const octave_idx_type& N, const double& X, const double* Y, double* DFY,
152 GCC_ATTR_UNUSED const octave_idx_type& LDFY,
153 GCC_ATTR_UNUSED const double* RPAR,
154 GCC_ATTR_UNUSED const octave_idx_type* IPAR);
155
156 -typedef octave_idx_type (*odepkg_radau_masstype)
157 +typedef F77_RET_T (*odepkg_radau_masstype)
158 (const octave_idx_type& N, double* AM,
159 GCC_ATTR_UNUSED const octave_idx_type* LMAS,
160 GCC_ATTR_UNUSED const double* RPAR,
161 GCC_ATTR_UNUSED const octave_idx_type* IPAR);
162
163 -typedef octave_idx_type (*odepkg_radau_soltype)
164 +typedef F77_RET_T (*odepkg_radau_soltype)
165 (const octave_idx_type& NR, const double& XOLD, const double& X,
166 const double* Y, const double* CONT, const octave_idx_type* LRC,
167 const octave_idx_type& N, GCC_ATTR_UNUSED const double* RPAR,
168 @@ -91,7 +95,7 @@
169 static octave_value vradaumass;
170 static octave_value vradaumassstate;
171
172 -octave_idx_type odepkg_radau_usrfcn
173 +F77_RET_T odepkg_radau_usrfcn
174 (const octave_idx_type& N, const double& X, const double* Y,
175 double* F, GCC_ATTR_UNUSED const double* RPAR,
176 GCC_ATTR_UNUSED const octave_idx_type* IPAR) {
177 @@ -119,10 +123,10 @@
178 for (octave_idx_type vcnt = 0; vcnt < N; vcnt++)
179 F[vcnt] = vcol(vcnt);
180
181 - return (true);
182 + F77_RETURN (true);
183 }
184
185 -octave_idx_type odepkg_radau_jacfcn
186 +F77_RET_T odepkg_radau_jacfcn
187 (const octave_idx_type& N, const double& X, const double* Y,
188 double* DFY, GCC_ATTR_UNUSED const octave_idx_type& LDFY,
189 GCC_ATTR_UNUSED const double* RPAR,
190 @@ -146,7 +150,7 @@
191 for (octave_idx_type vrow = 0; vrow < N; vrow++)
192 DFY[vrow+vcol*N] = vdfy (vrow, vcol);
193
194 - return (true);
195 + F77_RETURN (true);
196 }
197
198 F77_RET_T odepkg_radau_massfcn
199 @@ -176,10 +180,10 @@
200 for (octave_idx_type vcol = 0; vcol < N; vcol++)
201 AM[vrow+vcol*N] = vam (vrow, vcol);
202
203 - return (true);
204 + F77_RETURN (true);
205 }
206
207 -octave_idx_type odepkg_radau_solfcn
208 +F77_RET_T odepkg_radau_solfcn
209 (const octave_idx_type& NR, const double& XOLD, const double& X,
210 const double* Y, const double* CONT, const octave_idx_type* LRC,
211 const octave_idx_type& N, GCC_ATTR_UNUSED const double* RPAR,
212 @@ -241,7 +245,7 @@
213 (vradaupltfun, vradauoutsel, vt, vy, vradauextarg, 1);
214 }
215
216 - return (true);
217 + F77_RETURN (true);
218 }
219
220 // PKG_ADD: autoload ("ode2r", "dldsolver.oct");
221 diff -uNr a/src/odepkg_octsolver_rodas.cc b/src/odepkg_octsolver_rodas.cc
222 --- a/src/odepkg_octsolver_rodas.cc 2015-05-19 09:48:44.000000000 -0400
223 +++ b/src/odepkg_octsolver_rodas.cc 2016-08-31 14:54:58.648546043 -0400
224 @@ -33,6 +33,10 @@
225 #include <parse.h>
226 #include "odepkg_auxiliary_functions.h"
227
228 +#if ! defined (GCC_ATTR_UNUSED)
229 +# define GCC_ATTR_UNUSED OCTAVE_UNUSED
230 +#endif
231 +
232 /* -*- texinfo -*-
233 * @subsection Source File @file{odepkg_octsolver_rodas.cc}
234 *
235 @@ -47,7 +51,7 @@
236 * @end example
237 * @end deftp
238 */
239 -typedef octave_idx_type (*odepkg_rodas_usrtype)
240 +typedef F77_RET_T (*odepkg_rodas_usrtype)
241 (const octave_idx_type& N, const double& X, const double* Y, double* F,
242 GCC_ATTR_UNUSED const double* RPAR,
243 GCC_ATTR_UNUSED const octave_idx_type* IPAR);
244 @@ -66,7 +70,7 @@
245 * @end example
246 * @end deftp
247 */
248 -typedef octave_idx_type (*odepkg_rodas_jactype)
249 +typedef F77_RET_T (*odepkg_rodas_jactype)
250 (const octave_idx_type& N, const double& X, const double* Y, double* DFY,
251 GCC_ATTR_UNUSED const octave_idx_type& LDFY,
252 GCC_ATTR_UNUSED const double* RPAR,
253 @@ -86,7 +90,7 @@
254 * @end example
255 * @end deftp
256 */
257 -typedef octave_idx_type (*odepkg_rodas_masstype)
258 +typedef F77_RET_T (*odepkg_rodas_masstype)
259 (const octave_idx_type& N, double* AM,
260 GCC_ATTR_UNUSED const octave_idx_type* LMAS,
261 GCC_ATTR_UNUSED const double* RPAR,
262 @@ -106,7 +110,7 @@
263 * @end example
264 * @end deftp
265 */
266 -typedef octave_idx_type (*odepkg_rodas_soltype)
267 +typedef F77_RET_T (*odepkg_rodas_soltype)
268 (const octave_idx_type& NR, const double& XOLD, const double& X,
269 const double* Y, const double* CONT, const octave_idx_type* LRC,
270 const octave_idx_type& N, GCC_ATTR_UNUSED const double* RPAR,
271 @@ -128,7 +132,7 @@
272 * @end example
273 * @end deftp
274 */
275 -typedef octave_idx_type (*odepkg_rodas_dfxtype)
276 +typedef F77_RET_T (*odepkg_rodas_dfxtype)
277 (GCC_ATTR_UNUSED const octave_idx_type& N, GCC_ATTR_UNUSED const double& X,
278 GCC_ATTR_UNUSED const double* Y, GCC_ATTR_UNUSED const double* FX,
279 GCC_ATTR_UNUSED const double* RPAR, GCC_ATTR_UNUSED const octave_idx_type* IPAR);
280 @@ -270,7 +274,7 @@
281 * @end itemize
282 * @end deftypefn
283 */
284 -octave_idx_type odepkg_rodas_usrfcn
285 +F77_RET_T odepkg_rodas_usrfcn
286 (const octave_idx_type& N, const double& X, const double* Y,
287 double* F, GCC_ATTR_UNUSED const double* RPAR,
288 GCC_ATTR_UNUSED const octave_idx_type* IPAR) {
289 @@ -298,7 +302,7 @@
290 for (octave_idx_type vcnt = 0; vcnt < N; vcnt++)
291 F[vcnt] = vcol(vcnt);
292
293 - return (true);
294 + F77_RETURN (true);
295 }
296
297 /* -*- texinfo -*-
298 @@ -317,7 +321,7 @@
299 * @end itemize
300 * @end deftypefn
301 */
302 -octave_idx_type odepkg_rodas_jacfcn
303 +F77_RET_T odepkg_rodas_jacfcn
304 (const octave_idx_type& N, const double& X, const double* Y,
305 double* DFY, GCC_ATTR_UNUSED const octave_idx_type& LDFY,
306 GCC_ATTR_UNUSED const double* RPAR,
307 @@ -341,7 +345,7 @@
308 for (octave_idx_type vrow = 0; vrow < N; vrow++)
309 DFY[vrow+vcol*N] = vdfy (vrow, vcol);
310
311 - return (true);
312 + F77_RETURN (true);
313 }
314
315 /* -*- texinfo -*-
316 @@ -374,13 +378,13 @@
317 for (octave_idx_type vcol = 0; vcol < N; vcol++)
318 AM[vrow+vcol*N] = vam (vrow, vcol);
319
320 - return (true);
321 + F77_RETURN (true);
322 }
323
324 /* -*- texinfo -*-
325 * odepkg_rodas_solfcn - TODO
326 */
327 -octave_idx_type odepkg_rodas_solfcn
328 +F77_RET_T odepkg_rodas_solfcn
329 (const octave_idx_type& NR, const double& XOLD, const double& X,
330 const double* Y, const double* CONT, const octave_idx_type* LRC,
331 const octave_idx_type& N, GCC_ATTR_UNUSED const double* RPAR,
332 @@ -442,20 +446,20 @@
333 (vrodaspltfun, vrodasoutsel, vt, vy, vrodasextarg, 1);
334 }
335
336 - return (true);
337 + F77_RETURN (true);
338 }
339
340 /* -*- texinfo -*-
341 * odepkg_rodas_solfcn - TODO dummy function
342 */
343 -octave_idx_type odepkg_rodas_dfxfcn
344 +F77_RET_T odepkg_rodas_dfxfcn
345 (GCC_ATTR_UNUSED const octave_idx_type& N, GCC_ATTR_UNUSED const double& X,
346 GCC_ATTR_UNUSED const double* Y, GCC_ATTR_UNUSED const double* FX,
347 GCC_ATTR_UNUSED const double* RPAR, GCC_ATTR_UNUSED const octave_idx_type* IPAR) {
348
349 warning_with_id ("OdePkg:InvalidFunctionCall",
350 "function odepkg_rodas_dfxfcn: This warning message should never appear");
351 - return (true);
352 + F77_RETURN (true);
353 }
354
355 // PKG_ADD: autoload ("oders", "dldsolver.oct");
356 diff -uNr a/src/odepkg_octsolver_seulex.cc b/src/odepkg_octsolver_seulex.cc
357 --- a/src/odepkg_octsolver_seulex.cc 2015-05-19 09:48:44.000000000 -0400
358 +++ b/src/odepkg_octsolver_seulex.cc 2016-08-31 14:56:43.990460352 -0400
359 @@ -37,24 +37,28 @@
360 #include <parse.h>
361 #include "odepkg_auxiliary_functions.h"
362
363 -typedef octave_idx_type (*odepkg_seulex_usrtype)
364 +#if ! defined (GCC_ATTR_UNUSED)
365 +# define GCC_ATTR_UNUSED OCTAVE_UNUSED
366 +#endif
367 +
368 +typedef F77_RET_T (*odepkg_seulex_usrtype)
369 (const octave_idx_type& N, const double& X, const double* Y,
370 double* F, GCC_ATTR_UNUSED const double* RPAR,
371 GCC_ATTR_UNUSED const octave_idx_type* IPAR);
372
373 -typedef octave_idx_type (*odepkg_seulex_jactype)
374 +typedef F77_RET_T (*odepkg_seulex_jactype)
375 (const octave_idx_type& N, const double& X, const double* Y,
376 double* DFY, GCC_ATTR_UNUSED const octave_idx_type& LDFY,
377 GCC_ATTR_UNUSED const double* RPAR,
378 GCC_ATTR_UNUSED const octave_idx_type* IPAR);
379
380 -typedef octave_idx_type (*odepkg_seulex_masstype)
381 +typedef F77_RET_T (*odepkg_seulex_masstype)
382 (const octave_idx_type& N, double* AM,
383 GCC_ATTR_UNUSED const octave_idx_type* LMAS,
384 GCC_ATTR_UNUSED const double* RPAR,
385 GCC_ATTR_UNUSED const octave_idx_type* IPAR);
386
387 -typedef octave_idx_type (*odepkg_seulex_soltype)
388 +typedef F77_RET_T (*odepkg_seulex_soltype)
389 (const octave_idx_type& NR, const double& XOLD, const double& X,
390 const double* Y, const double* RC, const octave_idx_type& LRC,
391 const double* IC, const octave_idx_type& LIC,
392 @@ -94,7 +98,7 @@
393 static octave_value vseulexmass;
394 static octave_value vseulexmassstate;
395
396 -octave_idx_type odepkg_seulex_usrfcn
397 +F77_RET_T odepkg_seulex_usrfcn
398 (const octave_idx_type& N, const double& X, const double* Y,
399 double* F, GCC_ATTR_UNUSED const double* RPAR,
400 GCC_ATTR_UNUSED const octave_idx_type* IPAR) {
401 @@ -122,10 +126,10 @@
402 for (octave_idx_type vcnt = 0; vcnt < N; vcnt++)
403 F[vcnt] = vcol(vcnt);
404
405 - return (true);
406 + F77_RETURN (true);
407 }
408
409 -octave_idx_type odepkg_seulex_jacfcn
410 +F77_RET_T odepkg_seulex_jacfcn
411 (const octave_idx_type& N, const double& X, const double* Y,
412 double* DFY, GCC_ATTR_UNUSED const octave_idx_type& LDFY,
413 GCC_ATTR_UNUSED const double* RPAR,
414 @@ -149,7 +153,7 @@
415 for (octave_idx_type vrow = 0; vrow < N; vrow++)
416 DFY[vrow+vcol*N] = vdfy (vrow, vcol);
417
418 - return (true);
419 + F77_RETURN (true);
420 }
421
422 F77_RET_T odepkg_seulex_massfcn
423 @@ -179,10 +183,10 @@
424 for (octave_idx_type vcol = 0; vcol < N; vcol++)
425 AM[vrow+vcol*N] = vam (vrow, vcol);
426
427 - return (true);
428 + F77_RETURN (true);
429 }
430
431 -octave_idx_type odepkg_seulex_solfcn
432 +F77_RET_T odepkg_seulex_solfcn
433 (const octave_idx_type& NR, const double& XOLD, const double& X,
434 const double* Y, const double* RC, const octave_idx_type& LRC,
435 const double* IC, const octave_idx_type& LIC,
436 @@ -249,7 +253,7 @@
437 vseulexpltbrk = true;
438 }
439
440 - return (true);
441 + F77_RETURN (true);
442 }
443
444 // PKG_ADD: autoload ("odesx", "dldsolver.oct");