Functions | Variables

defaults.cc File Reference

#include <cstdlib>
#include <algorithm>
#include <iostream>
#include <string>
#include <sys/types.h>
#include <unistd.h>
#include "dir-ops.h"
#include "oct-env.h"
#include "file-stat.h"
#include "pathsearch.h"
#include "str-vec.h"
#include <defaults.h>
#include "defun.h"
#include "error.h"
#include "file-ops.h"
#include "gripes.h"
#include "help.h"
#include "input.h"
#include "load-path.h"
#include "oct-obj.h"
#include "ov.h"
#include "parse.h"
#include "toplev.h"
#include "unwind-prot.h"
#include "variables.h"
#include <version.h>
Include dependency graph for defaults.cc:

Go to the source code of this file.

Functions

 DEFUN (EDITOR, args, nargout,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {@var{val} =} EDITOR ()\n\ @deftypefnx {Built-in Function} {@var{old_val} =} EDITOR (@var{new_val})\n\ @deftypefnx {Built-in Function} {} EDITOR (@var{new_val}, \"local\")\n\ Query or set the internal variable that specifies the editor to\n\ use with the @code{edit_history} command. The default value is taken from\n\ the environment variable @w{@env{EDITOR}} when Octave starts. If the\n\ environment variable is not initialized, @w{@env{EDITOR}} will be set to\n\ @code{\"emacs\"}.\n\ \n\ When called from inside a function with the \"local\" option, the variable is\n\ changed locally for the function and any subroutines it calls. The original\n\ variable value is restored when exiting the function.\n\ @seealso{edit_history}\n\ @end deftypefn")
 DEFUN (OCTAVE_HOME, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} OCTAVE_HOME ()\n\ Return the name of the top-level Octave installation directory.\n\ @end deftypefn")
 DEFUN (EXEC_PATH, args, nargout,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {@var{val} =} EXEC_PATH ()\n\ @deftypefnx {Built-in Function} {@var{old_val} =} EXEC_PATH (@var{new_val})\n\ @deftypefnx {Built-in Function} {} EXEC_PATH (@var{new_val}, \"local\")\n\ Query or set the internal variable that specifies a colon separated\n\ list of directories to append to the shell PATH when executing external\n\ programs. The initial value of is taken from the environment variable\n\ @w{@env{OCTAVE_EXEC_PATH}}, but that value can be overridden by\n\ the command line argument @option{--exec-path PATH}.\n\ \n\ When called from inside a function with the \"local\" option, the variable is\n\ changed locally for the function and any subroutines it calls. The original\n\ variable value is restored when exiting the function.\n\ @end deftypefn")
 DEFUN (IMAGE_PATH, args, nargout,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {@var{val} =} IMAGE_PATH ()\n\ @deftypefnx {Built-in Function} {@var{old_val} =} IMAGE_PATH (@var{new_val})\n\ @deftypefnx {Built-in Function} {} IMAGE_PATH (@var{new_val}, \"local\")\n\ Query or set the internal variable that specifies a colon separated\n\ list of directories in which to search for image files.\n\ \n\ When called from inside a function with the \"local\" option, the variable is\n\ changed locally for the function and any subroutines it calls. The original\n\ variable value is restored when exiting the function.\n\ @end deftypefn")
 DEFUNX ("OCTAVE_VERSION", FOCTAVE_VERSION, args,,"-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} OCTAVE_VERSION ()\n\ Return the version number of Octave, as a string.\n\ @end deftypefn")
void install_defaults (void)
static void set_default_arch_lib_dir (void)
static void set_default_bin_dir (void)
static void set_default_data_dir (void)
static void set_default_doc_cache_file (void)
static void set_default_editor (void)
static void set_default_fcn_file_dir (void)
static void set_default_image_dir (void)
static void set_default_info_dir (void)
static void set_default_info_file (void)
static void set_default_info_prog (void)
static void set_default_libexec_dir (void)
static void set_default_local_api_arch_lib_dir (void)
static void set_default_local_api_fcn_file_dir (void)
static void set_default_local_api_oct_file_dir (void)
static void set_default_local_arch_lib_dir (void)
static void set_default_local_fcn_file_dir (void)
static void set_default_local_oct_file_dir (void)
static void set_default_local_ver_arch_lib_dir (void)
static void set_default_local_ver_fcn_file_dir (void)
static void set_default_local_ver_oct_file_dir (void)
static void set_default_oct_file_dir (void)
void set_exec_path (const std::string &path_arg)
void set_image_path (const std::string &path)
static void set_local_site_defaults_file (void)
static void set_octave_home (void)
static void set_site_defaults_file (void)
std::string subst_octave_home (const std::string &s)

Variables

std::string Varch_lib_dir
std::string Vbin_dir
std::string Vdata_dir
std::string VEDITOR
static std::string VEXEC_PATH
std::string Vfcn_file_dir
std::string Vimage_dir
static std::string VIMAGE_PATH
std::string Vinfo_dir
std::string Vlibexec_dir
std::string Vlocal_api_arch_lib_dir
std::string Vlocal_api_fcn_file_dir
std::string Vlocal_api_oct_file_dir
std::string Vlocal_arch_lib_dir
std::string Vlocal_fcn_file_dir
std::string Vlocal_oct_file_dir
std::string Vlocal_site_defaults_file
std::string Vlocal_ver_arch_lib_dir
std::string Vlocal_ver_fcn_file_dir
std::string Vlocal_ver_oct_file_dir
std::string Voct_file_dir
std::string Voctave_home
std::string Vsite_defaults_file

Function Documentation

DEFUN ( EDITOR  ,
args  ,
nargout   
)

Definition at line 407 of file defaults.cc.

References SET_NONEMPTY_INTERNAL_STRING_VARIABLE.

DEFUN ( OCTAVE_HOME  ,
args   
)

Definition at line 500 of file defaults.cc.

References print_usage(), and Voctave_home.

DEFUN ( EXEC_PATH  ,
args  ,
nargout   
)

Definition at line 438 of file defaults.cc.

References set_exec_path(), SET_NONEMPTY_INTERNAL_STRING_VARIABLE, and VEXEC_PATH.

DEFUN ( IMAGE_PATH  ,
args  ,
nargout   
)

Definition at line 473 of file defaults.cc.

References SET_NONEMPTY_INTERNAL_STRING_VARIABLE.

DEFUNX ( "OCTAVE_VERSION"  ,
FOCTAVE_VERSION  ,
args   
)

Definition at line 521 of file defaults.cc.

References print_usage().

void install_defaults ( void   ) 
static void set_default_arch_lib_dir ( void   )  [static]

Definition at line 145 of file defaults.cc.

References subst_octave_home(), and Varch_lib_dir.

Referenced by install_defaults().

static void set_default_bin_dir ( void   )  [static]

Definition at line 223 of file defaults.cc.

References subst_octave_home(), and Vbin_dir.

Referenced by install_defaults().

static void set_default_data_dir ( void   )  [static]

Definition at line 133 of file defaults.cc.

References subst_octave_home(), and Vdata_dir.

Referenced by install_defaults().

static void set_default_doc_cache_file ( void   )  [static]

Definition at line 287 of file defaults.cc.

References octave_env::getenv(), subst_octave_home(), and Vdoc_cache_file.

Referenced by install_defaults().

static void set_default_editor ( void   )  [static]

Definition at line 318 of file defaults.cc.

References octave_env::getenv(), and VEDITOR.

Referenced by install_defaults().

static void set_default_fcn_file_dir ( void   )  [static]

Definition at line 205 of file defaults.cc.

References subst_octave_home(), and Vfcn_file_dir.

Referenced by install_defaults().

static void set_default_image_dir ( void   )  [static]

Definition at line 211 of file defaults.cc.

References subst_octave_home(), and Vimage_dir.

Referenced by install_defaults().

static void set_default_info_dir ( void   )  [static]

Definition at line 127 of file defaults.cc.

References subst_octave_home(), and Vinfo_dir.

Referenced by install_defaults().

static void set_default_info_file ( void   )  [static]

Definition at line 297 of file defaults.cc.

References octave_env::getenv(), subst_octave_home(), and Vinfo_file.

Referenced by install_defaults().

static void set_default_info_prog ( void   )  [static]

Definition at line 307 of file defaults.cc.

References octave_env::getenv(), and Vinfo_program.

Referenced by install_defaults().

static void set_default_libexec_dir ( void   )  [static]

Definition at line 139 of file defaults.cc.

References subst_octave_home(), and Vlibexec_dir.

Referenced by install_defaults().

static void set_default_local_api_arch_lib_dir ( void   )  [static]

Definition at line 157 of file defaults.cc.

References subst_octave_home(), and Vlocal_api_arch_lib_dir.

Referenced by install_defaults().

static void set_default_local_api_fcn_file_dir ( void   )  [static]

Definition at line 193 of file defaults.cc.

References subst_octave_home(), and Vlocal_api_fcn_file_dir.

Referenced by install_defaults().

static void set_default_local_api_oct_file_dir ( void   )  [static]

Definition at line 175 of file defaults.cc.

References subst_octave_home(), and Vlocal_api_oct_file_dir.

Referenced by install_defaults().

static void set_default_local_arch_lib_dir ( void   )  [static]

Definition at line 151 of file defaults.cc.

References subst_octave_home(), and Vlocal_arch_lib_dir.

Referenced by install_defaults().

static void set_default_local_fcn_file_dir ( void   )  [static]

Definition at line 199 of file defaults.cc.

References subst_octave_home(), and Vlocal_fcn_file_dir.

Referenced by install_defaults().

static void set_default_local_oct_file_dir ( void   )  [static]

Definition at line 181 of file defaults.cc.

References subst_octave_home(), and Vlocal_oct_file_dir.

Referenced by install_defaults().

static void set_default_local_ver_arch_lib_dir ( void   )  [static]

Definition at line 163 of file defaults.cc.

References subst_octave_home(), and Vlocal_ver_arch_lib_dir.

Referenced by install_defaults().

static void set_default_local_ver_fcn_file_dir ( void   )  [static]

Definition at line 187 of file defaults.cc.

References subst_octave_home(), and Vlocal_ver_fcn_file_dir.

Referenced by install_defaults().

static void set_default_local_ver_oct_file_dir ( void   )  [static]

Definition at line 169 of file defaults.cc.

References subst_octave_home(), and Vlocal_ver_oct_file_dir.

Referenced by install_defaults().

static void set_default_oct_file_dir ( void   )  [static]

Definition at line 217 of file defaults.cc.

References subst_octave_home(), and Voct_file_dir.

Referenced by install_defaults().

void set_exec_path ( const std::string &  path_arg  ) 
void set_image_path ( const std::string &  path  ) 
static void set_local_site_defaults_file ( void   )  [static]

Definition at line 329 of file defaults.cc.

References octave_env::getenv(), subst_octave_home(), and Vlocal_site_defaults_file.

Referenced by install_defaults().

static void set_octave_home ( void   )  [static]

Definition at line 119 of file defaults.cc.

References octave_env::getenv(), and Voctave_home.

Referenced by install_defaults().

static void set_site_defaults_file ( void   )  [static]

Definition at line 343 of file defaults.cc.

References octave_env::getenv(), subst_octave_home(), and Vsite_defaults_file.

Referenced by install_defaults().

std::string subst_octave_home ( const std::string &  s  ) 

Variable Documentation

std::string Varch_lib_dir

Definition at line 64 of file defaults.cc.

Referenced by set_default_arch_lib_dir(), and set_exec_path().

std::string Vbin_dir

Definition at line 60 of file defaults.cc.

Referenced by set_default_bin_dir(), and set_exec_path().

std::string Vdata_dir

Definition at line 62 of file defaults.cc.

Referenced by initialize_pathsearch(), and set_default_data_dir().

std::string VEDITOR

Definition at line 87 of file defaults.cc.

Referenced by do_edit_history(), and set_default_editor().

std::string VEXEC_PATH [static]

Definition at line 84 of file defaults.cc.

Referenced by DEFUN(), and set_exec_path().

std::string Vfcn_file_dir
std::string Vimage_dir

Definition at line 80 of file defaults.cc.

Referenced by set_default_image_dir(), and set_image_path().

std::string VIMAGE_PATH [static]

Definition at line 89 of file defaults.cc.

Referenced by set_image_path().

std::string Vinfo_dir

Definition at line 61 of file defaults.cc.

Referenced by set_default_info_dir().

std::string Vlibexec_dir

Definition at line 63 of file defaults.cc.

Referenced by initialize_pathsearch(), and set_default_libexec_dir().

Definition at line 66 of file defaults.cc.

Referenced by set_default_local_api_arch_lib_dir(), and set_exec_path().

Definition at line 74 of file defaults.cc.

Referenced by load_path::do_initialize(), and set_default_local_api_fcn_file_dir().

Definition at line 70 of file defaults.cc.

Referenced by load_path::do_initialize(), and set_default_local_api_oct_file_dir().

std::string Vlocal_arch_lib_dir

Definition at line 65 of file defaults.cc.

Referenced by set_default_local_arch_lib_dir(), and set_exec_path().

std::string Vlocal_fcn_file_dir

Definition at line 75 of file defaults.cc.

Referenced by load_path::do_initialize(), and set_default_local_fcn_file_dir().

std::string Vlocal_oct_file_dir

Definition at line 71 of file defaults.cc.

Referenced by load_path::do_initialize(), and set_default_local_oct_file_dir().

Definition at line 91 of file defaults.cc.

Referenced by execute_startup_files(), and set_local_site_defaults_file().

Definition at line 67 of file defaults.cc.

Referenced by set_default_local_ver_arch_lib_dir(), and set_exec_path().

Definition at line 73 of file defaults.cc.

Referenced by load_path::do_initialize(), and set_default_local_ver_fcn_file_dir().

Definition at line 69 of file defaults.cc.

Referenced by load_path::do_initialize(), and set_default_local_ver_oct_file_dir().

std::string Voct_file_dir
std::string Voctave_home

Definition at line 58 of file defaults.cc.

Referenced by DEFUN(), set_octave_home(), and subst_octave_home().

std::string Vsite_defaults_file

Definition at line 92 of file defaults.cc.

Referenced by execute_startup_files(), and set_site_defaults_file().

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines