Mercurial > octave
diff libinterp/corefcn/toplev.h @ 18267:bc139ccccef9 gui-release
Don't echo scripts not executed from the cmd line when using 'echo on'(bug #41202)
* toplev.h (octave_call_stack::all_scripts): New function returns TRUE if all
elements an the call stack are scripts. Add prototype for do_all_scripts().
toplev.cc (octave_call_stack::do_all_scripts): New function to search call
stack scripts only.
* pt-eval.cc (tree_evaluator::visit_statement): Check
octave_call_stack::all_scripts() and don't echo scripts if script is called
from a function.
author | Rik <rik@octave.org> |
---|---|
date | Sun, 12 Jan 2014 18:18:47 -0800 |
parents | 175b392e91fe |
children | 96a495813047 |
line wrap: on
line diff
--- a/libinterp/corefcn/toplev.h Fri Jan 10 19:25:07 2014 -0500 +++ b/libinterp/corefcn/toplev.h Sun Jan 12 18:18:47 2014 -0800 @@ -206,6 +206,12 @@ return instance_ok () ? instance->do_caller_user_code (nskip) : 0; } + // Return TRUE if all elements on the call stack are scripts. + static bool all_scripts (void) + { + return instance_ok () ? instance->do_all_scripts () : false; + } + static void push (octave_function *f, symbol_table::scope_id scope = symbol_table::current_scope (), @@ -352,6 +358,8 @@ octave_user_code *do_caller_user_code (size_t nskip) const; + bool do_all_scripts (void) const; + void do_push (octave_function *f, symbol_table::scope_id scope, symbol_table::context_id context) {