GNU Octave  4.0.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions | Variables
octave.cc File Reference
#include <cassert>
#include <clocale>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <fcntl.h>
#include <getopt.h>
#include <sys/types.h>
#include <unistd.h>
#include "cmd-edit.h"
#include "f77-fcn.h"
#include "file-ops.h"
#include "file-stat.h"
#include "lo-error.h"
#include "oct-env.h"
#include "str-vec.h"
#include "builtins.h"
#include "defaults.h"
#include "Cell.h"
#include "defun.h"
#include "display.h"
#include "error.h"
#include "file-io.h"
#include "help.h"
#include "input.h"
#include "lex.h"
#include "load-path.h"
#include "load-save.h"
#include "octave.h"
#include "oct-conf.h"
#include "oct-hist.h"
#include "oct-map.h"
#include "oct-mutex.h"
#include "oct-obj.h"
#include "ops.h"
#include "options-usage.h"
#include "ov.h"
#include "ov-classdef.h"
#include "ov-range.h"
#include "toplev.h"
#include "parse.h"
#include "procstream.h"
#include "sighandlers.h"
#include "sysdep.h"
#include "unwind-prot.h"
#include "utils.h"
#include "variables.h"
#include <version.h>
Include dependency graph for octave.cc:

Go to the source code of this file.

Functions

static bool check_starting_gui (void)
 
static void execute_command_line_file (const std::string &fname)
 
static int execute_eval_option_code (const std::string &code)
 
static void execute_startup_files (void)
 
