1 //////////////////////////////////////////////////////////////////////// 2 // 3 // Copyright (C) 1993-2021 The Octave Project Developers 4 // 5 // See the file COPYRIGHT.md in the top-level directory of this 6 // distribution or <https://octave.org/copyright/>. 7 // 8 // This file is part of Octave. 9 // 10 // Octave is free software: you can redistribute it and/or modify it 11 // under the terms of the GNU General Public License as published by 12 // the Free Software Foundation, either version 3 of the License, or 13 // (at your option) any later version. 14 // 15 // Octave is distributed in the hope that it will be useful, but 16 // WITHOUT ANY WARRANTY; without even the implied warranty of 17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 // GNU General Public License for more details. 19 // 20 // You should have received a copy of the GNU General Public License 21 // along with Octave; see the file COPYING. If not, see 22 // <https://www.gnu.org/licenses/>. 23 // 24 //////////////////////////////////////////////////////////////////////// 25 26 #if ! defined (octave_defaults_h) 27 #define octave_defaults_h 1 28 29 #include "octave-config.h" 30 31 #include <string> 32 33 #include "pathsearch.h" 34 35 namespace octave 36 { 37 namespace config 38 { 39 extern OCTINTERP_API std::string 40 prepend_octave_home (const std::string& s); 41 42 extern OCTINTERP_API std::string 43 prepend_octave_exec_home (const std::string& s); 44 45 // These could be defined as pure constants, but we'll use 46 // functions to be consistent with the values that require 47 // initialization. 48 49 extern OCTINTERP_API std::string canonical_host_type (void); 50 extern OCTINTERP_API std::string release (void); 51 extern OCTINTERP_API std::string default_pager (void); 52 53 // These require initialization, so can't be defined as pure 54 // constants. We use functions to access these values so that 55 // they can't be modified by users. 56 57 extern OCTINTERP_API std::string octave_home (void); 58 extern OCTINTERP_API std::string octave_exec_home (void); 59 60 extern OCTINTERP_API std::string bin_dir (void); 61 extern OCTINTERP_API std::string data_dir (void); 62 extern OCTINTERP_API std::string dataroot_dir (void); 63 extern OCTINTERP_API std::string include_dir (void); 64 extern OCTINTERP_API std::string lib_dir (void); 65 extern OCTINTERP_API std::string libexec_dir (void); 66 67 extern OCTINTERP_API std::string local_ver_arch_lib_dir (void); 68 extern OCTINTERP_API std::string local_api_arch_lib_dir (void); 69 extern OCTINTERP_API std::string local_arch_lib_dir (void); 70 extern OCTINTERP_API std::string arch_lib_dir (void); 71 72 extern OCTINTERP_API std::string local_ver_oct_file_dir (void); 73 extern OCTINTERP_API std::string local_api_oct_file_dir (void); 74 extern OCTINTERP_API std::string local_oct_file_dir (void); 75 extern OCTINTERP_API std::string oct_file_dir (void); 76 77 extern OCTINTERP_API std::string local_ver_fcn_file_dir (void); 78 extern OCTINTERP_API std::string local_api_fcn_file_dir (void); 79 extern OCTINTERP_API std::string local_fcn_file_dir (void); 80 extern OCTINTERP_API std::string fcn_file_dir (void); 81 82 extern OCTINTERP_API std::string oct_data_dir (void); 83 extern OCTINTERP_API std::string oct_doc_dir (void); 84 extern OCTINTERP_API std::string oct_etc_dir (void); 85 extern OCTINTERP_API std::string oct_fonts_dir (void); 86 extern OCTINTERP_API std::string oct_include_dir (void); 87 extern OCTINTERP_API std::string oct_lib_dir (void); 88 extern OCTINTERP_API std::string oct_locale_dir (void); 89 extern OCTINTERP_API std::string oct_tests_dir (void); 90 91 extern OCTINTERP_API std::string info_dir (void); 92 93 extern OCTINTERP_API std::string man_dir (void); 94 extern OCTINTERP_API std::string man1_dir (void); 95 extern OCTINTERP_API std::string man1_ext (void); 96 97 extern OCTINTERP_API std::string image_dir (void); 98 99 extern OCTINTERP_API std::string local_startupfile_dir (void); 100 extern OCTINTERP_API std::string startupfile_dir (void); 101 102 extern OCTINTERP_API std::string local_site_defaults_file (void); 103 extern OCTINTERP_API std::string site_defaults_file (void); 104 } 105 } 106 107 #endif 108