33 #include <sys/types.h>
112 if (s.substr (0, len) == prefix)
248 std::string tpath = path_arg;
278 if (! shell_path.empty ())
289 std::string tpath = path;
294 if (! tpath.empty ())
299 if (! tpath.empty ())
338 Vinfo_file = oct_info_file.empty () ? std_info_file : oct_info_file;
349 if (oct_info_prog.empty ())
363 if (! env_editor.empty ())
469 DEFUN (EDITOR, args, nargout,
471 @deftypefn {Built-in Function} {@var{val} =} EDITOR ()\n\
472 @deftypefnx {Built-in Function} {@var{old_val} =} EDITOR (@var{new_val})\n\
473 @deftypefnx {Built-in Function} {} EDITOR (@var{new_val}, \"local\")\n\
474 Query or set the internal variable that specifies the default text editor.\n\
476 The default value is taken from the environment variable @w{@env{EDITOR}}\n\
477 when Octave starts. If the\n\
478 environment variable is not initialized, @w{@env{EDITOR}} will be set to\n\
479 @qcode{\"emacs\"}.\n\
481 When called from inside a function with the @qcode{\"local\"} option, the\n\
482 variable is changed locally for the function and any subroutines it calls. \n\
483 The original variable value is restored when exiting the function.\n\
485 @seealso{edit, edit_history}\n\
503 DEFUN (EXEC_PATH, args, nargout,
505 @deftypefn {Built-in Function} {@var{val} =} EXEC_PATH ()\n\
506 @deftypefnx {Built-in Function} {@var{old_val} =} EXEC_PATH (@var{new_val})\n\
507 @deftypefnx {Built-in Function} {} EXEC_PATH (@var{new_val}, \"local\")\n\
508 Query or set the internal variable that specifies a colon separated\n\
509 list of directories to append to the shell PATH when executing external\n\
510 programs. The initial value of is taken from the environment variable\n\
511 @w{@env{OCTAVE_EXEC_PATH}}, but that value can be overridden by\n\
512 the command line argument @option{--exec-path PATH}.\n\
514 When called from inside a function with the @qcode{\"local\"} option, the\n\
515 variable is changed locally for the function and any subroutines it calls. \n\
516 The original variable value is restored when exiting the function.\n\
518 @seealso{IMAGE_PATH, OCTAVE_HOME}\n\
523 if (args.length () > 0)
541 DEFUN (IMAGE_PATH, args, nargout,
543 @deftypefn {Built-in Function} {@var{val} =} IMAGE_PATH ()\n\
544 @deftypefnx {Built-in Function} {@var{old_val} =} IMAGE_PATH (@var{new_val})\n\
545 @deftypefnx {Built-in Function} {} IMAGE_PATH (@var{new_val}, \"local\")\n\
546 Query or set the internal variable that specifies a colon separated\n\
547 list of directories in which to search for image files.\n\
549 When called from inside a function with the @qcode{\"local\"} option, the\n\
550 variable is changed locally for the function and any subroutines it calls. \n\
551 The original variable value is restored when exiting the function.\n\
553 @seealso{EXEC_PATH, OCTAVE_HOME}\n\
573 @deftypefn {Built-in Function} {} OCTAVE_HOME ()\n\
574 Return the name of the top-level Octave installation directory.\n\
576 @seealso{EXEC_PATH, IMAGE_PATH}\n\
581 if (args.length () == 0)
596 @deftypefn {Built-in Function} {} OCTAVE_VERSION ()\n\
597 Return the version number of Octave, as a string.\n\
602 int nargin = args.
length ();