26 #if defined (HAVE_CONFIG_H)
62 prepend_home_dir (const std::
string& hd, const std::
string& s)
64 std::string retval = s;
68 if (! sys::env::absolute_pathname (retval))
72 std::replace (retval.begin (), retval.end (),
'/',
dir_sep_char);
82 std::string oh = sys::env::getenv (
"OCTAVE_HOME");
87 return oh.empty () ? op : oh;
91 get_octave_exec_home ()
96 std::string oh = sys::env::getenv (
"OCTAVE_HOME");
97 std::string oeh = sys::env::getenv (
"OCTAVE_EXEC_HOME");
107 if (op == oep && ! oh.empty ())
114 get_local_site_defaults_file ()
116 std::string lsf = sys::env::getenv (
"OCTAVE_SITE_INITFILE");
122 get_site_defaults_file ()
124 std::string sf = sys::env::getenv (
"OCTAVE_VERSION_INITFILE");
144 static const std::string s_canonical_host_type
147 return s_canonical_host_type;
155 return s_octave_release;
163 return s_default_pager;
169 static const std::string s_octave_home = get_octave_home ();
171 return s_octave_home;
177 static const std::string s_octave_exec_home = get_octave_exec_home ();
179 return s_octave_exec_home;
185 static const std::string s_bin_dir
194 static const std::string s_data_dir
203 static const std::string s_dataroot_dir
206 return s_dataroot_dir;
212 static const std::string s_include_dir
215 return s_include_dir;
221 static const std::string s_lib_dir
230 static const std::string s_libexec_dir
233 return s_libexec_dir;
239 static const std::string s_arch_lib_dir
242 return s_arch_lib_dir;
248 static const std::string s_info_dir
257 static const std::string s_local_ver_arch_lib_dir
260 return s_local_ver_arch_lib_dir;
266 static const std::string s_local_api_arch_lib_dir
269 return s_local_api_arch_lib_dir;
275 static const std::string s_local_arch_lib_dir
278 return s_local_arch_lib_dir;
284 static const std::string s_local_ver_oct_file_dir
287 return s_local_ver_oct_file_dir;
293 static const std::string s_local_api_oct_file_dir
296 return s_local_api_oct_file_dir;
302 static const std::string s_local_oct_file_dir
305 return s_local_oct_file_dir;
311 static const std::string s_oct_file_dir
314 return s_oct_file_dir;
320 static const std::string s_local_ver_fcn_file_dir
323 return s_local_ver_fcn_file_dir;
329 static const std::string s_local_api_fcn_file_dir
332 return s_local_api_fcn_file_dir;
338 static const std::string s_local_fcn_file_dir
341 return s_local_fcn_file_dir;
347 static const std::string s_fcn_file_dir
350 return s_fcn_file_dir;
356 static const std::string s_oct_data_dir
359 return s_oct_data_dir;
365 static const std::string s_oct_doc_dir
368 return s_oct_doc_dir;
374 static const std::string s_oct_etc_dir
377 return s_oct_etc_dir;
383 static const std::string s_oct_fonts_dir
386 return s_oct_fonts_dir;
392 static const std::string s_oct_include_dir
395 return s_oct_include_dir;
401 static const std::string s_oct_lib_dir
404 return s_oct_lib_dir;
410 static const std::string s_oct_locale_dir
413 return s_oct_locale_dir;
419 static const std::string s_oct_tests_dir
422 return s_oct_tests_dir;
428 static const std::string s_man_dir
437 static const std::string s_man1_dir
454 static const std::string s_image_dir
463 static const std::string s_local_startupfile_dir
466 return s_local_startupfile_dir;
472 static const std::string s_startupfile_dir
475 return s_startupfile_dir;
481 static const std::string s_local_site_defaults_file
482 = get_local_site_defaults_file ();
484 return s_local_site_defaults_file;
490 static const std::string s_site_defaults_file
491 = get_site_defaults_file ();
493 return s_site_defaults_file;
496 OCTAVE_END_NAMESPACE(config)
498 DEFUN (OCTAVE_HOME, args, ,
507 if (args.length () != 0)
518 DEFUN (OCTAVE_EXEC_HOME, args, ,
529 if (args.length () != 0)
547 if (args.length () != 0)
558 DEFUN (user_config_dir, args, ,
565 if (args.length () != 0)
568 return ovl (sys::env::get_user_config_directory ());
576 DEFUN (user_data_dir, args, ,
583 if (args.length () != 0)
586 return ovl (sys::env::get_user_data_directory ());
594 OCTAVE_END_NAMESPACE(
octave)
octave_value_list FOCTAVE_VERSION(const octave_value_list &=octave_value_list(), int=0)
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
#define OCTAVE_LOCALSTARTUPFILEDIR
#define OCTAVE_LOCALVERFCNFILEDIR
#define OCTAVE_OCTINCLUDEDIR
#define OCTAVE_LOCALAPIOCTFILEDIR
#define OCTAVE_LIBEXECDIR
#define OCTAVE_LOCALVEROCTFILEDIR
#define OCTAVE_OCTFONTSDIR
#define OCTAVE_OCTDATADIR
#define OCTAVE_OCTLOCALEDIR
#define OCTAVE_FCNFILEDIR
#define OCTAVE_LOCALOCTFILEDIR
#define OCTAVE_LOCALAPIARCHLIBDIR
#define OCTAVE_STARTUPFILEDIR
#define OCTAVE_INCLUDEDIR
#define OCTAVE_OCTTESTSDIR
#define OCTAVE_DEFAULT_PAGER
#define OCTAVE_OCTFILEDIR
#define OCTAVE_LOCALARCHLIBDIR
#define OCTAVE_LOCALVERARCHLIBDIR
#define OCTAVE_LOCALFCNFILEDIR
#define OCTAVE_LOCALAPIFCNFILEDIR
#define OCTAVE_DATAROOTDIR
std::string startupfile_dir()
std::string dataroot_dir()
std::string oct_doc_dir()
std::string default_pager()
std::string local_ver_arch_lib_dir()
std::string local_oct_file_dir()
std::string prepend_octave_home(const std::string &s)
std::string local_startupfile_dir()
std::string octave_exec_home()
std::string canonical_host_type()
std::string oct_fonts_dir()
std::string local_fcn_file_dir()
std::string include_dir()
std::string local_api_oct_file_dir()
std::string local_arch_lib_dir()
std::string oct_tests_dir()
std::string fcn_file_dir()
std::string site_defaults_file()
std::string local_api_fcn_file_dir()
std::string local_ver_fcn_file_dir()
std::string octave_home()
std::string oct_etc_dir()
std::string prepend_octave_exec_home(const std::string &s)
std::string local_ver_oct_file_dir()
std::string local_api_arch_lib_dir()
std::string libexec_dir()
std::string local_site_defaults_file()
std::string oct_locale_dir()
std::string oct_file_dir()
std::string oct_data_dir()
std::string oct_include_dir()
std::string oct_lib_dir()
std::string arch_lib_dir()
#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.
#define OCTAVE_CANONICAL_HOST_TYPE