Mercurial > octave
comparison src/defaults.cc @ 4773:ccfbd6047a54
[project @ 2004-02-16 19:02:32 by jwe]
author | jwe |
---|---|
date | Mon, 16 Feb 2004 19:02:33 +0000 |
parents | 6ceba1f351fb |
children | adf8d68d7143 |
comparison
equal
deleted
inserted
replaced
4772:9eed17b2c8d1 | 4773:ccfbd6047a54 |
---|---|
90 std::string Vimagepath; | 90 std::string Vimagepath; |
91 | 91 |
92 std::string Vlocal_site_defaults_file; | 92 std::string Vlocal_site_defaults_file; |
93 std::string Vsite_defaults_file; | 93 std::string Vsite_defaults_file; |
94 | 94 |
95 #ifdef HAVE_FFTW3 | |
96 // Name of the FFTW wisdom program | |
97 std::string Vwisdom_prog; | |
98 #endif | |
99 | |
95 // Each element of A and B should be directory names. For each | 100 // Each element of A and B should be directory names. For each |
96 // element of A not in the list B, execute SCRIPT_FILE in that | 101 // element of A not in the list B, execute SCRIPT_FILE in that |
97 // directory if it exists. | 102 // directory if it exists. |
98 | 103 |
99 static void | 104 static void |
308 Vinfo_prog = "info"; | 313 Vinfo_prog = "info"; |
309 else | 314 else |
310 Vinfo_prog = std::string (oct_info_prog); | 315 Vinfo_prog = std::string (oct_info_prog); |
311 } | 316 } |
312 | 317 |
318 #ifdef HAVE_FFTW3 | |
319 static void | |
320 set_default_wisdom_prog (void) | |
321 { | |
322 std::string oct_wisdom_prog = octave_env::getenv ("OCTAVE_WISDOM_PROGRAM"); | |
323 | |
324 if (oct_wisdom_prog.empty ()) | |
325 Vwisdom_prog = "fftw-wisdom"; | |
326 else | |
327 Vwisdom_prog = std::string (oct_wisdom_prog); | |
328 } | |
329 #endif | |
330 | |
313 static void | 331 static void |
314 set_default_editor (void) | 332 set_default_editor (void) |
315 { | 333 { |
316 Veditor = "emacs"; | 334 Veditor = "emacs"; |
317 | 335 |
398 | 416 |
399 set_default_info_file (); | 417 set_default_info_file (); |
400 | 418 |
401 set_default_info_prog (); | 419 set_default_info_prog (); |
402 | 420 |
421 #ifdef HAVE_FFTW3 | |
422 set_default_wisdom_prog (); | |
423 #endif | |
424 | |
403 set_default_editor (); | 425 set_default_editor (); |
404 | 426 |
405 set_local_site_defaults_file (); | 427 set_local_site_defaults_file (); |
406 | 428 |
407 set_site_defaults_file (); | 429 set_site_defaults_file (); |
482 } | 504 } |
483 | 505 |
484 return status; | 506 return status; |
485 } | 507 } |
486 | 508 |
509 #ifdef HAVE_FFTW3 | |
510 static int | |
511 wisdom_prog (void) | |
512 { | |
513 int status = 0; | |
514 | |
515 std::string s = builtin_string_variable ("WISDOM_PROGRAM"); | |
516 | |
517 if (s.empty ()) | |
518 { | |
519 gripe_invalid_value_specified ("WISDOM_PROGRAM"); | |
520 status = -1; | |
521 } | |
522 else | |
523 Vwisdom_prog = s; | |
524 | |
525 return status; | |
526 } | |
527 #endif | |
528 | |
487 static int | 529 static int |
488 default_exec_path (void) | 530 default_exec_path (void) |
489 { | 531 { |
490 int status = 0; | 532 int status = 0; |
491 | 533 |
585 If the environment variable @code{EDITOR} is set when Octave starts, its\n\ | 627 If the environment variable @code{EDITOR} is set when Octave starts, its\n\ |
586 value is used as the default. Otherwise, @code{EDITOR} is set to\n\ | 628 value is used as the default. Otherwise, @code{EDITOR} is set to\n\ |
587 @code{\"emacs\"}.\n\ | 629 @code{\"emacs\"}.\n\ |
588 @end defvr"); | 630 @end defvr"); |
589 | 631 |
632 #ifdef HAVE_FFTW3 | |
633 DEFVAR (WISDOM_PROGRAM, Vwisdom_prog, wisdom_prog, | |
634 "-*- texinfo -*-\n\ | |
635 @defvr {Built-in Variable} WISDOM_PROGRAM\n\ | |
636 A string naming the FFTW wisdom program to use to create wisdom data\n\ | |
637 to accelerate Fourier transforms. If the environment variable\n\ | |
638 @code{OCTAVE_WISDOM_PROGRAM} is set when Octave starts, its value is used\n\ | |
639 as the default. Otherwise, @code{WISDOM_PROGRAM} is set to\n\ | |
640 @code{\"fftw-wisdom\"}.\n\ | |
641 @end defvr"); | |
642 #endif | |
643 | |
590 DEFVAR (EXEC_PATH, Vexec_path, exec_path, | 644 DEFVAR (EXEC_PATH, Vexec_path, exec_path, |
591 "-*- texinfo -*-\n\ | 645 "-*- texinfo -*-\n\ |
592 @defvr {Built-in Variable} EXEC_PATH\n\ | 646 @defvr {Built-in Variable} EXEC_PATH\n\ |
593 The variable @code{EXEC_PATH} is a colon separated list of directories\n\ | 647 The variable @code{EXEC_PATH} is a colon separated list of directories\n\ |
594 to search when executing external programs. Its initial value is taken from\n\ | 648 to search when executing external programs. Its initial value is taken from\n\ |
619 A colon separated list of directories in which to search when executing\n\ | 673 A colon separated list of directories in which to search when executing\n\ |
620 external programs. The value of this variable is automatically\n\ | 674 external programs. The value of this variable is automatically\n\ |
621 substituted for leading, trailing, or doubled colons that appear in the\n\ | 675 substituted for leading, trailing, or doubled colons that appear in the\n\ |
622 built-in variable @code{EXEC_PATH}.\n\ | 676 built-in variable @code{EXEC_PATH}.\n\ |
623 @end defvr"); | 677 @end defvr"); |
624 | 678 |
625 DEFVAR (LOADPATH, Vload_path, loadpath, | 679 DEFVAR (LOADPATH, Vload_path, loadpath, |
626 "-*- texinfo -*-\n\ | 680 "-*- texinfo -*-\n\ |
627 @defvr {Built-in Variable} LOADPATH\n\ | 681 @defvr {Built-in Variable} LOADPATH\n\ |
628 A colon separated list of directories in which to search for function\n\ | 682 A colon separated list of directories in which to search for function\n\ |
629 files. @xref{Functions and Scripts}. The value of @code{LOADPATH}\n\ | 683 files. @xref{Functions and Scripts}. The value of @code{LOADPATH}\n\ |