diff libinterp/corefcn/interpreter.h @ 23102:373771419d51

refactor interpreter::execute * octave.h, octave.cc (application::m_have_eval_option_code): New data member. (application::have_eval_option_code): New function. (application::init): Initialize m_have_eval_option_code. * interpreter.h, interpreter.cc: Use const reference symbol to refer to application options. (interpreter::execute_eval_option_code, interpreter::execute_command_line_file): Now private. Eliminate arguments. (interpreter::execute_startup_files): Make member function from file scope static function. Eliminate arguments. (display_startup_message): New function. (execute_internal): Refactor. (execute_command_line_file): Use unwind_protect to restore application arguments.
author John W. Eaton <jwe@octave.org>
date Fri, 27 Jan 2017 11:13:47 -0500
parents 0fed4c678795
children 09c72a320925
line wrap: on
line diff
--- a/libinterp/corefcn/interpreter.h	Fri Jan 27 11:04:10 2017 -0500
+++ b/libinterp/corefcn/interpreter.h	Fri Jan 27 11:13:47 2017 -0500
@@ -109,10 +109,6 @@
 
     int execute (void);
 
-    int execute_eval_option_code (const std::string& code);
-
-    int execute_command_line_file (const std::string& fname);
-
     bool interactive (void) const { return m_interactive; }
     void interactive (bool arg) { m_interactive = arg; }
 
@@ -120,6 +116,14 @@
 
     int execute_internal (void);
 
+    void display_startup_message (void) const;
+
+    int execute_startup_files (void) const;
+
+    int execute_eval_option_code (void);
+
+    int execute_command_line_file (void);
+
     int main_loop (void);
 
     void cleanup (void);