Mercurial > hg > octave-max
changeset 3772:e44ffad3d06c
[project @ 2001-02-03 06:23:38 by jwe]
author | jwe |
---|---|
date | Sat, 03 Feb 2001 06:23:38 +0000 |
parents | 0486ba746bc1 |
children | ce8dd7225985 |
files | src/ChangeLog src/input.cc src/parse.h src/pt-bp.h src/pt.cc src/pt.h |
diffstat | 6 files changed, 43 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,16 @@ +2001-02-02 John W. Eaton <jwe@bevo.che.wisc.edu> + + * input.cc (get_user_input): Handle dbg_cont and dbg_step here. + * debug.cc (Fdbg_cont): Delete. + * pt-bp.h (MAYBE_DO_BREAKPOINT): Check tree::break_next here. + * pt.h (tree::break_next): New static member. + * pt.cc: Initialize it. + + * parse.h (feval (const octave_value_list&, int)): + Set default value for nargout. + (feval (const std::string&, const octave_value_list&, int)): + Set default values for args and nargout. + 2001-02-01 Ben Sapp <bsapp@lanl.gov> * DLD-FUNCTIONS/debug.cc: New file.
--- a/src/input.cc +++ b/src/input.cc @@ -58,6 +58,7 @@ #include "pager.h" #include "parse.h" #include "pathlen.h" +#include "pt.h" #include "pt-const.h" #include "sighandlers.h" #include "symtab.h" @@ -540,14 +541,23 @@ } } - if (debug - && (match_sans_spaces ("exit", input_buf) + if (debug) + { + if (match_sans_spaces ("exit", input_buf) || match_sans_spaces ("quit", input_buf) - || match_sans_spaces ("return", input_buf))) - { - return retval; + || match_sans_spaces ("return", input_buf) + || match_sans_spaces ("dbg_cont", input_buf)) + { + return retval; + } + else if (match_sans_spaces ("dbg_step", input_buf)) + { + tree::break_next = true; + return retval; + } } - else if (read_as_string) + + if (read_as_string) { // XXX FIXME XXX -- fix gnu_readline and octave_gets instead! if (input_buf.length () == 1 && input_buf[0] == '\n')
--- a/src/parse.h +++ b/src/parse.h @@ -38,8 +38,8 @@ class tree_identifier; class symbol_record; class symbol_table; -class octave_value; -class octave_value_list; + +#include "oct-obj.h" // Temporary symbol table pointer used to cope with bogus function syntax. extern symbol_table *tmp_local_sym_tab; @@ -90,10 +90,12 @@ load_fcn_from_file (symbol_record *sym_rec, bool exec_script); extern octave_value_list -feval (const std::string& name, const octave_value_list& args, int nargout); +feval (const std::string& name, + const octave_value_list& args = octave_value_list (), + int nargout = 0); extern octave_value_list -feval (const octave_value_list& args, int nargout); +feval (const octave_value_list& args, int nargout = 0); extern octave_value_list eval_string (const std::string&, bool silent, int& parse_status, int hargout);
--- a/src/pt-bp.h +++ b/src/pt-bp.h @@ -166,8 +166,9 @@ #define MAYBE_DO_BREAKPOINT \ do \ { \ - if (is_breakpoint ()) \ + if (tree::break_next || is_breakpoint ()) \ { \ + tree::break_next = false; \ octave_stdout << "line: " << line () << endl; \ do_keyboard (); \ } \