Mercurial > octave
changeset 22186:9aff1ce307b1
do system dependent and default variable inits early (bug #)
Some global variables like Voct_locale_dir need to be available before
the interpreter is intialized. System dependent initialization
should probably also happen early on in the startup process.
* octave.cc (application::init): Call sysdep_init and install_defaults
here.
* interpreter.cc (interpreter::interpreter): Not here.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 27 Jul 2016 16:25:45 -0400 |
parents | dc20b737ee79 |
children | 2aae8894885b |
files | libinterp/corefcn/interpreter.cc libinterp/octave.cc |
diffstat | 2 files changed, 8 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/interpreter.cc Tue Jul 26 10:40:46 2016 -0400 +++ b/libinterp/corefcn/interpreter.cc Wed Jul 27 16:25:45 2016 -0400 @@ -532,10 +532,6 @@ { cmdline_options options = m_app_context->options (); - sysdep_init (); - - install_defaults (); - // Matlab uses "C" locale for LC_NUMERIC class regardless of local setting setlocale (LC_NUMERIC, "C"); setlocale (LC_TIME, "C");
--- a/libinterp/octave.cc Tue Jul 26 10:40:46 2016 -0400 +++ b/libinterp/octave.cc Wed Jul 27 16:25:45 2016 -0400 @@ -36,6 +36,7 @@ #include "builtin-defun-decls.h" #include "Cell.h" +#include "defaults.h" #include "defun.h" #include "display.h" #include "error.h" @@ -48,6 +49,7 @@ #include "options-usage.h" #include "ov.h" #include "parse.h" +#include "sysdep.h" namespace octave { @@ -409,6 +411,12 @@ m_is_octave_program = ((m_have_script_file || ! code_to_eval.empty ()) && ! m_options.persist () && ! m_options.traditional ()); + + // This should probably happen early. + sysdep_init (); + + // Need to have global Vfoo variables defined early. + install_defaults (); } int cli_application::execute (void)