28 #if defined (HAVE_CONFIG_H)
61 m_all_args.resize (1);
85 octave_print_terse_usage_and_exit ();
89 m_read_history_file =
false;
93 m_no_window_system =
true;
97 m_verbose_flag =
true;
106 m_read_init_files =
false;
107 m_read_site_files =
false;
111 octave_print_verbose_usage_and_exit ();
115 m_forced_interactive =
true;
124 m_inhibit_startup_message =
true;
128 m_echo_commands =
true;
132 octave_print_version_and_exit ();
148 if (m_code_to_eval.empty ())
151 m_code_to_eval += (std::string (
" ")
162 #if defined (HAVE_QSCINTILLA)
163 m_experimental_terminal_widget =
true;
187 m_forced_line_editing = m_line_editing =
true;
195 m_read_init_files =
false;
199 m_set_initial_path =
false;
203 m_line_editing =
false;
207 m_read_site_files =
false;
224 m_traditional =
true;
252 m.assign (
"gui",
gui ());
260 m.assign (
"server",
server ());
282 : m_options (argc, argv)
308 m_program_name = (pos != std::string::npos) ? pname.substr (pos+1) : pname;
381 throw std::runtime_error
382 (
"only one Octave application object may be active");
400 std::cerr << R
"(error: --eval "CODE" and script file are mutually exclusive options)" << std::endl;
402 octave_print_terse_usage_and_exit ();
409 std::cerr <<
"error: --gui and --no-window-system are mutually exclusive options" << std::endl;
410 octave_print_terse_usage_and_exit ();
414 std::cerr <<
"error: --gui and --no-line-editing are mutually exclusive options" << std::endl;
415 octave_print_terse_usage_and_exit ();
419 std::cerr <<
"error: --gui and --server are mutually exclusive options" << std::endl;
420 octave_print_terse_usage_and_exit ();
437 int status = interp.
execute ();
442 DEFUN (isguirunning, args, ,
449 if (args.length () != 0)
484 if (args.length () != 0)
507 if (args.length () != 0)
513 error (
"invalid application context!");
525 DEFUN (program_invocation_name, args, ,
539 if (args.length () != 0)
550 DEFUN (program_name, args, ,
559 if (args.length () != 0)
570 OCTAVE_END_NAMESPACE(
octave)
application(const cmdline_options &opts=cmdline_options())
virtual int execute_interpreter()
void set_program_names(const std::string &pname)
static bool forced_interactive()
void intern_argv(const string_vector &args)
static application * app()
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
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
std::string info_program() const
bool read_history_file() const
std::string exec_path() const
bool no_window_system() const
std::list< std::string > command_line_path() const
std::string code_to_eval() const
string_vector all_args() const
std::string info_file() const
bool verbose_flag() const
std::string docstrings_file() const
bool echo_commands() const
bool read_init_files() const
bool set_initial_path() const
bool forced_line_editing() const
octave_value as_octave_value() const
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,...)
#define panic_impossible()
std::string dir_sep_chars()
char * octave_optarg_wrapper(void)
int octave_getopt_long_wrapper(int argc, char **argv, const char *shortopts, const struct octave_getopt_options *longopts, int *longind)
int octave_optind_wrapper(void)
#define NO_INIT_PATH_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_SITE_FILE_OPTION
#define NO_LINE_EDITING_OPTION
#define TEXI_MACROS_FILE_OPTION
struct octave_getopt_options long_opts[]
#define IMAGE_PATH_OPTION
#define NO_INIT_FILE_OPTION
octave_value_list ovl(const OV_Args &... args)
Construct an octave_value_list with less typing.