changeset 15158:a87fa9132b72

provide Voct_etc_dir variable * defaults.cc (Voct_etc_dir): New global variable. (set_default_oct_etc_dir): New function. (install_defaults): Call it. * defaults.in.h (Voct_etc_dir): Provide decl.
author John W. Eaton <jwe@octave.org>
date Sat, 11 Aug 2012 17:32:42 -0400
parents ba431d1106e3
children 960aa8863476 dbc43bd95477
files src/interpfcn/defaults.cc src/interpfcn/defaults.in.h
diffstat 2 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/interpfcn/defaults.cc
+++ b/src/interpfcn/defaults.cc
@@ -74,6 +74,8 @@
 std::string Vlocal_api_fcn_file_dir;
 std::string Vlocal_fcn_file_dir;
 
+std::string Voct_etc_dir;
+
 std::string Voct_file_dir;
 std::string Vfcn_file_dir;
 
@@ -214,6 +216,12 @@
 }
 
 static void
+set_default_oct_etc_dir (void)
+{
+  Voct_etc_dir = subst_octave_home (OCTAVE_OCTETCDIR);
+}
+
+static void
 set_default_oct_file_dir (void)
 {
   Voct_file_dir = subst_octave_home (OCTAVE_OCTFILEDIR);
@@ -390,6 +398,8 @@
   set_default_local_api_fcn_file_dir ();
   set_default_local_fcn_file_dir ();
 
+  set_default_oct_etc_dir ();
+
   set_default_fcn_file_dir ();
   set_default_oct_file_dir ();
 
--- a/src/interpfcn/defaults.in.h
+++ b/src/interpfcn/defaults.in.h
@@ -194,6 +194,8 @@
 extern std::string Vlocal_api_fcn_file_dir;
 extern std::string Vlocal_fcn_file_dir;
 
+extern std::string Voct_etc_dir;
+
 extern std::string Voct_file_dir;
 extern std::string Vfcn_file_dir;