# HG changeset patch # User jwe # Date 750972361 0 # Node ID d1c5e5edbf1e6630629831f74b3647124c1b7ac1 # Parent 21b5993707285a1fddad5fe462a776545119efb7 [project @ 1993-10-18 19:26:01 by jwe] diff --git a/src/balance.cc b/src/balance.cc --- a/src/balance.cc +++ b/src/balance.cc @@ -37,14 +37,14 @@ #ifdef WITH_DLD tree_constant * -builtin_balance_2 (tree_constant *args, int nargin, int nargout) +builtin_balance_2 (const tree_constant *args, int nargin, int nargout) { return balance (args, nargin, nargout); } #endif tree_constant * -balance (tree_constant *args, int nargin, int nargout) +balance (const tree_constant *args, int nargin, int nargout) { char *bal_job; int my_nargin; // # args w/o optional string arg diff --git a/src/colloc.cc b/src/colloc.cc --- a/src/colloc.cc +++ b/src/colloc.cc @@ -34,14 +34,14 @@ #ifdef WITH_DLD tree_constant * -builtin_colloc_2 (tree_constant *args, int nargin, int nargout) +builtin_colloc_2 (const tree_constant *args, int nargin, int nargout) { return collocation_weights (args, nargin); } #endif tree_constant * -collocation_weights (tree_constant *args, int nargin) +collocation_weights (const tree_constant *args, int nargin) { tree_constant *retval = NULL_TREE_CONST; diff --git a/src/dassl.cc b/src/dassl.cc --- a/src/dassl.cc +++ b/src/dassl.cc @@ -39,7 +39,7 @@ #ifdef WITH_DLD tree_constant * -builtin_dassl_2 (tree_constant *args, int nargin, int nargout) +builtin_dassl_2 (const tree_constant *args, int nargin, int nargout) { return dassl (args, nargin, nargout); } @@ -104,7 +104,7 @@ } tree_constant * -dassl (tree_constant *args, int nargin, int nargout) +dassl (const tree_constant *args, int nargin, int nargout) { // Assumes that we have been given the correct number of arguments. diff --git a/src/expm.cc b/src/expm.cc --- a/src/expm.cc +++ b/src/expm.cc @@ -39,7 +39,7 @@ #ifdef WITH_DLD tree_constant * -builtin_matrix_exp_2 (tree_constant *args, int nargin, int nargout) +builtin_matrix_exp_2 (const tree_constant *args, int nargin, int nargout) { tree_constant *retval = new tree_constant [2]; retval[0] = matrix_exp (args[1]); @@ -57,7 +57,7 @@ } tree_constant -matrix_exp (tree_constant& a) +matrix_exp (const tree_constant& a) { tree_constant retval; tree_constant tmp = a.make_numeric (); diff --git a/src/fft.cc b/src/fft.cc --- a/src/fft.cc +++ b/src/fft.cc @@ -35,7 +35,7 @@ #ifdef WITH_DLD tree_constant * -builtin_fft_2 (tree_constant *args, int nargin, int nargout) +builtin_fft_2 (const tree_constant *args, int nargin, int nargout) { tree_constant *retval = new tree_constant [2]; retval[0] = fft (args[1]); @@ -44,7 +44,7 @@ #endif tree_constant -fft (tree_constant& a) +fft (const tree_constant& a) { tree_constant retval; diff --git a/src/fsolve.cc b/src/fsolve.cc --- a/src/fsolve.cc +++ b/src/fsolve.cc @@ -39,7 +39,7 @@ #ifdef WITH_DLD tree_constant * -builtin_fsolve (tree_constant *args, int nargin, int nargout) +builtin_fsolve (const tree_constant *args, int nargin, int nargout) { return fsolve (args, nargin, nargout); } @@ -71,7 +71,7 @@ } ColumnVector -fsolve_user_function (ColumnVector& x) +fsolve_user_function (const ColumnVector& x) { ColumnVector retval; @@ -117,7 +117,7 @@ } tree_constant * -fsolve (tree_constant *args, int nargin, int nargout) +fsolve (const tree_constant *args, int nargin, int nargout) { // Assumes that we have been given the correct number of arguments. diff --git a/src/fsqp.cc b/src/fsqp.cc --- a/src/fsqp.cc +++ b/src/fsqp.cc @@ -39,27 +39,27 @@ #ifdef WITH_DLD tree_constant * -builtin_fsqp_2 (tree_constant *args, int nargin, int nargout) +builtin_fsqp_2 (const tree_constant *args, int nargin, int nargout) { return fsqp (args, nargin, nargout); } #endif double -fsqp_objective_function (ColumnVector& x) +fsqp_objective_function (const ColumnVector& x) { return 0.0; } ColumnVector -fsqp_constraint_function (ColumnVector& x) +fsqp_constraint_function (const ColumnVector& x) { ColumnVector retval; return retval; } tree_constant * -fsqp (tree_constant *args, int nargin, int nargout) +fsqp (const tree_constant *args, int nargin, int nargout) { /* diff --git a/src/givens.cc b/src/givens.cc --- a/src/givens.cc +++ b/src/givens.cc @@ -56,14 +56,14 @@ #ifdef WITH_DLD tree_constant * -builtin_givens_2 (tree_constant *args, int nargin, int nargout) +builtin_givens_2 (const tree_constant *args, int nargin, int nargout) { return givens (args, nargin, nargout); } #endif tree_constant * -givens (tree_constant *args, int nargin, int nargout) +givens (const tree_constant *args, int nargin, int nargout) { tree_constant *retval = NULL_TREE_CONST; diff --git a/src/hess.cc b/src/hess.cc --- a/src/hess.cc +++ b/src/hess.cc @@ -35,14 +35,14 @@ #ifdef WITH_DLD tree_constant * -builtin_hess_2 (tree_constant *args, int nargin, int nargout) +builtin_hess_2 (const tree_constant *args, int nargin, int nargout) { return hess (args, nargin, nargout); } #endif tree_constant * -hess (tree_constant *args, int nargin, int nargout) +hess (const tree_constant *args, int nargin, int nargout) { tree_constant *retval = NULL_TREE_CONST; diff --git a/src/ifft.cc b/src/ifft.cc --- a/src/ifft.cc +++ b/src/ifft.cc @@ -35,7 +35,7 @@ #ifdef WITH_DLD tree_constant * -builtin_ifft_2 (tree_constant *args, int nargin, int nargout) +builtin_ifft_2 (const tree_constant *args, int nargin, int nargout) { tree_constant *retval = new tree_constant [2]; retval[0] = ifft (args[1]); @@ -44,7 +44,7 @@ #endif tree_constant -ifft (tree_constant& a) +ifft (const tree_constant& a) { tree_constant retval; diff --git a/src/inv.cc b/src/inv.cc --- a/src/inv.cc +++ b/src/inv.cc @@ -35,7 +35,7 @@ #ifdef WITH_DLD tree_constant * -builtin_inv (tree_constant *args, int nargin, int nargout) +builtin_inv (const tree_constant *args, int nargin, int nargout) { tree_constant *retval = new tree_constant [2]; retval[0] = inverse (args[1]); @@ -44,7 +44,7 @@ #endif tree_constant -inverse (tree_constant& a) +inverse (const tree_constant& a) { tree_constant retval; diff --git a/src/lpsolve.cc b/src/lpsolve.cc --- a/src/lpsolve.cc +++ b/src/lpsolve.cc @@ -33,14 +33,14 @@ #ifdef WITH_DLD tree_constant * -builtin_lpsolve_2 (tree_constant *args, int nargin, int nargout) +builtin_lpsolve_2 (const tree_constant *args, int nargin, int nargout) { return lpsolve (args, nargin, nargout); } #endif tree_constant * -lpsolve (tree_constant *args, int nargin, int nargout) +lpsolve (const tree_constant *args, int nargin, int nargout) { // Assumes that we have been given the correct number of arguments. diff --git a/src/lsode.cc b/src/lsode.cc --- a/src/lsode.cc +++ b/src/lsode.cc @@ -39,7 +39,7 @@ #ifdef WITH_DLD tree_constant * -builtin_lsode_2 (tree_constant *args, int nargin, int nargout) +builtin_lsode_2 (const tree_constant *args, int nargin, int nargout) { return lsode (args, nargin, nargout); } @@ -93,7 +93,7 @@ } tree_constant * -lsode (tree_constant *args, int nargin, int nargout) +lsode (const tree_constant *args, int nargin, int nargout) { // Assumes that we have been given the correct number of arguments. diff --git a/src/lu.cc b/src/lu.cc --- a/src/lu.cc +++ b/src/lu.cc @@ -34,14 +34,14 @@ #ifdef WITH_DLD tree_constant * -builtin_lu_2 (tree_constant *args, int nargin, int nargout) +builtin_lu_2 (const tree_constant *args, int nargin, int nargout) { return lu (args[1], nargout); } #endif tree_constant * -lu (tree_constant& a, int nargout) +lu (const tree_constant& a, int nargout) { tree_constant *retval = new tree_constant [4]; diff --git a/src/npsol.cc b/src/npsol.cc --- a/src/npsol.cc +++ b/src/npsol.cc @@ -42,14 +42,14 @@ #ifdef WITH_DLD tree_constant * -builtin_npsol_2 (tree_constant *args, int nargin, int nargout) +builtin_npsol_2 (const tree_constant *args, int nargin, int nargout) { return npsol (args, nargin, nargout); } #endif double -npsol_objective_function (ColumnVector& x) +npsol_objective_function (const ColumnVector& x) { int n = x.capacity (); @@ -116,7 +116,7 @@ } ColumnVector -npsol_constraint_function (ColumnVector& x) +npsol_constraint_function (const ColumnVector& x) { ColumnVector retval; @@ -214,15 +214,15 @@ else if (nllb_len != nlub_len || nllb_len != c_len) { ok = 0; - error ("%s: nonlinear constraints have inconsistent dimensions" - warn_for,); + error ("%s: nonlinear constraints have inconsistent dimensions", + warn_for); } } return ok; } tree_constant * -npsol (tree_constant *args, int nargin, int nargout) +npsol (const tree_constant *args, int nargin, int nargout) { /* diff --git a/src/qpsol.cc b/src/qpsol.cc --- a/src/qpsol.cc +++ b/src/qpsol.cc @@ -45,14 +45,14 @@ #ifdef WITH_DLD tree_constant * -builtin_qpsol_2 (tree_constant *args, int nargin, int nargout) +builtin_qpsol_2 (const tree_constant *args, int nargin, int nargout) { return qpsol (args, nargin, nargout); } #endif tree_constant * -qpsol (tree_constant *args, int nargin, int nargout) +qpsol (const tree_constant *args, int nargin, int nargout) { /* diff --git a/src/qr.cc b/src/qr.cc --- a/src/qr.cc +++ b/src/qr.cc @@ -34,14 +34,14 @@ #ifdef WITH_DLD tree_constant * -builtin_qr_2 (tree_constant *args, int nargin, int nargout) +builtin_qr_2 (const tree_constant *args, int nargin, int nargout) { return qr (args[1], nargout); } #endif tree_constant * -qr (tree_constant& a, int nargout) +qr (const tree_constant& a, int nargout) { tree_constant *retval = new tree_constant [3]; diff --git a/src/quad.cc b/src/quad.cc --- a/src/quad.cc +++ b/src/quad.cc @@ -40,7 +40,7 @@ #ifdef WITH_DLD tree_constant * -builtin_quad_2 (tree_constant *args, int nargin, int nargout) +builtin_quad_2 (const tree_constant *args, int nargin, int nargout) { return do_quad (args, nargin, nargout); } @@ -77,7 +77,7 @@ } tree_constant * -do_quad (tree_constant *args, int nargin, int nargout) +do_quad (const tree_constant *args, int nargin, int nargout) { // Assumes that we have been given the correct number of arguments. diff --git a/src/qzval.cc b/src/qzval.cc --- a/src/qzval.cc +++ b/src/qzval.cc @@ -51,14 +51,14 @@ #ifdef WITH_DLD tree_constant * -builtin_qzvalue_2 (tree_constant *args, int nargin, int nargout) +builtin_qzvalue_2 (const tree_constant *args, int nargin, int nargout) { return qzvalue (args, nargin, nargout); } #endif tree_constant * -qzvalue (tree_constant *args, int nargin, int nargout) +qzvalue (const tree_constant *args, int nargin, int nargout) { tree_constant *retval = NULL_TREE_CONST; diff --git a/src/rand.cc b/src/rand.cc --- a/src/rand.cc +++ b/src/rand.cc @@ -47,7 +47,7 @@ #ifdef WITH_DLD tree_constant * -builtin_rand_2 (tree_constant *args, int nargin, int nargout) +builtin_rand_2 (const tree_constant *args, int nargin, int nargout) { return rand_internal (args, nargin, nargout); } @@ -103,7 +103,7 @@ } tree_constant * -rand_internal (tree_constant *args, int nargin, int nargout) +rand_internal (const tree_constant *args, int nargin, int nargout) { // Assumes that we have been given the correct number of arguments. diff --git a/src/schur.cc b/src/schur.cc --- a/src/schur.cc +++ b/src/schur.cc @@ -35,14 +35,14 @@ #ifdef WITH_DLD tree_constant * -builtin_schur_2 (tree_constant *args, int nargin, int nargout) +builtin_schur_2 (const tree_constant *args, int nargin, int nargout) { return schur (args, nargin, nargout); } #endif tree_constant * -schur (tree_constant *args, int nargin, int nargout) +schur (const tree_constant *args, int nargin, int nargout) { tree_constant *retval = NULL_TREE_CONST; diff --git a/src/svd.cc b/src/svd.cc --- a/src/svd.cc +++ b/src/svd.cc @@ -35,14 +35,14 @@ #ifdef WITH_DLD tree_constant * -builtin_svd_2 (tree_constant *args, int nargin, int nargout) +builtin_svd_2 (const tree_constant *args, int nargin, int nargout) { return svd (args, nargin, nargout); } #endif tree_constant * -svd (tree_constant *args, int nargin, int nargout) +svd (const tree_constant *args, int nargin, int nargout) { tree_constant *retval = NULL_TREE_CONST; diff --git a/src/syl.cc b/src/syl.cc --- a/src/syl.cc +++ b/src/syl.cc @@ -52,14 +52,14 @@ #ifdef WITH_DLD tree_constant * -builtin_syl_2 (tree_constant *args, int nargin, int nargout) +builtin_syl_2 (const tree_constant *args, int nargin, int nargout) { return syl (args, nargin, nargout); } #endif tree_constant * -syl (tree_constant *args, int nargin, int nargout) +syl (const tree_constant *args, int nargin, int nargout) { tree_constant *retval = NULL_TREE_CONST;