Mercurial > octave
annotate libinterp/corefcn/defaults.cc @ 25003:2365c2661b3c stable
doc: Spellcheck documentation ahead of 4.4 release.
* aspell-octave.en.pws: Add new words to Octave-only spelling dictionary.
Remove exception words which are no longer used in manual.
* basics.txi, bugs.txi, func.txi, geometry.txi, install.txi, matrix.txi,
package.txi, plot.txi, poly.txi, preface.txi, quad.txi, sparse.txi,
strings.txi, vectorize.txi, data.cc, defaults.cc, file-io.cc, pinv.cc,
quadcc.cc, qz.cc, rand.cc, schur.cc, syscalls.cc, sysdep.cc, toplev.cc, amd.cc,
audioread.cc, colamd.cc, dmperm.cc, symrcm.cc, quadgk.m, quadl.m, imfinfo.m,
rgb2gray.m, javachk.m, usejava.m, unpack.m, fzero.m, glpk.m, pqpnonneg.m,
stemleaf.m, print.m, polyfit.m, blackman.m, bicgstab.m, cgs.m, eigs.m, pcg.m,
tfqmr.m, gallery.m, rosser.m, toeplitz.m, vander.m, isstrprop.m:
Add @nospell{} macro around proper names and other words which aspell should
not check. Correct misspellings identified by aspell.
author | Rik <rik@octave.org> |
---|---|
date | Mon, 26 Mar 2018 10:45:04 -0700 |
parents | 0b9e7fcaab91 |
children | 6652d3823428 |
rev | line source |
---|---|
2203 | 1 /* |
2 | |
23219
3ac9f9ecfae5
maint: Update copyright dates.
John W. Eaton <jwe@octave.org>
parents:
23083
diff
changeset
|
3 Copyright (C) 1996-2017 John W. Eaton |
2203 | 4 |
5 This file is part of Octave. | |
6 | |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
23721
diff
changeset
|
7 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
|
8 under the terms of the GNU General Public License as published by |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
23721
diff
changeset
|
9 the Free Software Foundation, either version 3 of the License, or |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
10 (at your option) any later version. |
2203 | 11 |
22755
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
12 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
|
13 WITHOUT ANY WARRANTY; without even the implied warranty of |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3a2b891d0b33
maint: Standardize Copyright formatting.
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
15 GNU General Public License for more details. |
2203 | 16 |
17 You should have received a copy of the GNU General Public License | |
7016 | 18 along with Octave; see the file COPYING. If not, see |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
23721
diff
changeset
|
19 <https://www.gnu.org/licenses/>. |
2203 | 20 |
21 */ | |
22 | |
21724
aba2e6293dd8
use "#if ..." consistently instead of "#ifdef" and "#ifndef"
John W. Eaton <jwe@octave.org>
parents:
21301
diff
changeset
|
23 #if defined (HAVE_CONFIG_H) |
21301
40de9f8f23a6
Use '#include "config.h"' rather than <config.h>.
Rik <rik@octave.org>
parents:
21200
diff
changeset
|
24 # include "config.h" |
2203 | 25 #endif |
26 | |
27 #include <cstdlib> | |
28 | |
6114 | 29 #include <algorithm> |
3503 | 30 #include <iostream> |
2203 | 31 #include <string> |
32 | |
5814 | 33 #include "dir-ops.h" |
23721
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
34 #include "file-ops.h" |
2926 | 35 #include "oct-env.h" |
36 | |
23466
5da300c55e89
use "" instead of <> for including defaults.h and version.h
John W. Eaton <jwe@octave.org>
parents:
23450
diff
changeset
|
37 #include "defaults.h" |
2203 | 38 #include "defun.h" |
39 #include "error.h" | |
3040 | 40 #include "file-ops.h" |
20940
48b2ad5ee801
maint: Rename oct-obj.[cc|h] to ovl.[cc|h] for clarity.
Rik <rik@octave.org>
parents:
20853
diff
changeset
|
41 #include "ovl.h" |
2390 | 42 #include "ov.h" |
2203 | 43 #include "variables.h" |
23466
5da300c55e89
use "" instead of <> for including defaults.h and version.h
John W. Eaton <jwe@octave.org>
parents:
23450
diff
changeset
|
44 #include "version.h" |
2203 | 45 |
23720
d3a9ffc9fdbd
move config macros from defaults.cc to a separate file
John W. Eaton <jwe@octave.org>
parents:
23719
diff
changeset
|
46 #include "default-defs.h" |
23713
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
47 |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
48 static bool initialized = false; |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
49 |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
50 static std::string Voctave_home; |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
51 static std::string Voctave_exec_home; |
2203 | 52 |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
53 static std::string Vbin_dir; |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
54 static std::string Vdata_dir; |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
55 static std::string Vdataroot_dir; |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
56 static std::string Vinclude_dir; |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
57 static std::string Vlib_dir; |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
58 static std::string Vlibexec_dir; |
5814 | 59 |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
60 static std::string Vlocal_ver_arch_lib_dir; |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
61 static std::string Vlocal_api_arch_lib_dir; |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
62 static std::string Vlocal_arch_lib_dir; |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
63 static std::string Varch_lib_dir; |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
64 |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
65 static std::string Vlocal_ver_oct_file_dir; |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
66 static std::string Vlocal_api_oct_file_dir; |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
67 static std::string Vlocal_oct_file_dir; |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
68 static std::string Voct_file_dir; |
2203 | 69 |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
70 static std::string Vlocal_ver_fcn_file_dir; |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
71 static std::string Vlocal_api_fcn_file_dir; |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
72 static std::string Vlocal_fcn_file_dir; |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
73 static std::string Vfcn_file_dir; |
5814 | 74 |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
75 static std::string Voct_data_dir; |
24875
7c7b60dd4d4c
Generate Qt compressed help and collection files for the manual (bug #53006)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24534
diff
changeset
|
76 static std::string Voct_doc_dir; |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
77 static std::string Voct_etc_dir; |
24899
1a46d174a483
include a proper definition of Octave's private font fallback directory
Mike Miller <mtmiller@octave.org>
parents:
24882
diff
changeset
|
78 static std::string Voct_fonts_dir; |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
79 static std::string Voct_include_dir; |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
80 static std::string Voct_lib_dir; |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
81 static std::string Voct_locale_dir; |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
82 static std::string Voct_tests_dir; |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
83 |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
84 static std::string Vinfo_dir; |
15157
a87fa9132b72
provide Voct_etc_dir variable
John W. Eaton <jwe@octave.org>
parents:
15088
diff
changeset
|
85 |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
86 static std::string Vman_dir; |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
87 static std::string Vman1_dir; |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
88 static std::string Vman1_ext; |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
89 |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
90 static std::string Vimage_dir; |
23713
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
91 |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
92 static std::string Vlocal_startupfile_dir; |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
93 static std::string Vstartupfile_dir; |
23713
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
94 |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
95 static std::string Vlocal_site_defaults_file; |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
96 static std::string Vsite_defaults_file; |
5814 | 97 |
23712
b95c430c0649
revamp insertion of config variables into binaries and eliminate some macros
John W. Eaton <jwe@octave.org>
parents:
23466
diff
changeset
|
98 // Variables that name directories or files are substituted into source |
b95c430c0649
revamp insertion of config variables into binaries and eliminate some macros
John W. Eaton <jwe@octave.org>
parents:
23466
diff
changeset
|
99 // files with "${prefix}/" stripped from the beginning of the string. |
2203 | 100 |
23712
b95c430c0649
revamp insertion of config variables into binaries and eliminate some macros
John W. Eaton <jwe@octave.org>
parents:
23466
diff
changeset
|
101 // All configure variables of this form should be specified as absolute |
b95c430c0649
revamp insertion of config variables into binaries and eliminate some macros
John W. Eaton <jwe@octave.org>
parents:
23466
diff
changeset
|
102 // directory names. The only ones that should not be absolute here are |
23713
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
103 // ones that have had "${prefix}/" or "${exec_prefix} stripped. |
2203 | 104 |
23713
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
105 static std::string |
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
106 prepend_home_dir (const std::string& hd, const std::string& s) |
23712
b95c430c0649
revamp insertion of config variables into binaries and eliminate some macros
John W. Eaton <jwe@octave.org>
parents:
23466
diff
changeset
|
107 { |
b95c430c0649
revamp insertion of config variables into binaries and eliminate some macros
John W. Eaton <jwe@octave.org>
parents:
23466
diff
changeset
|
108 std::string retval = s; |
6276 | 109 |
23712
b95c430c0649
revamp insertion of config variables into binaries and eliminate some macros
John W. Eaton <jwe@octave.org>
parents:
23466
diff
changeset
|
110 char dir_sep_char = octave::sys::file_ops::dir_sep_char (); |
2203 | 111 |
23712
b95c430c0649
revamp insertion of config variables into binaries and eliminate some macros
John W. Eaton <jwe@octave.org>
parents:
23466
diff
changeset
|
112 if (! octave::sys::env::absolute_pathname (retval)) |
23713
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
113 retval = hd + dir_sep_char + s; |
23712
b95c430c0649
revamp insertion of config variables into binaries and eliminate some macros
John W. Eaton <jwe@octave.org>
parents:
23466
diff
changeset
|
114 |
b95c430c0649
revamp insertion of config variables into binaries and eliminate some macros
John W. Eaton <jwe@octave.org>
parents:
23466
diff
changeset
|
115 if (dir_sep_char != '/') |
b95c430c0649
revamp insertion of config variables into binaries and eliminate some macros
John W. Eaton <jwe@octave.org>
parents:
23466
diff
changeset
|
116 std::replace (retval.begin (), retval.end (), '/', dir_sep_char); |
6114 | 117 |
2203 | 118 return retval; |
119 } | |
120 | |
121 static void | |
122 set_octave_home (void) | |
123 { | |
23713
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
124 std::string op = OCTAVE_PREFIX; |
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
125 std::string oep = OCTAVE_EXEC_PREFIX; |
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
126 |
21732
6a1eded90355
use namespace for system env class
John W. Eaton <jwe@octave.org>
parents:
21724
diff
changeset
|
127 std::string oh = octave::sys::env::getenv ("OCTAVE_HOME"); |
23713
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
128 std::string oeh = octave::sys::env::getenv ("OCTAVE_EXEC_HOME"); |
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
129 |
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
130 // If OCTAVE_HOME is set in the enviornment, use that. Otherwise, |
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
131 // default to ${prefix} from configure. |
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
132 |
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
133 Voctave_home = (oh.empty () ? op : oh); |
2203 | 134 |
23713
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
135 // If OCTAVE_EXEC_HOME is set in the environment, use that. |
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
136 // Otherwise, if ${prefix} and ${exec_prefix} from configure are set |
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
137 // to the same value, use OCTAVE_HOME from the environment if it is set. |
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
138 // Othewise, default to ${exec_prefix} from configure. |
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
139 |
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
140 if (! oeh.empty ()) |
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
141 Voctave_exec_home = oeh; |
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
142 else |
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
143 { |
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
144 if (op == oep && ! oh.empty ()) |
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
145 Voctave_exec_home = oh; |
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
146 else |
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
147 Voctave_exec_home = oep; |
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
148 } |
2203 | 149 } |
150 | |
151 static void | |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
152 set_local_site_defaults_file (void) |
2203 | 153 { |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
154 std::string lsf = octave::sys::env::getenv ("OCTAVE_SITE_INITFILE"); |
5909 | 155 |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
156 if (lsf.empty ()) |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
157 Vlocal_site_defaults_file = Vlocal_startupfile_dir + "/octaverc"; |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
158 else |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
159 Vlocal_site_defaults_file = lsf; |
5814 | 160 } |
161 | |
162 static void | |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
163 set_site_defaults_file (void) |
5814 | 164 { |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
165 std::string sf = octave::sys::env::getenv ("OCTAVE_VERSION_INITFILE"); |
5814 | 166 |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
167 if (sf.empty ()) |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
168 Vsite_defaults_file = Vstartupfile_dir + "/octaverc"; |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
169 else |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
170 Vsite_defaults_file = sf; |
5814 | 171 } |
172 | |
23721
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
173 static void |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
174 init_defaults (void) |
2203 | 175 { |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
176 if (initialized) |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
177 return; |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
178 |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
179 // OCTAVE_HOME must be set first! |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
180 |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
181 set_octave_home (); |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
182 |
23721
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
183 Vbin_dir = octave::config::prepend_octave_exec_home (OCTAVE_BINDIR); |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
184 Vdata_dir = octave::config::prepend_octave_home (OCTAVE_DATADIR); |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
185 Vdataroot_dir = octave::config::prepend_octave_home (OCTAVE_DATAROOTDIR); |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
186 Vinclude_dir = octave::config::prepend_octave_home (OCTAVE_INCLUDEDIR); |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
187 Vlib_dir = octave::config::prepend_octave_exec_home (OCTAVE_LIBDIR); |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
188 Vlibexec_dir = octave::config::prepend_octave_exec_home (OCTAVE_LIBEXECDIR); |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
189 |
23721
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
190 Vlocal_ver_arch_lib_dir |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
191 = octave::config::prepend_octave_exec_home (OCTAVE_LOCALVERARCHLIBDIR); |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
192 Vlocal_api_arch_lib_dir |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
193 = octave::config::prepend_octave_exec_home (OCTAVE_LOCALAPIARCHLIBDIR); |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
194 Vlocal_arch_lib_dir |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
195 = octave::config::prepend_octave_exec_home (OCTAVE_LOCALARCHLIBDIR); |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
196 Varch_lib_dir = octave::config::prepend_octave_exec_home (OCTAVE_ARCHLIBDIR); |
2203 | 197 |
23721
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
198 Vlocal_ver_oct_file_dir |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
199 = octave::config::prepend_octave_exec_home (OCTAVE_LOCALVEROCTFILEDIR); |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
200 Vlocal_api_oct_file_dir |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
201 = octave::config::prepend_octave_exec_home (OCTAVE_LOCALAPIOCTFILEDIR); |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
202 Vlocal_oct_file_dir |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
203 = octave::config::prepend_octave_exec_home (OCTAVE_LOCALOCTFILEDIR); |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
204 Voct_file_dir = octave::config::prepend_octave_exec_home (OCTAVE_OCTFILEDIR); |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
205 |
23721
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
206 Vlocal_ver_fcn_file_dir |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
207 = octave::config::prepend_octave_home (OCTAVE_LOCALVERFCNFILEDIR); |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
208 Vlocal_api_fcn_file_dir |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
209 = octave::config::prepend_octave_home (OCTAVE_LOCALAPIFCNFILEDIR); |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
210 Vlocal_fcn_file_dir |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
211 = octave::config::prepend_octave_home (OCTAVE_LOCALFCNFILEDIR); |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
212 Vfcn_file_dir = octave::config::prepend_octave_home (OCTAVE_FCNFILEDIR); |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
213 |
23721
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
214 Voct_data_dir = octave::config::prepend_octave_home (OCTAVE_OCTDATADIR); |
24875
7c7b60dd4d4c
Generate Qt compressed help and collection files for the manual (bug #53006)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24534
diff
changeset
|
215 Voct_doc_dir = octave::config::prepend_octave_home (OCTAVE_OCTDOCDIR); |
23721
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
216 Voct_etc_dir = octave::config::prepend_octave_home (OCTAVE_OCTETCDIR); |
24899
1a46d174a483
include a proper definition of Octave's private font fallback directory
Mike Miller <mtmiller@octave.org>
parents:
24882
diff
changeset
|
217 Voct_fonts_dir = octave::config::prepend_octave_home (OCTAVE_OCTFONTSDIR); |
23721
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
218 Voct_include_dir = octave::config::prepend_octave_home (OCTAVE_OCTINCLUDEDIR); |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
219 Voct_lib_dir = octave::config::prepend_octave_exec_home (OCTAVE_OCTLIBDIR); |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
220 Voct_locale_dir = octave::config::prepend_octave_home (OCTAVE_OCTLOCALEDIR); |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
221 Voct_tests_dir = octave::config::prepend_octave_home (OCTAVE_OCTTESTSDIR); |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
222 |
23721
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
223 Vinfo_dir = octave::config::prepend_octave_home (OCTAVE_INFODIR); |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
224 |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
225 Vman_dir = octave::config::prepend_octave_home (OCTAVE_MANDIR); |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
226 Vman1_dir = octave::config::prepend_octave_home (OCTAVE_MAN1DIR); |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
227 Vman1_ext = OCTAVE_MAN1EXT; |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
228 |
23721
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
229 Vimage_dir = octave::config::prepend_octave_home (OCTAVE_IMAGEDIR); |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
230 |
23721
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
231 Vlocal_startupfile_dir |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
232 = octave::config::prepend_octave_home (OCTAVE_LOCALSTARTUPFILEDIR); |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
233 Vstartupfile_dir |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
234 = octave::config::prepend_octave_home (OCTAVE_STARTUPFILEDIR); |
5814 | 235 |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
236 set_local_site_defaults_file (); |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
237 |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
238 set_site_defaults_file (); |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
239 |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
240 initialized = true; |
19032
d902542221c8
new data directory for storing data files we distribute
John W. Eaton <jwe@octave.org>
parents:
17991
diff
changeset
|
241 } |
d902542221c8
new data directory for storing data files we distribute
John W. Eaton <jwe@octave.org>
parents:
17991
diff
changeset
|
242 |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
243 #define RETURN(VAR) \ |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
244 if (! initialized) \ |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
245 init_defaults (); \ |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
246 return VAR; |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
247 |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
248 namespace octave |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
249 { |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
250 namespace config |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
251 { |
23721
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
252 std::string |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
253 prepend_octave_home (const std::string& s) |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
254 { |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
255 return prepend_home_dir (Voctave_home, s); |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
256 } |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
257 |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
258 std::string |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
259 prepend_octave_exec_home (const std::string& s) |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
260 { |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
261 return prepend_home_dir (Voctave_exec_home, s); |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
262 } |
b2d55b52ee51
new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents:
23720
diff
changeset
|
263 |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
264 std::string canonical_host_type (void) { return OCTAVE_CANONICAL_HOST_TYPE; } |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
265 |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
266 std::string release (void) { return OCTAVE_RELEASE; } |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
267 |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
268 std::string default_pager (void) { return OCTAVE_DEFAULT_PAGER; } |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
269 |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
270 std::string octave_home (void) { RETURN (Voctave_home); } |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
271 std::string octave_exec_home (void) { RETURN (Voctave_exec_home); } |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
272 |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
273 std::string bin_dir (void) { RETURN (Vbin_dir); } |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
274 std::string data_dir (void) { RETURN (Vdata_dir); } |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
275 std::string dataroot_dir (void) { RETURN (Vdataroot_dir); } |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
276 std::string include_dir (void) { RETURN (Vinclude_dir); } |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
277 std::string lib_dir (void) { RETURN (Vlib_dir); } |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
278 std::string libexec_dir (void) { RETURN (Vlibexec_dir); } |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
279 std::string arch_lib_dir (void) { RETURN (Varch_lib_dir); } |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
280 std::string info_dir (void) { RETURN (Vinfo_dir); } |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
281 |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
282 std::string local_ver_arch_lib_dir (void) { RETURN (Vlocal_ver_arch_lib_dir); } |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
283 std::string local_api_arch_lib_dir (void) { RETURN (Vlocal_api_arch_lib_dir); } |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
284 std::string local_arch_lib_dir (void) { RETURN (Vlocal_arch_lib_dir); } |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
285 |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
286 std::string local_ver_oct_file_dir (void) { RETURN (Vlocal_ver_oct_file_dir); } |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
287 std::string local_api_oct_file_dir (void) { RETURN (Vlocal_api_oct_file_dir); } |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
288 std::string local_oct_file_dir (void) { RETURN (Vlocal_oct_file_dir); } |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
289 std::string oct_file_dir (void) { RETURN (Voct_file_dir); } |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
290 |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
291 std::string local_ver_fcn_file_dir (void) { RETURN (Vlocal_ver_fcn_file_dir); } |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
292 std::string local_api_fcn_file_dir (void) { RETURN (Vlocal_api_fcn_file_dir); } |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
293 std::string local_fcn_file_dir (void) { RETURN (Vlocal_fcn_file_dir); } |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
294 std::string fcn_file_dir (void) { RETURN (Vfcn_file_dir); } |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
295 |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
296 std::string oct_data_dir (void) { RETURN (Voct_data_dir); } |
24875
7c7b60dd4d4c
Generate Qt compressed help and collection files for the manual (bug #53006)
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents:
24534
diff
changeset
|
297 std::string oct_doc_dir (void) { RETURN (Voct_doc_dir); } |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
298 std::string oct_etc_dir (void) { RETURN (Voct_etc_dir); } |
24899
1a46d174a483
include a proper definition of Octave's private font fallback directory
Mike Miller <mtmiller@octave.org>
parents:
24882
diff
changeset
|
299 std::string oct_fonts_dir (void) { RETURN (Voct_fonts_dir); } |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
300 std::string oct_include_dir (void) { RETURN (Voct_include_dir); } |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
301 std::string oct_lib_dir (void) { RETURN (Voct_lib_dir); } |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
302 std::string oct_locale_dir (void) { RETURN (Voct_locale_dir); } |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
303 std::string oct_tests_dir (void) { RETURN (Voct_tests_dir); } |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
304 |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
305 std::string man_dir (void) { RETURN (Vman_dir); } |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
306 std::string man1_dir (void) { RETURN (Vman1_dir); } |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
307 std::string man1_ext (void) { RETURN (Vman1_ext); } |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
308 |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
309 std::string image_dir (void) { RETURN (Vimage_dir); } |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
310 |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
311 std::string local_startupfile_dir (void) { RETURN (Vlocal_startupfile_dir); } |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
312 std::string startupfile_dir (void) { RETURN (Vstartupfile_dir); } |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
313 |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
314 std::string local_site_defaults_file (void) { RETURN (Vlocal_site_defaults_file); } |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
315 std::string site_defaults_file (void) { RETURN (Vsite_defaults_file); } |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
316 } |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
317 } |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
318 |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
319 #undef RETURN |
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
320 |
5780 | 321 DEFUN (OCTAVE_HOME, args, , |
21966
112b20240c87
move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents:
21962
diff
changeset
|
322 doc: /* -*- texinfo -*- |
112b20240c87
move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents:
21962
diff
changeset
|
323 @deftypefn {} {} OCTAVE_HOME () |
112b20240c87
move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents:
21962
diff
changeset
|
324 Return the name of the top-level Octave installation directory. |
23713
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
325 OCTAVE_HOME corresponds to the configuration variable @var{prefix}. |
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
326 @seealso{EXEC_PATH, IMAGE_PATH, OCTAVE_EXEC_HOME} |
21966
112b20240c87
move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents:
21962
diff
changeset
|
327 @end deftypefn */) |
5780 | 328 { |
20802
8bb38ba1bad6
eliminate return statements after calls to print_usage
John W. Eaton <jwe@octave.org>
parents:
20172
diff
changeset
|
329 if (args.length () != 0) |
5823 | 330 print_usage (); |
5780 | 331 |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
332 return ovl (octave::config::octave_home ()); |
5749 | 333 } |
3446 | 334 |
12851
7fce673b934a
codesprint: new tests for defaults.cc
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
335 /* |
14429
eff4a5933e28
Update %!tests in src/ directory with Octave coding conventions.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
336 %!assert (ischar (OCTAVE_HOME ())) |
eff4a5933e28
Update %!tests in src/ directory with Octave coding conventions.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
337 %!error OCTAVE_HOME (1) |
12851
7fce673b934a
codesprint: new tests for defaults.cc
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
338 */ |
7fce673b934a
codesprint: new tests for defaults.cc
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
339 |
23713
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
340 DEFUN (OCTAVE_EXEC_HOME, args, , |
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
341 doc: /* -*- texinfo -*- |
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
342 @deftypefn {} {} OCTAVE_HOME () |
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
343 Return the name of the top-level Octave installation directory for |
25003
2365c2661b3c
doc: Spellcheck documentation ahead of 4.4 release.
Rik <rik@octave.org>
parents:
24986
diff
changeset
|
344 architecture-dependent files. If not specified separately, the value |
24986
0b9e7fcaab91
doc: grammarcheck docstrings in C++ files ahead of 4.4 release.
Rik <rik@octave.org>
parents:
24899
diff
changeset
|
345 is the same as OCTAVE_HOME@. OCTAVE_EXEC_HOME corresponds to the |
23713
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
346 configuration variable @var{exec_prefix}. |
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
347 @seealso{EXEC_PATH, IMAGE_PATH, OCTAVE_HOME} |
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
348 @end deftypefn */) |
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
349 { |
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
350 if (args.length () != 0) |
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
351 print_usage (); |
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
352 |
23717
06579337237b
move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents:
23713
diff
changeset
|
353 return ovl (octave::config::octave_exec_home ()); |
23713
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
354 } |
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
355 |
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
356 /* |
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
357 %!assert (ischar (OCTAVE_EXEC_HOME ())) |
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
358 %!error OCTAVE_EXEC_HOME (1) |
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
359 */ |
4feef926733a
rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents:
23712
diff
changeset
|
360 |
5749 | 361 DEFUNX ("OCTAVE_VERSION", FOCTAVE_VERSION, args, , |
21966
112b20240c87
move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents:
21962
diff
changeset
|
362 doc: /* -*- texinfo -*- |
112b20240c87
move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents:
21962
diff
changeset
|
363 @deftypefn {} {} OCTAVE_VERSION () |
112b20240c87
move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents:
21962
diff
changeset
|
364 Return the version number of Octave as a string. |
112b20240c87
move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents:
21962
diff
changeset
|
365 @seealso{ver, version} |
112b20240c87
move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents:
21962
diff
changeset
|
366 @end deftypefn */) |
5749 | 367 { |
20802
8bb38ba1bad6
eliminate return statements after calls to print_usage
John W. Eaton <jwe@octave.org>
parents:
20172
diff
changeset
|
368 if (args.length () != 0) |
5823 | 369 print_usage (); |
5749 | 370 |
21127
df7891224709
maint: Use "return ovl (...)" in DEFUN macros.
Rik <rik@octave.org>
parents:
21100
diff
changeset
|
371 return ovl (OCTAVE_VERSION); |
2203 | 372 } |
12851
7fce673b934a
codesprint: new tests for defaults.cc
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
373 |
7fce673b934a
codesprint: new tests for defaults.cc
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
374 /* |
14429
eff4a5933e28
Update %!tests in src/ directory with Octave coding conventions.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
375 %!assert (ischar (OCTAVE_VERSION ())) |
eff4a5933e28
Update %!tests in src/ directory with Octave coding conventions.
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
376 %!error OCTAVE_VERSION (1) |
12851
7fce673b934a
codesprint: new tests for defaults.cc
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
377 */ |