28#if defined (HAVE_CONFIG_H)
61 m_all_args.resize (1);
85 octave_print_terse_usage_and_exit ();
93 m_read_history_file =
false;
97 m_no_window_system =
true;
113 if (m_code_to_eval.empty ())
116 m_code_to_eval += (std::string (
" ")
122 m_read_user_files =
false;
123 m_read_site_files =
false;
131 octave_print_verbose_usage_and_exit ();
135 m_forced_interactive =
true;
144 m_inhibit_startup_message =
true;
148 m_echo_commands =
true;
152 octave_print_version_and_exit ();
171#if defined (HAVE_QSCINTILLA)
172 m_experimental_terminal_widget =
true;
192 m_forced_line_editing = m_line_editing =
true;
196 m_read_user_files =
false;
200 m_set_initial_path =
false;
204 m_line_editing =
false;
208 m_read_site_files =
false;
225 m_traditional =
true;
235 error (
"unexpected option (= %d) - please reportt this bug", optc);
288 : m_options (argc, argv)
312 std::size_t pos = pname.find_last_of (sys::file_ops::dir_sep_chars ());
314 m_program_name = (pos != std::string::npos) ? pname.substr (pos+1) : pname;
387 throw std::runtime_error
388 (
"only one Octave application object may be active");
406 std::cerr << R
"(error: --eval "CODE" and script file are mutually exclusive options)" << std::endl;
408 octave_print_terse_usage_and_exit ();
415 std::cerr <<
"error: --gui and --no-window-system are mutually exclusive options" << std::endl;
416 octave_print_terse_usage_and_exit ();
420 std::cerr <<
"error: --gui and --no-line-editing are mutually exclusive options" << std::endl;
421 octave_print_terse_usage_and_exit ();
425 std::cerr <<
"error: --gui and --server are mutually exclusive options" << std::endl;
426 octave_print_terse_usage_and_exit ();
443 int status = interp.
execute ();
448DEFUN (isguirunning, args, ,
455 if (args.length () != 0)
469DEFUN (__is_multi_threaded__, args, ,
476 if (args.length () != 0)
511 if (args.length () != 0)
534 if (args.length () != 0)
540 error (
"invalid application context!");
552DEFUN (program_invocation_name, args, ,
566 if (args.length () != 0)
577DEFUN (program_name, args, ,
586 if (args.length () != 0)
597OCTAVE_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
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
octave_value_list ovl(const OV_Args &... args)
Construct an octave_value_list with less typing.