26 #if defined (HAVE_CONFIG_H)
51 if (exec_path.empty ())
56 std::string shell_path = sys::env::getenv (
"PATH");
58 if (shell_path.empty ())
59 sys::env::putenv (
"PATH", exec_path);
68 if (shell_path.find (exec_path) == std::string::npos)
69 sys::env::putenv (
"PATH", shell_path + path_sep + exec_path);
109 std::string retval =
"emacs";
111 std::string env_editor = sys::env::getenv (
"EDITOR");
113 if (! env_editor.empty ())
121 std::string
exec_path = sys::env::getenv (
"OCTAVE_EXEC_PATH");
143 std::string env_path = sys::env::getenv (
"OCTAVE_IMAGE_PATH");
145 if (! env_path.empty ())
150 if (! gen_path.empty ())
156 DEFMETHOD (EDITOR, interp, args, nargout,
176 return env.editor (args, nargout);
191 DEFMETHOD (EXEC_PATH, interp, args, nargout,
213 return env.exec_path (args, nargout);
228 DEFMETHOD (IMAGE_PATH, interp, args, nargout,
245 return env.image_path (args, nargout);
static std::string path_sep_str(void)
std::string set(std::string &var, const std::string &new_val)
std::string exec_path(void) const
static std::string init_editor(void)
std::string editor(void) const
static std::string init_exec_path(void)
static std::string init_image_path(void)
std::string image_path(void) const
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
std::string image_dir(void)
std::string local_arch_lib_dir(void)
std::string local_ver_arch_lib_dir(void)
std::string local_api_arch_lib_dir(void)
std::string bin_dir(void)
std::string arch_lib_dir(void)
#define DEFMETHOD(name, interp_name, args_name, nargout_name, doc)
Macro to define a builtin method.
static void append_to_shell_path(const std::string &exec_path)
std::string genpath(const std::string &dirname, const string_vector &skip)
octave_value set_internal_variable(bool &var, const octave_value_list &args, int nargout, const char *nm)