changeset 8099:e0a6e54f5a19

octave.cc (octave_main): make all command-line arguments available to startup scripts
author John W. Eaton <jwe@octave.org>
date Wed, 10 Sep 2008 12:38:04 -0400
parents 229bd50e6e8f
children da2fbd22d672
files src/ChangeLog src/octave.cc
diffstat 2 files changed, 10 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Tue Sep 09 18:56:51 2008 -0400
+++ b/src/ChangeLog	Wed Sep 10 12:38:04 2008 -0400
@@ -1,3 +1,8 @@
+2008-09-10  John W. Eaton  <jwe@octave.org>
+
+	* octave.cc (octave_main): Make all command-line arguments
+	available to startup scripts and PKG_ADD files.
+
 2008-09-09  David Bateman  <dbateman@free.fr>
 
 	* DLD-FUNCTIONS/regexp.cc (octregexp_list): Distinguish between
--- a/src/octave.cc	Tue Sep 09 18:56:51 2008 -0400
+++ b/src/octave.cc	Wed Sep 10 12:38:04 2008 -0400
@@ -767,6 +767,11 @@
 
   initialize_version_info ();
 
+  // Make all command-line arguments available to startup files,
+  // including PKG_ADD files.
+
+  intern_argv (argc, argv);
+
   load_path::initialize (set_initial_path);
 
   execute_startup_files ();
@@ -795,10 +800,6 @@
 
   if (! code_to_eval.empty ())
     {
-      // We probably want all the args for an --eval option.
-
-      intern_argv (argc, argv);
-
       int parse_status = execute_eval_option_code (code_to_eval);
 
       if (! (persist || remaining_args > 0))