26 #if defined (HAVE_CONFIG_H)
48 #include "default-defs.h"
64 std::string retval = s;
72 std::replace (retval.begin (), retval.end (),
'/',
dir_sep_char);
81 std::string oh = sys::env::getenv (
"OCTAVE_HOME");
86 return oh.empty () ? op : oh;
94 std::string oh = sys::env::getenv (
"OCTAVE_HOME");
95 std::string oeh = sys::env::getenv (
"OCTAVE_EXEC_HOME");
105 if (op == oep && ! oh.empty ())
113 std::string lsf = sys::env::getenv (
"OCTAVE_SITE_INITFILE");
120 std::string sf = sys::env::getenv (
"OCTAVE_VERSION_INITFILE");
137 static const std::string s_canonical_host_type
138 = OCTAVE_CANONICAL_HOST_TYPE;
140 return s_canonical_host_type;
145 static const std::string s_octave_release = OCTAVE_RELEASE;
147 return s_octave_release;
152 static const std::string s_default_pager = OCTAVE_DEFAULT_PAGER;
154 return s_default_pager;
161 return s_octave_home;
168 return s_octave_exec_home;
173 static const std::string s_bin_dir
181 static const std::string s_data_dir
189 static const std::string s_dataroot_dir
192 return s_dataroot_dir;
197 static const std::string s_include_dir
200 return s_include_dir;
205 static const std::string s_lib_dir
213 static const std::string s_libexec_dir
216 return s_libexec_dir;
221 static const std::string s_arch_lib_dir
224 return s_arch_lib_dir;
229 static const std::string s_info_dir
237 static const std::string s_local_ver_arch_lib_dir
240 return s_local_ver_arch_lib_dir;
245 static const std::string s_local_api_arch_lib_dir
248 return s_local_api_arch_lib_dir;
253 static const std::string s_local_arch_lib_dir
256 return s_local_arch_lib_dir;
261 static const std::string s_local_ver_oct_file_dir
264 return s_local_ver_oct_file_dir;
269 static const std::string s_local_api_oct_file_dir
272 return s_local_api_oct_file_dir;
277 static const std::string s_local_oct_file_dir
280 return s_local_oct_file_dir;
285 static const std::string s_oct_file_dir
288 return s_oct_file_dir;
293 static const std::string s_local_ver_fcn_file_dir
296 return s_local_ver_fcn_file_dir;
301 static const std::string s_local_api_fcn_file_dir
304 return s_local_api_fcn_file_dir;
309 static const std::string s_local_fcn_file_dir
312 return s_local_fcn_file_dir;
317 static const std::string s_fcn_file_dir
320 return s_fcn_file_dir;
325 static const std::string s_oct_data_dir
328 return s_oct_data_dir;
333 static const std::string s_oct_doc_dir
336 return s_oct_doc_dir;
341 static const std::string s_oct_etc_dir
344 return s_oct_etc_dir;
349 static const std::string s_oct_fonts_dir
352 return s_oct_fonts_dir;
357 static const std::string s_oct_include_dir
360 return s_oct_include_dir;
365 static const std::string s_oct_lib_dir
368 return s_oct_lib_dir;
373 static const std::string s_oct_locale_dir
376 return s_oct_locale_dir;
381 static const std::string s_oct_tests_dir
384 return s_oct_tests_dir;
389 static const std::string s_man_dir
397 static const std::string s_man1_dir
405 static const std::string s_man1_ext = OCTAVE_MAN1EXT;
412 static const std::string s_image_dir
420 static const std::string s_local_startupfile_dir
423 return s_local_startupfile_dir;
428 static const std::string s_startupfile_dir
431 return s_startupfile_dir;
436 static const std::string s_local_site_defaults_file
439 return s_local_site_defaults_file;
444 static const std::string s_site_defaults_file
447 return s_site_defaults_file;
452 DEFUN (OCTAVE_HOME, args, ,
461 if (args.length () != 0)
472 DEFUN (OCTAVE_EXEC_HOME, args, ,
483 if (args.length () != 0)
501 if (args.length () != 0)
512 DEFUN (user_config_dir, args, ,
519 if (args.length () != 0)
522 return ovl (sys::env::get_user_config_directory ());
530 DEFUN (user_data_dir, args, ,
537 if (args.length () != 0)
540 return ovl (sys::env::get_user_data_directory ());
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
std::string local_fcn_file_dir(void)
std::string oct_tests_dir(void)
std::string local_ver_oct_file_dir(void)
std::string canonical_host_type(void)
static std::string get_octave_home(void)
std::string local_api_fcn_file_dir(void)
std::string man1_dir(void)
std::string startupfile_dir(void)
std::string site_defaults_file(void)
std::string default_pager(void)
std::string oct_doc_dir(void)
std::string octave_exec_home(void)
std::string image_dir(void)
std::string local_oct_file_dir(void)
std::string octave_home(void)
std::string fcn_file_dir(void)
std::string prepend_octave_home(const std::string &s)
std::string man_dir(void)
std::string include_dir(void)
std::string oct_locale_dir(void)
std::string oct_file_dir(void)
std::string data_dir(void)
OCTAVE_EXPORT octave_value_list FOCTAVE_VERSION(const octave_value_list &args, int)
std::string dataroot_dir(void)
std::string man1_ext(void)
static std::string get_site_defaults_file(void)
std::string libexec_dir(void)
std::string local_startupfile_dir(void)
std::string info_dir(void)
std::string oct_etc_dir(void)
std::string local_arch_lib_dir(void)
std::string local_ver_arch_lib_dir(void)
std::string lib_dir(void)
std::string local_api_arch_lib_dir(void)
std::string oct_include_dir(void)
std::string prepend_octave_exec_home(const std::string &s)
std::string release(void)
std::string oct_data_dir(void)
static std::string get_octave_exec_home(void)
std::string bin_dir(void)
std::string local_site_defaults_file(void)
std::string local_api_oct_file_dir(void)
std::string local_ver_fcn_file_dir(void)
std::string arch_lib_dir(void)
static std::string prepend_home_dir(const std::string &hd, const std::string &s)
static std::string get_local_site_defaults_file(void)
std::string oct_lib_dir(void)
std::string oct_fonts_dir(void)
OCTINTERP_API void print_usage(void)
#define DEFUN(name, args_name, nargout_name, doc)
Macro to define a builtin function.
#define DEFUNX(name, fname, args_name, nargout_name, doc)
Macro to define a builtin function with certain internal name.
#define OCTAVE_ARCHLIBDIR
#define OCTAVE_EXEC_PREFIX
octave_value_list ovl(const OV_Args &... args)
Construct an octave_value_list with less typing.
static bool absolute_pathname(const std::string &s)
static const char dir_sep_char