Mercurial > octave
annotate libinterp/corefcn/defaults.h @ 23717:06579337237b
move configuration variables inside octave::config namespace
* defaults.h, defaults.in.cc: Define access functions for
configuration variables inside octave::config namespace and make
variables static inside defaults.cc, effectively making these values
read-only for users. Change all uses.
A few variables that may be modified by users remain in the global
namespace. These may be moved later.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 29 Jun 2017 02:33:19 -0400 |
parents | 4feef926733a |
children | 69a111259a2c |
rev | line source |
---|---|
23713
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
1 // DO NOT EDIT! Generated automatically by subst-default-vals. |
12 | 2 /* |
3 | |
23219
3ac9f9ecfae5
maint: Update copyright dates.
John W. Eaton <jwe@octave.org>
parents:
23083
diff
changeset
|
4 Copyright (C) 1993-2017 John W. Eaton |
12 | 5 |
6 This file is part of Octave. | |
7 | |
8 Octave is free software; you can redistribute it and/or modify it | |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
9 under the terms of the GNU General Public License as published by |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
10 the Free Software Foundation; either version 3 of the License, or |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
11 (at your option) any later version. |
12 | 12 |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
13 Octave is distributed in the hope that it will be useful, but |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
14 WITHOUT ANY WARRANTY; without even the implied warranty of |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
16 GNU General Public License for more details. |
12 | 17 |
18 You should have received a copy of the GNU General Public License | |
7016 | 19 along with Octave; see the file COPYING. If not, see |
20 <http://www.gnu.org/licenses/>. | |
12 | 21 |
22 */ | |
23 | |
20791
f7084eae3318
maint: Use Octave coding conventions for #if statements.
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
24 #if ! defined (octave_defaults_h) |
423 | 25 #define octave_defaults_h 1 |
12 | 26 |
21244
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
21200
diff
changeset
|
27 #include "octave-config.h" |
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
21200
diff
changeset
|
28 |
2204 | 29 #include <string> |
30 | |
3174 | 31 #include "pathsearch.h" |
32 | |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
33 namespace octave |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
34 { |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
35 namespace config |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
36 { |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
37 // These could be defined as pure constants, but we'll use |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
38 // functions to be consistent with the values that require |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
39 // initialization. |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
40 |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
41 extern OCTINTERP_API std::string canonical_host_type (void); |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
42 extern OCTINTERP_API std::string release (void); |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
43 extern OCTINTERP_API std::string default_pager (void); |
2204 | 44 |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
45 // These require initialization, so can't be defined as pure |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
46 // constants. We use functions to access these values so that |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
47 // they can't be modified by users. |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
48 |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
49 extern OCTINTERP_API std::string octave_home (void); |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
50 extern OCTINTERP_API std::string octave_exec_home (void); |
23713
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
51 |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
52 extern OCTINTERP_API std::string bin_dir (void); |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
53 extern OCTINTERP_API std::string data_dir (void); |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
54 extern OCTINTERP_API std::string dataroot_dir (void); |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
55 extern OCTINTERP_API std::string include_dir (void); |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
56 extern OCTINTERP_API std::string lib_dir (void); |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
57 extern OCTINTERP_API std::string libexec_dir (void); |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
58 |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
59 extern OCTINTERP_API std::string local_ver_arch_lib_dir (void); |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
60 extern OCTINTERP_API std::string local_api_arch_lib_dir (void); |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
61 extern OCTINTERP_API std::string local_arch_lib_dir (void); |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
62 extern OCTINTERP_API std::string arch_lib_dir (void); |
23713
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
63 |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
64 extern OCTINTERP_API std::string local_ver_oct_file_dir (void); |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
65 extern OCTINTERP_API std::string local_api_oct_file_dir (void); |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
66 extern OCTINTERP_API std::string local_oct_file_dir (void); |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
67 extern OCTINTERP_API std::string oct_file_dir (void); |
23713
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
68 |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
69 extern OCTINTERP_API std::string local_ver_fcn_file_dir (void); |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
70 extern OCTINTERP_API std::string local_api_fcn_file_dir (void); |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
71 extern OCTINTERP_API std::string local_fcn_file_dir (void); |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
72 extern OCTINTERP_API std::string fcn_file_dir (void); |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
73 |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
74 extern OCTINTERP_API std::string oct_data_dir (void); |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
75 extern OCTINTERP_API std::string oct_etc_dir (void); |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
76 extern OCTINTERP_API std::string oct_include_dir (void); |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
77 extern OCTINTERP_API std::string oct_lib_dir (void); |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
78 extern OCTINTERP_API std::string oct_locale_dir (void); |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
79 extern OCTINTERP_API std::string oct_tests_dir (void); |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
80 |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
81 extern OCTINTERP_API std::string info_dir (void); |
5814 | 82 |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
83 extern OCTINTERP_API std::string man_dir (void); |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
84 extern OCTINTERP_API std::string man1_dir (void); |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
85 extern OCTINTERP_API std::string man1_ext (void); |
5814 | 86 |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
87 extern OCTINTERP_API std::string image_dir (void); |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
88 |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
89 extern OCTINTERP_API std::string local_startupfile_dir (void); |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
90 extern OCTINTERP_API std::string startupfile_dir (void); |
5814 | 91 |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
92 extern OCTINTERP_API std::string local_site_defaults_file (void); |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
93 extern OCTINTERP_API std::string site_defaults_file (void); |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
94 } |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
95 } |
15157
a87fa9132b72
provide Voct_etc_dir variable
John W. Eaton <jwe@octave.org>
parents:
15100
diff
changeset
|
96 |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
97 // FIXME: these may be changed by users. Maybe they should be defined |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
98 // somewhere else? |
5814 | 99 |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
100 extern OCTINTERP_API std::string Vbuilt_in_docstrings_file; |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
101 |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
102 extern OCTINTERP_API std::string VEXEC_PATH; |
2204 | 103 |
104 // Name of the editor to be invoked by the edit_history command. | |
15260
789c8c3c9af5
Export more symbols from liboctinterp.
Michael Goffioul <michael.goffioul@gmail.com>
parents:
15195
diff
changeset
|
105 extern OCTINTERP_API std::string VEDITOR; |
2204 | 106 |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
107 extern OCTINTERP_API std::string VIMAGE_PATH; |
2198 | 108 |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
109 extern OCTINTERP_API void |
21017
93748bcaec17
maint: Replace emtpy 'std::string ()' calls with "".
Rik <rik@octave.org>
parents:
20791
diff
changeset
|
110 set_exec_path (const std::string& path = ""); |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
111 |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
112 extern OCTINTERP_API void |
21017
93748bcaec17
maint: Replace emtpy 'std::string ()' calls with "".
Rik <rik@octave.org>
parents:
20791
diff
changeset
|
113 set_image_path (const std::string& path = ""); |
5814 | 114 |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
115 extern OCTINTERP_API void install_defaults (void); |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
116 |
12 | 117 #endif |