GNU Octave
4.2.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
|
#include "oct-env.h"
Static Public Member Functions | |
static bool | absolute_pathname (const std::string &s) |
static std::string | base_pathname (const std::string &s) |
static bool | chdir (const std::string &newdir) |
static std::string | get_current_directory (void) |
static std::string | get_home_directory (void) |
static std::string | get_host_name (void) |
static std::string | get_program_invocation_name (void) |
static std::string | get_program_name (void) |
static std::string | get_temp_directory (void) |
static std::string | get_user_name (void) |
static std::string | getenv (const std::string &name) |
static bool | have_x11_display (void) |
static std::string | make_absolute (const std::string &s, const std::string &dot_path=get_current_directory()) |
static std::string | polite_directory_format (const std::string &name) |
static void | putenv (const std::string &name, const std::string &value) |
static bool | rooted_relative_pathname (const std::string &s) |
static void | set_program_name (const std::string &s) |
Protected Member Functions | |
env (void) | |
Private Member Functions | |
env (const env &) | |
bool | do_absolute_pathname (const std::string &s) const |
std::string | do_base_pathname (const std::string &s) const |
bool | do_chdir (const std::string &newdir) |
std::string | do_get_home_directory (void) const |
std::string | do_get_host_name (void) const |
std::string | do_get_temp_directory (void) const |
std::string | do_get_user_name (void) const |
std::string | do_getcwd (void) const |
std::string | do_getenv (const std::string &name) const |
std::string | do_make_absolute (const std::string &s, const std::string &dot_path) const |
std::string | do_polite_directory_format (const std::string &name) const |
void | do_putenv (const std::string &name, const std::string &value) const |
bool | do_rooted_relative_pathname (const std::string &s) const |
void | do_set_program_name (const std::string &s) const |
void | error (int) const |
void | error (const std::string &) const |
env & | operator= (const env &) |
void | pathname_backup (std::string &path, int n) const |
Static Private Member Functions | |
static void | cleanup_instance (void) |
static bool | instance_ok (void) |
Private Attributes | |
std::string | current_directory |
bool | follow_symbolic_links |
std::string | host_name |
std::string | prog_invocation_name |
std::string | prog_name |
std::string | user_name |
bool | verbatim_pwd |
Static Private Attributes | |
static env * | instance = 0 |
|
protected |
Definition at line 64 of file oct-env.cc.
References do_get_host_name(), do_get_user_name(), and do_getcwd().
Referenced by instance_ok().
|
private |
|
static |
Definition at line 108 of file oct-env.cc.
References do_absolute_pathname(), instance, and instance_ok().
Referenced by load_path::do_find_all_first_of(), load_path::do_find_dir(), load_path::do_find_file(), load_path::do_find_first_of(), load_path::do_find_matching_dirs(), load_path::dir_info::initialize(), kpse_absolute_p(), load_fcn_from_file(), and out_of_date_check().
|
static |
Definition at line 122 of file oct-env.cc.
References do_base_pathname(), instance, and instance_ok().
Referenced by octave::command_editor::do_decode_prompt_string(), get_help_from_file(), load_fcn_from_file(), and octave::xzip().
|
static |
Definition at line 256 of file oct-env.cc.
References do_chdir(), instance, and instance_ok().
Referenced by octave_change_to_directory().
|
inlinestaticprivate |
Definition at line 128 of file oct-env.h.
Referenced by instance_ok().
|
private |
Definition at line 318 of file oct-env.cc.
References octave::sys::file_ops::is_dir_sep().
Referenced by absolute_pathname(), do_base_pathname(), and do_make_absolute().
|
private |
Definition at line 367 of file oct-env.cc.
References octave::sys::file_ops::dir_sep_chars(), do_absolute_pathname(), do_rooted_relative_pathname(), and s.
Referenced by base_pathname().
|
private |
Definition at line 543 of file oct-env.cc.
References octave::sys::chdir(), current_directory, do_getcwd(), do_make_absolute(), follow_symbolic_links, octave::sys::file_ops::is_dir_sep(), retval, string, and tmp.
Referenced by chdir().
|
private |
Definition at line 475 of file oct-env.cc.
References octave::sys::password::dir(), octave::sys::file_ops::dir_sep_str(), do_getenv(), octave::sys::password::getpwuid(), octave::sys::getuid(), and string.
Referenced by do_polite_directory_format(), and get_home_directory().
|
private |
Definition at line 517 of file oct-env.cc.
References host_name, and octave_gethostname_wrapper().
Referenced by env(), and get_host_name().
|
private |
Definition at line 192 of file oct-env.cc.
References do_getenv(), and string.
Referenced by get_temp_directory().
|
private |
Definition at line 503 of file oct-env.cc.
References octave::sys::password::getpwuid(), octave::sys::getuid(), octave::sys::password::name(), string, and user_name.
Referenced by env(), and get_user_name().
|
private |
Definition at line 460 of file oct-env.cc.
References current_directory, follow_symbolic_links, octave::sys::getcwd(), and verbatim_pwd.
Referenced by do_chdir(), env(), and get_current_directory().
|
private |
Definition at line 532 of file oct-env.cc.
References getenv(), and value().
Referenced by do_get_home_directory(), do_get_temp_directory(), and getenv().
|
private |
Definition at line 384 of file oct-env.cc.
References octave::sys::file_ops::dir_sep_chars(), octave::sys::file_ops::dir_sep_str(), do_absolute_pathname(), octave::sys::file_ops::is_dir_sep(), pathname_backup(), and string.
Referenced by do_chdir(), and make_absolute().
|
private |
Definition at line 297 of file oct-env.cc.
References do_get_home_directory(), octave::sys::file_ops::is_dir_sep(), name, retval, and string.
Referenced by polite_directory_format().
|
private |
|
private |
Definition at line 339 of file oct-env.cc.
References octave::sys::file_ops::is_dir_sep().
Referenced by do_base_pathname(), and rooted_relative_pathname().
|
private |
Definition at line 263 of file oct-env.cc.
References octave::sys::file_ops::dir_sep_chars(), octave_set_program_name_wrapper(), prog_invocation_name, prog_name, and strsave().
Referenced by set_program_name().
|
private |
Definition at line 606 of file oct-env.cc.
|
private |
Definition at line 612 of file oct-env.cc.
|
static |
Definition at line 136 of file oct-env.cc.
References do_getcwd(), instance, and instance_ok().
Referenced by octave::command_editor::do_decode_prompt_string(), initial_class_path(), and octave_change_to_directory().
|
static |
Definition at line 143 of file oct-env.cc.
References do_get_home_directory(), instance, and instance_ok().
Referenced by default_history_file(), octave::command_editor::do_decode_prompt_string(), initial_class_path(), kpse_tilde_expand(), files_dock_widget::popdownmenu_home(), and octave::sys::tilde_expand_word().
|
static |
Definition at line 185 of file oct-env.cc.
References do_get_host_name(), instance, and instance_ok().
Referenced by default_history_timestamp_format(), default_save_header_format(), and octave::command_editor::do_decode_prompt_string().
|
static |
Definition at line 164 of file oct-env.cc.
References instance, instance_ok(), and prog_invocation_name.
Referenced by maybe_initialize_magick().
|
static |
Definition at line 157 of file oct-env.cc.
References instance, instance_ok(), and prog_name.
Referenced by octave::command_editor::do_decode_prompt_string().
|
static |
Definition at line 150 of file oct-env.cc.
References do_get_temp_directory(), instance, and instance_ok().
Referenced by octave::sys::tempnam().
|
static |
Definition at line 178 of file oct-env.cc.
References do_get_user_name(), instance, and instance_ok().
Referenced by default_history_timestamp_format(), default_save_header_format(), and octave::command_editor::do_decode_prompt_string().
|
static |
Definition at line 235 of file oct-env.cc.
References do_getenv(), instance, and instance_ok().
Referenced by default_history_file(), default_history_size(), default_pager(), default_qt_settings_file(), do_getenv(), load_path::do_initialize(), octave::gui_application::execute(), expand(), resource_manager::get_gui_translation_dir(), get_P_tmpdir(), have_gnuplot_binary(), have_x11_display(), octave::directory_path::init(), initial_java_dir(), initialize_history(), initialize_jvm(), kpse_expand_kpse_dot(), set_built_in_docstrings_file(), set_default_doc_cache_file(), set_default_editor(), set_default_info_file(), set_default_info_prog(), set_default_texi_macros_file(), set_exec_path(), set_image_path(), set_local_site_defaults_file(), set_octave_home(), and set_site_defaults_file().
|
static |
Definition at line 248 of file oct-env.cc.
|
staticprivate |
Definition at line 81 of file oct-env.cc.
References singleton_cleanup_list::add(), cleanup_instance(), env(), instance, and retval.
Referenced by absolute_pathname(), base_pathname(), chdir(), get_current_directory(), get_home_directory(), get_host_name(), get_program_invocation_name(), get_program_name(), get_temp_directory(), get_user_name(), getenv(), make_absolute(), polite_directory_format(), rooted_relative_pathname(), and set_program_name().
|
static |
Definition at line 129 of file oct-env.cc.
References do_make_absolute(), instance, and instance_ok().
Referenced by load_path::do_find_dir(), load_path::do_find_matching_dirs(), load_path::dir_info::initialize(), load_fcn_from_file(), make_absolute(), read_mat5_binary_element(), search_path_for_all_files(), search_path_for_file(), octave_fcn_handle::set_fcn(), and load_path::dir_info::update().
|
private |
Definition at line 584 of file oct-env.cc.
References octave::sys::file_ops::is_dir_sep().
Referenced by do_make_absolute().
|
static |
Definition at line 101 of file oct-env.cc.
References do_polite_directory_format(), instance, and instance_ok().
Referenced by octave::command_editor::do_decode_prompt_string().
|
static |
Definition at line 242 of file oct-env.cc.
References octave_putenv().
Referenced by octave::gui_application::execute(), Fsetenv(), and set_exec_path().
|
static |
Definition at line 115 of file oct-env.cc.
References do_rooted_relative_pathname(), instance, and instance_ok().
Referenced by load_path::do_find_all_first_of(), load_path::do_find_dir(), load_path::do_find_file(), load_path::do_find_first_of(), load_path::do_find_matching_dirs(), and kpse_absolute_p().
|
static |
Definition at line 171 of file oct-env.cc.
References do_set_program_name(), instance, and instance_ok().
Referenced by main(), and octave_main().
|
mutableprivate |
Definition at line 139 of file oct-env.h.
Referenced by do_chdir(), and do_getcwd().
|
private |
Definition at line 132 of file oct-env.h.
Referenced by do_chdir(), and do_getcwd().
|
mutableprivate |
Definition at line 148 of file oct-env.h.
Referenced by do_get_host_name().
|
staticprivate |
Definition at line 126 of file oct-env.h.
Referenced by absolute_pathname(), base_pathname(), chdir(), get_current_directory(), get_home_directory(), get_host_name(), get_program_invocation_name(), get_program_name(), get_temp_directory(), get_user_name(), getenv(), instance_ok(), make_absolute(), polite_directory_format(), rooted_relative_pathname(), and set_program_name().
|
mutableprivate |
Definition at line 144 of file oct-env.h.
Referenced by do_set_program_name(), and get_program_invocation_name().
|
mutableprivate |
Definition at line 142 of file oct-env.h.
Referenced by do_set_program_name(), and get_program_name().
|
mutableprivate |
Definition at line 146 of file oct-env.h.
Referenced by do_get_user_name().
|
private |
Definition at line 136 of file oct-env.h.
Referenced by do_getcwd().