comparison libinterp/octave.cc @ 15262:ad1a980b0cb5

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.
author John W. Eaton <jwe@octave.org>
date Thu, 30 Aug 2012 12:05:04 -0400
parents c16357c4bdbb
children 99db33cae82b
comparison
equal deleted inserted replaced
15261:6be46886099f 15262:ad1a980b0cb5
44 #include "lo-error.h" 44 #include "lo-error.h"
45 #include "oct-env.h" 45 #include "oct-env.h"
46 #include "pathsearch.h" 46 #include "pathsearch.h"
47 #include "str-vec.h" 47 #include "str-vec.h"
48 48
49 #include <defaults.h> 49 #include "defaults.h"
50 #include "Cell.h" 50 #include "Cell.h"
51 #include "defun.h" 51 #include "defun.h"
52 #include "display.h" 52 #include "display.h"
53 #include "error.h" 53 #include "error.h"
54 #include "file-io.h" 54 #include "file-io.h"
685 int 685 int
686 octave_main (int argc, char **argv, int embedded) 686 octave_main (int argc, char **argv, int embedded)
687 { 687 {
688 octave_process_command_line (argc, argv); 688 octave_process_command_line (argc, argv);
689 689
690 install_defaults ();
691
690 octave_initialize_interpreter (argc, argv, embedded); 692 octave_initialize_interpreter (argc, argv, embedded);
691 693
692 return octave_execute_interpreter (); 694 return octave_execute_interpreter ();
693 } 695 }
694 696
871 octave_program_name = octave_env::get_program_name (); 873 octave_program_name = octave_env::get_program_name ();
872 874
873 octave_thread::init (); 875 octave_thread::init ();
874 876
875 // The order of these calls is important. The call to 877 // The order of these calls is important. The call to
876 // install_defaults must come before install_builtins because 878 // install_builtins must come before the option settings are processed
877 // default variable values must be available for the variables to be 879 // because some command line options override defaults by calling
878 // installed, and the call to install_builtins must come before the 880 // bind_internal_variable.
879 // options are processed because some command line options override
880 // defaults by calling bind_internal_variable.
881 881
882 init_signals (); 882 init_signals ();
883 883
884 sysdep_init (); 884 sysdep_init ();
885 885
894 F77_FUNC (xerbla, XERBLA) ("octave", 13 F77_CHAR_ARG_LEN (6)); 894 F77_FUNC (xerbla, XERBLA) ("octave", 13 F77_CHAR_ARG_LEN (6));
895 895
896 initialize_error_handlers (); 896 initialize_error_handlers ();
897 897
898 initialize_default_warning_state (); 898 initialize_default_warning_state ();
899
900 install_defaults ();
901 899
902 initialize_pathsearch (); 900 initialize_pathsearch ();
903 901
904 if (! embedded) 902 if (! embedded)
905 install_signal_handlers (); 903 install_signal_handlers ();