Mercurial > hg > octave-terminal
changeset 540:c07674bbc3b1
[project @ 1994-07-21 23:59:00 by jwe]
author | jwe |
---|---|
date | Fri, 22 Jul 1994 00:01:29 +0000 |
parents | 5ec10a984241 |
children | a8d5d1072d99 |
files | src/dassl.cc src/defun-int.h src/fsolve.cc src/lsode.cc src/npsol.cc src/qpsol.cc src/quad.cc |
diffstat | 7 files changed, 26 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/src/dassl.cc +++ b/src/dassl.cc @@ -173,8 +173,8 @@ struct DAE_OPTIONS { - char *keyword; - char *kw_tok[MAX_TOKENS + 1]; + const char *keyword; + const char *kw_tok[MAX_TOKENS + 1]; int min_len[MAX_TOKENS + 1]; int min_toks_to_match; d_set_opt_mf d_set_fcn; @@ -227,7 +227,7 @@ DAE_OPTIONS *list = dassl_option_table; - char *keyword; + const char *keyword; while ((keyword = list->keyword) != 0) { output_buf.form (" %-40s ", keyword);
--- a/src/defun-int.h +++ b/src/defun-int.h @@ -51,18 +51,23 @@ Octave_object \ fname (const Octave_object& args, int nargout) +// XXX FIXME XXX -- eliminate the need for these in the functions that +// use them? + #define DEFINE_ARGV(warnfor) \ int argc = args.length (); \ + int save_argc = argc; \ char **argv = make_argv (args, warnfor); \ + char **save_argv = argv; \ if (error_state) \ return retval #define DELETE_ARGV \ do \ { \ - while (--argc) \ - delete [] argv[argc]; \ - delete [] argv; \ + while (--save_argc >= 0) \ + delete [] save_argv[save_argc]; \ + delete [] save_argv; \ } \ while (0)
--- a/src/fsolve.cc +++ b/src/fsolve.cc @@ -172,8 +172,8 @@ struct NLEQN_OPTIONS { - char *keyword; - char *kw_tok[MAX_TOKENS + 1]; + const char *keyword; + const char *kw_tok[MAX_TOKENS + 1]; int min_len[MAX_TOKENS + 1]; int min_toks_to_match; d_set_opt_mf d_set_fcn; @@ -208,7 +208,7 @@ NLEQN_OPTIONS *list = fsolve_option_table; - char *keyword; + const char *keyword; while ((keyword = list->keyword) != 0) { output_buf.form (" %-40s ", keyword);
--- a/src/lsode.cc +++ b/src/lsode.cc @@ -154,8 +154,8 @@ struct ODE_OPTIONS { - char *keyword; - char *kw_tok[MAX_TOKENS + 1]; + const char *keyword; + const char *kw_tok[MAX_TOKENS + 1]; int min_len[MAX_TOKENS + 1]; int min_toks_to_match; d_set_opt_mf d_set_fcn; @@ -214,7 +214,7 @@ ODE_OPTIONS *list = lsode_option_table; - char *keyword; + const char *keyword; while ((keyword = list->keyword) != 0) { output_buf.form (" %-40s ", keyword);
--- a/src/npsol.cc +++ b/src/npsol.cc @@ -522,8 +522,8 @@ struct NPSOL_OPTIONS { - char *keyword; - char *kw_tok[MAX_TOKENS + 1]; + const char *keyword; + const char *kw_tok[MAX_TOKENS + 1]; int min_len[MAX_TOKENS + 1]; int min_toks_to_match; d_set_opt_mf d_set_fcn; @@ -674,7 +674,7 @@ NPSOL_OPTIONS *list = npsol_option_table; - char *keyword; + const char *keyword; while ((keyword = list->keyword) != 0) { output_buf.form (" %-40s ", keyword);
--- a/src/qpsol.cc +++ b/src/qpsol.cc @@ -226,8 +226,8 @@ struct QPSOL_OPTIONS { - char *keyword; - char *kw_tok[MAX_TOKENS + 1]; + const char *keyword; + const char *kw_tok[MAX_TOKENS + 1]; int min_len[MAX_TOKENS + 1]; int min_toks_to_match; d_set_opt_mf d_set_fcn; @@ -282,7 +282,7 @@ QPSOL_OPTIONS *list = qpsol_option_table; - char *keyword; + const char *keyword; while ((keyword = list->keyword) != 0) { output_buf.form (" %-40s ", keyword);
--- a/src/quad.cc +++ b/src/quad.cc @@ -206,8 +206,8 @@ struct QUAD_OPTIONS { - char *keyword; - char *kw_tok[MAX_TOKENS + 1]; + const char *keyword; + const char *kw_tok[MAX_TOKENS + 1]; int min_len[MAX_TOKENS + 1]; int min_toks_to_match; d_set_opt_mf d_set_fcn; @@ -248,7 +248,7 @@ QUAD_OPTIONS *list = quad_option_table; - char *keyword; + const char *keyword; while ((keyword = list->keyword) != 0) { output_buf.form (" %-40s ", keyword);