F77_RET_T F77_FUNC (xerbla, XERBLA)(F77_CONST_CHAR_ARG_DECL
 
OCTAVE_EXPORT octave_value_list F__version_info__ (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fargv (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fisguirunning (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fprogram_invocation_name (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fprogram_name (const octave_value_list &args, int)
 
static void gripe_safe_source_exception (const std::string &file, const std::string &msg)
 
static void initialize_error_handlers ()
 
static void initialize_version_info (void)
 
void install_builtins (void)
 
static void intern_argv (int argc, char **argv)
 
static void lo_error_handler (const char *fmt,...)
 
static void lo_error_with_id_handler (const char *id, const char *fmt,...)
 
static void maximum_braindamage (void)
 
int octave_execute_interpreter (void)
 
void octave_initialize_interpreter (int argc, char **argv, int embedded)
 
int octave_main (int argc, char **argv, int embedded)
 
void octave_process_command_line (int argc, char **argv)
 
int octave_starting_gui (void)
 
static void safe_source_file (const std::string &file_name, const std::string &context=std::string(), bool verbose=false, bool require_file=true, const std::string &warn_for=std::string())
 

Variables

static bool an_octave_program = false
 
static std::string code_to_eval
 
static std::list< std::string > command_line_path
 
static std::string exec_path
 
F77_RET_T const octave_idx_typeF77_CHAR_ARG_LEN_DECL
 
static bool force_gui_option = false
 
static bool forced_line_editing = false
 
static std::string image_path
 
static bool inhibit_startup_message = false
 
static bool line_editing = true
 
static bool no_gui_option = false
 
static bool no_window_system = false
 
static string_vector octave_argv
 
int octave_cmdline_argc
 
char ** octave_cmdline_argv
 
int octave_embedded
 
static std::string octave_program_invocation_name
 
static std::string octave_program_name
 
static bool persist = false
 
static bool read_history_file = true
 
static bool read_init_files = true
 
static bool read_site_files = true
 
static bool set_initial_path = true
 
static bool start_gui = false
 
static bool traditional = false
 
static bool verbose_flag = false
 

Function Documentation

static bool check_starting_gui ( void  )
static
static void execute_command_line_file ( const std::string &  fname)
static
static int execute_eval_option_code ( const std::string &  code)
static
static void execute_startup_files ( void  )
static
F77_RET_T F77_FUNC ( xerbla  ,
XERBLA   
)
OCTAVE_EXPORT octave_value_list F__version_info__ ( const octave_value_list args,
int   
)
OCTAVE_EXPORT octave_value_list Fargv ( const octave_value_list args,
int   
)

Definition at line 1021 of file octave.cc.

References print_usage().

OCTAVE_EXPORT octave_value_list Fisguirunning ( const octave_value_list args,
int   
)

Definition at line 986 of file octave.cc.

References print_usage(), and start_gui.

OCTAVE_EXPORT octave_value_list Fprogram_invocation_name ( const octave_value_list args,
int   
)

Definition at line 1048 of file octave.cc.

References octave_program_invocation_name, and print_usage().

OCTAVE_EXPORT octave_value_list Fprogram_name ( const octave_value_list args,
int   
)

Definition at line 1071 of file octave.cc.

References octave_program_name, and print_usage().

static void gripe_safe_source_exception ( const std::string &  file,
const std::string &  msg 
)
static

Definition at line 259 of file octave.cc.

Referenced by safe_source_file().

static void initialize_error_handlers ( )
static
static void initialize_version_info ( void  )
static
void install_builtins ( void  )

Definition at line 1708 of file builtins.cc.

References install___contourc___fcns(), install___dispatch___fcns(), install___dsearchn___fcns(), install___ichol___fcns(), install___ilu___fcns(), install___lin_interpn___fcns(), install___pchip_deriv___fcns(), install___qp___fcns(), install_balance_fcns(), install_besselj_fcns(), install_betainc_fcns(), install_bitfcns_fcns(), install_bsxfun_fcns(), install_built_in_docstrings(), install_cellfun_fcns(), install_colloc_fcns(), install_conv2_fcns(), install_daspk_fcns(), install_dasrt_fcns(), install_dassl_fcns(), install_data_fcns(), install_debug_fcns(), install_defaults_fcns(), install_det_fcns(), install_dirfns_fcns(), install_dlmread_fcns(), install_dot_fcns(), install_eig_fcns(), install_ellipj_fcns(), install_error_fcns(), install_fft2_fcns(), install_fft_fcns(), install_fftn_fcns(), install_file_io_fcns(), install_filter_fcns(), install_find_fcns(), install_gammainc_fcns(), install_gcd_fcns(), install_getgrent_fcns(), install_getpwent_fcns(), install_getrusage_fcns(), install_givens_fcns(), install_graphics_fcns(), install_help_fcns(), install_hess_fcns(), install_hex2num_fcns(), install_input_fcns(), install_inv_fcns(), install_kron_fcns(), install_lex_fcns(), install_load_path_fcns(), install_load_save_fcns(), install_lookup_fcns(), install_ls_oct_ascii_fcns(), install_lsode_fcns(), install_lu_fcns(), install_luinc_fcns(), install_mappers_fcns(), install_matrix_type_fcns(), install_max_fcns(), install_md5sum_fcns(), install_mgorth_fcns(), install_nproc_fcns(), install_oct_hist_fcns(), install_oct_parse_fcns(), install_octave_fcns(), install_octave_link_fcns(), install_ordschur_fcns(), install_ov_base_fcns(), install_ov_bool_mat_fcns(), install_ov_cell_fcns(), install_ov_class_fcns(), install_ov_classdef_fcns(), install_ov_fcn_handle_fcns(), install_ov_fcn_inline_fcns(), install_ov_fcns(), install_ov_flt_re_mat_fcns(), install_ov_int16_fcns(), install_ov_int32_fcns(), install_ov_int64_fcns(), install_ov_int8_fcns(), install_ov_java_fcns(), install_ov_null_mat_fcns(), install_ov_oncleanup_fcns(), install_ov_range_fcns(), install_ov_re_mat_fcns(), install_ov_struct_fcns(), install_ov_typeinfo_fcns(), install_ov_uint16_fcns(), install_ov_uint32_fcns(), install_ov_uint64_fcns(), install_ov_uint8_fcns(), install_ov_usr_fcn_fcns(), install_pager_fcns(), install_pinv_fcns(), install_pr_output_fcns(), install_profiler_fcns(), install_pt_arg_list_fcns(), install_pt_binop_fcns(), install_pt_eval_fcns(), install_pt_jit_fcns(), install_pt_mat_fcns(), install_quad_fcns(), install_quadcc_fcns(), install_qz_fcns(), install_rand_fcns(), install_rcond_fcns(), install_regexp_fcns(), install_schur_fcns(), install_sighandlers_fcns(), install_sparse_fcns(), install_spparms_fcns(), install_sqrtm_fcns(), install_str2double_fcns(), install_strfind_fcns(), install_strfns_fcns(), install_sub2ind_fcns(), install_svd_fcns(), install_sylvester_fcns(), install_symtab_fcns(), install_syscalls_fcns(), install_sysdep_fcns(), install_time_fcns(), install_toplev_fcns(), install_tril_fcns(), install_tsearch_fcns(), install_typecast_fcns(), install_urlwrite_fcns(), install_utils_fcns(), and install_variables_fcns().

Referenced by octave_initialize_interpreter().

static void intern_argv ( int  argc,
char **  argv 
)
static
static void lo_error_handler ( const char fmt,
  ... 
)
static

Definition at line 453 of file octave.cc.

References octave_throw_execution_exception(), and verror_with_cfn().

Referenced by initialize_error_handlers().

static void lo_error_with_id_handler ( const char id,
const char fmt,
  ... 
)
static

Definition at line 464 of file octave.cc.

References octave_throw_execution_exception(), and verror_with_id_cfn().

Referenced by initialize_error_handlers().

static void maximum_braindamage ( void  )
static
int octave_execute_interpreter ( void  )
void octave_initialize_interpreter ( int  argc,
char **  argv,
int  embedded 
)
int octave_main ( int  argc,
char **  argv,
int  embedded 
)
void octave_process_command_line ( int  argc,
char **  argv 
)
int octave_starting_gui ( void  )

Definition at line 975 of file octave.cc.

References check_starting_gui(), and start_gui.

Referenced by main().

static void safe_source_file ( const std::string &  file_name,
const std::string &  context = std::string (),
bool  verbose = false,
bool  require_file = true,
const std::string &  warn_for = std::string () 
)
static

Variable Documentation

bool an_octave_program = false
static

Definition at line 178 of file octave.cc.

Referenced by octave_initialize_interpreter(), and octave_process_command_line().

std::string code_to_eval
static
std::list<std::string> command_line_path
static
std::string exec_path
static

Definition at line 150 of file octave.cc.

Referenced by octave_initialize_interpreter(), and octave_process_command_line().

F77_RET_T const octave_idx_type& F77_CHAR_ARG_LEN_DECL

Definition at line 87 of file octave.cc.

bool force_gui_option = false
static

Definition at line 130 of file octave.cc.

Referenced by check_starting_gui(), and octave_process_command_line().

bool forced_line_editing = false
static

Definition at line 138 of file octave.cc.

Referenced by octave_initialize_interpreter(), and octave_process_command_line().

std::string image_path
static

Definition at line 154 of file octave.cc.

Referenced by octave_initialize_interpreter(), and octave_process_command_line().

bool inhibit_startup_message = false
static
bool line_editing = true
static

Definition at line 106 of file octave.cc.

Referenced by octave_initialize_interpreter(), and octave_process_command_line().

bool no_gui_option = false
static

Definition at line 134 of file octave.cc.

Referenced by check_starting_gui(), and octave_process_command_line().

bool no_window_system = false
static
string_vector octave_argv
static

Definition at line 96 of file octave.cc.

int octave_cmdline_argc

Definition at line 91 of file octave.cc.

Referenced by octave_interpreter::execute().

char** octave_cmdline_argv

Definition at line 92 of file octave.cc.

Referenced by octave_interpreter::execute().

int octave_embedded

Definition at line 93 of file octave.cc.

Referenced by octave_interpreter::execute().

std::string octave_program_invocation_name
static
std::string octave_program_name
static
bool persist = false
static
bool read_history_file = true
static

Definition at line 142 of file octave.cc.

Referenced by octave_initialize_interpreter(), and octave_process_command_line().

bool read_init_files = true
static

Definition at line 110 of file octave.cc.

Referenced by execute_startup_files(), and octave_process_command_line().

bool read_site_files = true
static

Definition at line 114 of file octave.cc.

Referenced by execute_startup_files(), and octave_process_command_line().

bool set_initial_path = true
static
bool start_gui = false
static

Definition at line 169 of file octave.cc.

Referenced by Fisguirunning(), main(), and octave_starting_gui().

bool traditional = false
static

Definition at line 173 of file octave.cc.

Referenced by octave_initialize_interpreter(), and octave_process_command_line().

bool verbose_flag = false
static

Definition at line 126 of file octave.cc.

Referenced by execute_startup_files(), and octave_process_command_line().