# HG changeset patch # User John W. Eaton # Date 1346342704 14400 # Node ID ad1a980b0cb572507017f22f6b96e9a0cbaa8389 # Parent 6be46886099fa5309b09a0498a6a37e7b74c6299 install default values before initializing interpreter (bug #37161) * octave.cc (octave_initialize_interpreter): Don't call install_defaults here. (octave_main): Call install_defaults here. * main.cc (main): Likewise. * main-cli.cc (main): Likewise. * src/Makefile.am (AM_CPPFLAGS): Include -I$(srcdir)/../libcruft/misc, -I$(srcdir)/../liboctave, and -I$(top_builddir)/libinterp/interpfcn in the list. diff -r 6be46886099f -r ad1a980b0cb5 libinterp/octave.cc --- a/libinterp/octave.cc Thu Aug 30 15:53:07 2012 +0100 +++ b/libinterp/octave.cc Thu Aug 30 12:05:04 2012 -0400 @@ -46,7 +46,7 @@ #include "pathsearch.h" #include "str-vec.h" -#include +#include "defaults.h" #include "Cell.h" #include "defun.h" #include "display.h" @@ -687,6 +687,8 @@ { octave_process_command_line (argc, argv); + install_defaults (); + octave_initialize_interpreter (argc, argv, embedded); return octave_execute_interpreter (); @@ -873,11 +875,9 @@ octave_thread::init (); // The order of these calls is important. The call to - // install_defaults must come before install_builtins because - // default variable values must be available for the variables to be - // installed, and the call to install_builtins must come before the - // options are processed because some command line options override - // defaults by calling bind_internal_variable. + // install_builtins must come before the option settings are processed + // because some command line options override defaults by calling + // bind_internal_variable. init_signals (); @@ -897,8 +897,6 @@ initialize_default_warning_state (); - install_defaults (); - initialize_pathsearch (); if (! embedded) diff -r 6be46886099f -r ad1a980b0cb5 src/Makefile.am --- a/src/Makefile.am Thu Aug 30 15:53:07 2012 +0100 +++ b/src/Makefile.am Thu Aug 30 12:05:04 2012 -0400 @@ -22,7 +22,10 @@ ## Search local directories before those specified by the user. AM_CPPFLAGS = \ + -I$(srcdir)/../libcruft/misc \ + -I$(srcdir)/../liboctave \ -I$(srcdir)/../libinterp \ + -I$(top_builddir)/libinterp/interpfcn \ -I$(top_builddir)/libgnu -I$(top_srcdir)/libgnu OCTAVE_BINARIES = \ diff -r 6be46886099f -r ad1a980b0cb5 src/main-cli.cc --- a/src/main-cli.cc Thu Aug 30 15:53:07 2012 +0100 +++ b/src/main-cli.cc Thu Aug 30 12:05:04 2012 -0400 @@ -24,13 +24,16 @@ #include #endif -#include +#include "defaults.h" +#include "octave.h" int main (int argc, char **argv) { octave_process_command_line (argc, argv); + install_defaults (); + octave_initialize_interpreter (argc, argv, 0); return octave_execute_interpreter (); diff -r 6be46886099f -r ad1a980b0cb5 src/main.cc --- a/src/main.cc Thu Aug 30 15:53:07 2012 +0100 +++ b/src/main.cc Thu Aug 30 12:05:04 2012 -0400 @@ -24,8 +24,9 @@ #include #endif -#include -#include +#include "defaults.h" +#include "octave.h" +#include "octave-gui.h" int main (int argc, char **argv) @@ -34,6 +35,8 @@ octave_process_command_line (argc, argv); + install_defaults (); + if (octave_starting_gui ()) retval = octave_start_gui (argc, argv); else