Mercurial > hg > octave-avbm
comparison libinterp/interpfcn/defaults.cc @ 15478:b1ff8c83e232
set Vdoc_cache_file and Vtexi_macros_file variables directly from command line options
* octave.cc (octave_process_command_line): Set Vdoc_cache_file and
Vtexi_macros_file directly.
(octave_initialize_interpreter): Don't call bind_internal_variable to
set Vdoc_cache_file or Vtexi_macros_file.
(doc_cache_file, Vtexi_macros_file): Delete unused static variables.
* defaults.cc (set_default_doc_cache_file): Don't set Vdoc_cache_file
unless it is empty.
(set_default_texi_macros_file): Don't set Vtexi_macros_file unless it
is empty.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 03 Oct 2012 02:51:04 -0400 |
parents | 457a2ff2a71b |
children | e27d9b9b71f4 |
comparison
equal
deleted
inserted
replaced
15477:8b5fc510c6d6 | 15478:b1ff8c83e232 |
---|---|
294 } | 294 } |
295 | 295 |
296 static void | 296 static void |
297 set_default_doc_cache_file (void) | 297 set_default_doc_cache_file (void) |
298 { | 298 { |
299 std::string def_file = subst_octave_home (OCTAVE_DOC_CACHE_FILE); | 299 if (Vdoc_cache_file.empty ()) |
300 | 300 { |
301 std::string env_file = octave_env::getenv ("OCTAVE_DOC_CACHE_FILE"); | 301 std::string def_file = subst_octave_home (OCTAVE_DOC_CACHE_FILE); |
302 | 302 |
303 Vdoc_cache_file = env_file.empty () ? def_file : env_file; | 303 std::string env_file = octave_env::getenv ("OCTAVE_DOC_CACHE_FILE"); |
304 | |
305 Vdoc_cache_file = env_file.empty () ? def_file : env_file; | |
306 } | |
304 } | 307 } |
305 | 308 |
306 static void | 309 static void |
307 set_default_texi_macros_file (void) | 310 set_default_texi_macros_file (void) |
308 { | 311 { |
309 std::string def_file = subst_octave_home (OCTAVE_TEXI_MACROS_FILE); | 312 if (Vtexi_macros_file.empty ()) |
310 | 313 { |
311 std::string env_file = octave_env::getenv ("OCTAVE_TEXI_MACROS_FILE"); | 314 std::string def_file = subst_octave_home (OCTAVE_TEXI_MACROS_FILE); |
312 | 315 |
313 Vtexi_macros_file = env_file.empty () ? def_file : env_file; | 316 std::string env_file = octave_env::getenv ("OCTAVE_TEXI_MACROS_FILE"); |
317 | |
318 Vtexi_macros_file = env_file.empty () ? def_file : env_file; | |
319 } | |
314 } | 320 } |
315 | 321 |
316 static void | 322 static void |
317 set_default_info_file (void) | 323 set_default_info_file (void) |
318 { | 324 { |