Mercurial > hg > octave-lojdl
changeset 3507:00fdd363c098
[project @ 2000-02-01 21:31:44 by jwe]
author | jwe |
---|---|
date | Tue, 01 Feb 2000 21:31:45 +0000 |
parents | ed0e55953260 |
children | 5fcfe05d76e1 |
files | liboctave/ChangeLog liboctave/DASSL.cc liboctave/LSODE.cc liboctave/NLEqn.cc liboctave/Quad.cc |
diffstat | 5 files changed, 51 insertions(+), 48 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,5 +1,10 @@ 2000-02-01 John W. Eaton <jwe@bevo.che.wisc.edu> + * DASSL.cc (dassl_fcn_ptr, dassl_jac_ptr): New typedefs. + * LSODE.cc: lsode_fcn_ptr, lsode_jac_ptr): Ditto. + * Quad.cc (quad_fcn_ptr): Ditto. + * NLEqn.cc (hybrd1_fcn_ptr, hybrj1_fcn_ptr): Ditto. + * oct-getopt.h, oct-getopt.c: New files for interface to getopt. * oct-kpse.h, oct-kpse.c: New files for interface to kpathsearch.
--- a/liboctave/DASSL.cc +++ b/liboctave/DASSL.cc @@ -35,20 +35,19 @@ #include "f77-fcn.h" #include "lo-error.h" +typedef int (*dassl_fcn_ptr) (const double&, double*, double*, + double*, int&, double*, int*); + +typedef int (*dassl_jac_ptr) (const double&, double*, double*, + double*, const double&, double*, int*); + extern "C" -{ - int F77_FCN (ddassl, DDASSL) (int (*)(const double&, double*, - double*, double*, int&, - double*, int*), - const int&, double&, double*, double*, - double&, const int*, const double&, - const double&, int&, double*, - const int&, int*, const int&, - const double*, const int*, - int (*)(const double&, double*, - double*, double*, const - double&, double*, int*)); -} +int F77_FCN (ddassl, DDASSL) (dassl_fcn_ptr, const int&, double&, + double*, double*, double&, const int*, + const double&, const double&, int&, + double*, const int&, int*, const int&, + const double*, const int*, + dassl_jac_ptr); static DAEFunc::DAERHSFunc user_fun; static DAEFunc::DAEJacFunc user_jac;
--- a/liboctave/LSODE.cc +++ b/liboctave/LSODE.cc @@ -37,18 +37,18 @@ #include "f77-fcn.h" #include "lo-error.h" +typedef int (*lsode_fcn_ptr) (const int&, const double&, double*, + double*, int&); + +typedef int (*lsode_jac_ptr) (const int&, const double&, double*, + const int&, const int&, double*, const + int&); + extern "C" -{ - int F77_FCN (lsode, LSODE) (int (*)(const int&, const double&, - double*, double*, int&), - int&, double*, double&, double&, int&, - double&, double&, int&, int&, int&, - double*, int&, int*, int&, - int (*)(const int&, const double&, - double*, const int&, const int&, - double*, const int&), - int&); -} +int F77_FCN (lsode, LSODE) (lsode_fcn_ptr, int&, double*, double&, + double&, int&, double&, double&, int&, + int&, int&, double*, int&, int*, int&, + lsode_jac_ptr, int&); static ODEFunc::ODERHSFunc user_fun; static ODEFunc::ODEJacFunc user_jac;
--- a/liboctave/NLEqn.cc +++ b/liboctave/NLEqn.cc @@ -33,19 +33,19 @@ #include "f77-fcn.h" #include "lo-error.h" +typedef int (*hybrd1_fcn_ptr) (int*, double*, double*, int*); + extern "C" -{ - int F77_FCN (hybrd1, HYBRD1) (int (*)(int*, double*, double*, int*), - const int&, double*, double*, - const double&, int&, double*, - const int&); +int F77_FCN (hybrd1, HYBRD1) (hybrd1_fcn_ptr, const int&, double*, + double*, const double&, int&, double*, + const int&); - int F77_FCN (hybrj1, HYBRJ1) (int (*)(int*, double*, double*, - double*, int*, int*), - const int&, double*, double*, double*, - const int&, const double&, int&, - double*, const int&); -} +typedef int (*hybrj1_fcn_ptr) (int*, double*, double*, double*, int*, int*); + +extern "C" +int F77_FCN (hybrj1, HYBRJ1) (hybrj1_fcn_ptr, const int&, double*, + double*, double*, const int&, const + double&, int&, double*, const int&); static NLFunc::nonlinear_fcn user_fun; static NLFunc::jacobian_fcn user_jac;
--- a/liboctave/Quad.cc +++ b/liboctave/Quad.cc @@ -41,21 +41,20 @@ // function, and the user wants us to quit. int quad_integration_error = 0; +typedef int (*quad_fcn_ptr) (double*, int&, double*); + extern "C" -{ - int F77_FCN (dqagp, DQAGP) (int (*)(double*, int&, double*), - const double&, const double&, - const int&, const double*, - const double&, const double&, double&, - double&, int&, int&, const int&, - const int&, int&, int*, double*); +int F77_FCN (dqagp, DQAGP) (quad_fcn_ptr, const double&, const double&, + const int&, const double*, const double&, + const double&, double&, double&, int&, + int&, const int&, const int&, int&, int*, + double*); - int F77_FCN (dqagi, DQAGI) (int (*)(double*, int&, double*), - const double&, const int&, - const double&, const double&, double&, - double&, int&, int&, const int&, - const int&, int&, int*, double*); -} +extern "C" +int F77_FCN (dqagi, DQAGI) (quad_fcn_ptr, const double&, const int&, + const double&, const double&, double&, + double&, int&, int&, const int&, + const int&, int&, int*, double*); static int user_function (double *x, int& ierr, double *result)