28#if defined (HAVE_CONFIG_H)
63 m_all_args.resize (1);
87 octave_print_terse_usage_and_exit ();
95 m_read_history_file =
false;
99 m_no_window_system =
true;
115 if (m_code_to_eval.empty ())
118 m_code_to_eval += (std::string (
" ")
124 m_read_user_files =
false;
125 m_read_site_files =
false;
133 octave_print_verbose_usage_and_exit ();
137 m_forced_interactive =
true;
146 m_inhibit_startup_message =
true;
150 m_echo_commands =
true;
154 octave_print_version_and_exit ();
173#if defined (HAVE_QSCINTILLA)
174 m_experimental_terminal_widget =
true;
194 m_forced_line_editing = m_line_editing =
true;
198 m_read_user_files =
false;
202 m_set_initial_path =
false;
206 m_line_editing =
false;
210 m_read_site_files =
false;
214 m_inhibit_startup_tests =
true;
231 m_traditional =
true;
240 std::cerr <<
"unexpected option (= " << optc <<
") - please report this bug\n";
241 std::exit (EXIT_FAILURE);
295 : m_options (argc, argv)
319 std::size_t pos = pname.find_last_of (sys::file_ops::dir_sep_chars ());
321 m_program_name = (pos != std::string::npos) ? pname.substr (pos+1) : pname;
394 throw std::runtime_error
395 (
"only one Octave application object may be active");
413 std::cerr << R
"(error: --eval "CODE" and script file are mutually exclusive options)" << std::endl;
415 octave_print_terse_usage_and_exit ();
422 std::cerr <<
"error: --gui and --no-window-system are mutually exclusive options" << std::endl;
423 octave_print_terse_usage_and_exit ();
427 std::cerr <<
"error: --gui and --no-line-editing are mutually exclusive options" << std::endl;
428 octave_print_terse_usage_and_exit ();
432 std::cerr <<
"error: --gui and --server are mutually exclusive options" << std::endl;
433 octave_print_terse_usage_and_exit ();
451 int status = interp.
execute ();
456DEFUN (isguirunning, args, ,
463 if (args.length () != 0)
477DEFUN (__is_multi_threaded__, args, ,
484 if (args.length () != 0)
519 if (args.length () != 0)
542 if (args.length () != 0)
548 error (
"invalid application context!");
560DEFUN (program_invocation_name, args, ,
574 if (args.length () != 0)
585DEFUN (program_name, args, ,
594 if (args.length () != 0)
605OCTAVE_END_NAMESPACE(octave)
application(const cmdline_options &opts=cmdline_options())
virtual int execute_interpreter()
void set_program_names(const std::string &pname)
static application * app()
static bool forced_interactive()
void intern_argv(const string_vector &args)
cmdline_options options() const
static std::string program_name()
static string_vector argv()
bool interpreter_is_initialized() const
bool m_have_eval_option_code
std::string m_program_name
static bool is_gui_running()
virtual void initialize_interpreter()
virtual interpreter & create_interpreter()
bool experimental_terminal_widget() const
std::unique_ptr< interpreter > m_interpreter
static std::string program_invocation_name()
cmdline_options m_options
std::string m_program_invocation_name
static bool is_multi_threaded()
virtual void delete_interpreter()
bool line_editing() const
bool forced_interactive() const
bool experimental_terminal_widget() const
std::string texi_macros_file() const
bool inhibit_startup_message() const
std::string doc_cache_file() const
std::string image_path() const
bool read_site_files() const
string_vector remaining_args() const
bool read_user_files() const
std::string info_program() const
bool read_history_file() const
std::string exec_path() const
bool no_window_system() const
std::string code_to_eval() const
string_vector all_args() const
std::string info_file() const
std::string docstrings_file() const
bool echo_commands() const
bool set_initial_path() const
bool forced_line_editing() const
bool inhibit_startup_tests() const
std::list< std::string > command_line_path() const
octave_value as_octave_value() const
void assign(const std::string &k, const octave_value &val)
void resize(octave_idx_type n, const std::string &rfv="")
octave_idx_type numel() const
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
#define DEFUN(name, args_name, nargout_name, doc)
Macro to define a builtin function.
void error(const char *fmt,...)
int octave_getopt_long_wrapper(int argc, char **argv, const char *shortopts, const struct octave_getopt_options *longopts, int *longind)
char * octave_optarg_wrapper(void)
int octave_optind_wrapper(void)
#define NO_INIT_PATH_OPTION
#define NO_INIT_SITE_OPTION
#define LINE_EDITING_OPTION
#define TRADITIONAL_OPTION
#define BUILT_IN_DOCSTRINGS_FILE_OPTION
#define DOC_CACHE_FILE_OPTION
#define EXPERIMENTAL_TERMINAL_WIDGET_OPTION
#define NO_LINE_EDITING_OPTION
#define TEXI_MACROS_FILE_OPTION
#define NO_INIT_USER_OPTION
struct octave_getopt_options long_opts[]
#define IMAGE_PATH_OPTION
#define NO_STARTUP_TESTS_OPTION
octave_value_list ovl(const OV_Args &... args)
Construct an octave_value_list with less typing.