annotate libinterp/corefcn/defaults.cc @ 19075:14bb81940528 stable

doc: Update docstring for datenum to describe format argument (bug #43181) * datenum.m: Update docstring to describe the format argument exactly like the docstring for datevec. Add test using format argument.
author Mike Miller <mtmiller@ieee.org>
date Wed, 10 Sep 2014 08:19:43 -0400
parents 22187db555cf
children d902542221c8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
1 /*
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
2
17744
d63878346099 maint: Update copyright notices for release.
John W. Eaton <jwe@octave.org>
parents: 17281
diff changeset
3 Copyright (C) 1996-2013 John W. Eaton
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
4
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
5 This file is part of Octave.
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
6
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
7 Octave is free software; you can redistribute it and/or modify it
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
8 under the terms of the GNU General Public License as published by the
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6276
diff changeset
9 Free Software Foundation; either version 3 of the License, or (at your
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6276
diff changeset
10 option) any later version.
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
11
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
12 Octave is distributed in the hope that it will be useful, but WITHOUT
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
15 for more details.
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
16
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6276
diff changeset
18 along with Octave; see the file COPYING. If not, see
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6276
diff changeset
19 <http://www.gnu.org/licenses/>.
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
20
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
21 */
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
22
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
23 #ifdef HAVE_CONFIG_H
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
24 #include <config.h>
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
25 #endif
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
26
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
27 #include <cstdlib>
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
28
6114
a0dafb51dd06 [project @ 2006-10-27 14:02:16 by jwe]
jwe
parents: 5909
diff changeset
29 #include <algorithm>
3503
d14c483b3c12 [project @ 2000-02-01 04:06:07 by jwe]
jwe
parents: 3446
diff changeset
30 #include <iostream>
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
31 #include <string>
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
32
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
33 #include <sys/types.h>
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
34 #include <unistd.h>
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
35
5814
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
36 #include "dir-ops.h"
2926
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
37 #include "oct-env.h"
4217
301cc4cf87e9 [project @ 2002-12-05 03:33:01 by jwe]
jwe
parents: 3971
diff changeset
38 #include "file-stat.h"
3174
390d5e396682 [project @ 1998-05-04 16:36:17 by jwe]
jwe
parents: 3141
diff changeset
39 #include "pathsearch.h"
4217
301cc4cf87e9 [project @ 2002-12-05 03:33:01 by jwe]
jwe
parents: 3971
diff changeset
40 #include "str-vec.h"
2926
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
41
2492
06595bc7f2d0 [project @ 1996-11-09 00:13:50 by jwe]
jwe
parents: 2466
diff changeset
42 #include <defaults.h>
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
43 #include "defun.h"
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
44 #include "error.h"
3040
443851377f3f [project @ 1997-06-06 09:29:28 by jwe]
jwe
parents: 2993
diff changeset
45 #include "file-ops.h"
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
46 #include "gripes.h"
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
47 #include "help.h"
5395
8db4eb48f546 [project @ 2005-06-16 20:19:18 by jwe]
jwe
parents: 5333
diff changeset
48 #include "input.h"
5832
5e41e06f6a78 [project @ 2006-05-26 21:41:32 by jwe]
jwe
parents: 5823
diff changeset
49 #include "load-path.h"
3185
9580887dd160 [project @ 1998-09-26 02:45:55 by jwe]
jwe
parents: 3174
diff changeset
50 #include "oct-obj.h"
2390
c2c1482c34c8 [project @ 1996-10-12 19:13:23 by jwe]
jwe
parents: 2203
diff changeset
51 #include "ov.h"
4217
301cc4cf87e9 [project @ 2002-12-05 03:33:01 by jwe]
jwe
parents: 3971
diff changeset
52 #include "parse.h"
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
53 #include "toplev.h"
4217
301cc4cf87e9 [project @ 2002-12-05 03:33:01 by jwe]
jwe
parents: 3971
diff changeset
54 #include "unwind-prot.h"
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
55 #include "variables.h"
2492
06595bc7f2d0 [project @ 1996-11-09 00:13:50 by jwe]
jwe
parents: 2466
diff changeset
56 #include <version.h>
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
57
3523
b80bbb43a1a9 [project @ 2000-02-02 10:25:52 by jwe]
jwe
parents: 3503
diff changeset
58 std::string Voctave_home;
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
59
3523
b80bbb43a1a9 [project @ 2000-02-02 10:25:52 by jwe]
jwe
parents: 3503
diff changeset
60 std::string Vbin_dir;
b80bbb43a1a9 [project @ 2000-02-02 10:25:52 by jwe]
jwe
parents: 3503
diff changeset
61 std::string Vinfo_dir;
b80bbb43a1a9 [project @ 2000-02-02 10:25:52 by jwe]
jwe
parents: 3503
diff changeset
62 std::string Vdata_dir;
b80bbb43a1a9 [project @ 2000-02-02 10:25:52 by jwe]
jwe
parents: 3503
diff changeset
63 std::string Vlibexec_dir;
b80bbb43a1a9 [project @ 2000-02-02 10:25:52 by jwe]
jwe
parents: 3503
diff changeset
64 std::string Varch_lib_dir;
b80bbb43a1a9 [project @ 2000-02-02 10:25:52 by jwe]
jwe
parents: 3503
diff changeset
65 std::string Vlocal_arch_lib_dir;
5909
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 5832
diff changeset
66 std::string Vlocal_api_arch_lib_dir;
3597
26662775f4e9 [project @ 2000-02-12 02:24:41 by jwe]
jwe
parents: 3535
diff changeset
67 std::string Vlocal_ver_arch_lib_dir;
5814
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
68
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
69 std::string Vlocal_ver_oct_file_dir;
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
70 std::string Vlocal_api_oct_file_dir;
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
71 std::string Vlocal_oct_file_dir;
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
72
5814
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
73 std::string Vlocal_ver_fcn_file_dir;
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
74 std::string Vlocal_api_fcn_file_dir;
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
75 std::string Vlocal_fcn_file_dir;
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
76
15157
a87fa9132b72 provide Voct_etc_dir variable
John W. Eaton <jwe@octave.org>
parents: 15088
diff changeset
77 std::string Voct_etc_dir;
15971
e27d9b9b71f4 gui: install translation files into $(datadir)/octave/$(version)/locale
Torsten <ttl@justmail.de>
parents: 15478
diff changeset
78 std::string Voct_locale_dir;
15157
a87fa9132b72 provide Voct_etc_dir variable
John W. Eaton <jwe@octave.org>
parents: 15088
diff changeset
79
5814
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
80 std::string Voct_file_dir;
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
81 std::string Vfcn_file_dir;
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
82
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
83 std::string Vimage_dir;
4447
252b9162c084 [project @ 2003-07-08 18:37:53 by jwe]
jwe
parents: 4264
diff changeset
84
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
85 // The path that will be searched for programs that we execute.
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
86 // (--exec-path path)
5794
1138ced03f14 [project @ 2006-05-08 20:23:04 by jwe]
jwe
parents: 5781
diff changeset
87 static std::string VEXEC_PATH;
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
88
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
89 // Name of the editor to be invoked by the edit_history command.
5794
1138ced03f14 [project @ 2006-05-08 20:23:04 by jwe]
jwe
parents: 5781
diff changeset
90 std::string VEDITOR;
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
91
5814
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
92 static std::string VIMAGE_PATH;
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
93
3523
b80bbb43a1a9 [project @ 2000-02-02 10:25:52 by jwe]
jwe
parents: 3503
diff changeset
94 std::string Vlocal_site_defaults_file;
b80bbb43a1a9 [project @ 2000-02-02 10:25:52 by jwe]
jwe
parents: 3503
diff changeset
95 std::string Vsite_defaults_file;
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
96
15470
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
97 std::string Vbuilt_in_docstrings_file;
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
98
6274
d42abdfcb8e9 [project @ 2007-02-07 07:22:02 by jwe]
jwe
parents: 6228
diff changeset
99 std::string
3523
b80bbb43a1a9 [project @ 2000-02-02 10:25:52 by jwe]
jwe
parents: 3503
diff changeset
100 subst_octave_home (const std::string& s)
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
101 {
3523
b80bbb43a1a9 [project @ 2000-02-02 10:25:52 by jwe]
jwe
parents: 3503
diff changeset
102 std::string retval;
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
103
3523
b80bbb43a1a9 [project @ 2000-02-02 10:25:52 by jwe]
jwe
parents: 3503
diff changeset
104 std::string prefix = OCTAVE_PREFIX;
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
105
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
106 retval = s;
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
107
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
108 if (Voctave_home != prefix)
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
109 {
5275
23b37da9fd5b [project @ 2005-04-08 16:07:35 by jwe]
jwe
parents: 4776
diff changeset
110 octave_idx_type len = prefix.length ();
6276
d26c558691cd [project @ 2007-02-07 09:01:24 by jwe]
jwe
parents: 6274
diff changeset
111
d26c558691cd [project @ 2007-02-07 09:01:24 by jwe]
jwe
parents: 6274
diff changeset
112 if (s.substr (0, len) == prefix)
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
113 retval.replace (0, len, Voctave_home);
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
114 }
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
115
8007
a2ab20ba78f7 make file_ops a proper singleton class
John W. Eaton <jwe@octave.org>
parents: 7017
diff changeset
116 if (file_ops::dir_sep_char () != '/')
a2ab20ba78f7 make file_ops a proper singleton class
John W. Eaton <jwe@octave.org>
parents: 7017
diff changeset
117 std::replace (retval.begin (), retval.end (), '/',
10315
57a59eae83cc untabify src C++ source files
John W. Eaton <jwe@octave.org>
parents: 10182
diff changeset
118 file_ops::dir_sep_char ());
6114
a0dafb51dd06 [project @ 2006-10-27 14:02:16 by jwe]
jwe
parents: 5909
diff changeset
119
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
120 return retval;
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
121 }
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
122
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
123 static void
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
124 set_octave_home (void)
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
125 {
3523
b80bbb43a1a9 [project @ 2000-02-02 10:25:52 by jwe]
jwe
parents: 3503
diff changeset
126 std::string oh = octave_env::getenv ("OCTAVE_HOME");
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
127
3523
b80bbb43a1a9 [project @ 2000-02-02 10:25:52 by jwe]
jwe
parents: 3503
diff changeset
128 Voctave_home = oh.empty () ? std::string (OCTAVE_PREFIX) : oh;
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
129 }
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
130
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
131 static void
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
132 set_default_info_dir (void)
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
133 {
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
134 Vinfo_dir = subst_octave_home (OCTAVE_INFODIR);
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
135 }
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
136
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
137 static void
3141
292ff0bf484b [project @ 1998-02-03 08:11:07 by jwe]
jwe
parents: 3040
diff changeset
138 set_default_data_dir (void)
292ff0bf484b [project @ 1998-02-03 08:11:07 by jwe]
jwe
parents: 3040
diff changeset
139 {
292ff0bf484b [project @ 1998-02-03 08:11:07 by jwe]
jwe
parents: 3040
diff changeset
140 Vdata_dir = subst_octave_home (OCTAVE_DATADIR);
292ff0bf484b [project @ 1998-02-03 08:11:07 by jwe]
jwe
parents: 3040
diff changeset
141 }
292ff0bf484b [project @ 1998-02-03 08:11:07 by jwe]
jwe
parents: 3040
diff changeset
142
292ff0bf484b [project @ 1998-02-03 08:11:07 by jwe]
jwe
parents: 3040
diff changeset
143 static void
292ff0bf484b [project @ 1998-02-03 08:11:07 by jwe]
jwe
parents: 3040
diff changeset
144 set_default_libexec_dir (void)
292ff0bf484b [project @ 1998-02-03 08:11:07 by jwe]
jwe
parents: 3040
diff changeset
145 {
292ff0bf484b [project @ 1998-02-03 08:11:07 by jwe]
jwe
parents: 3040
diff changeset
146 Vlibexec_dir = subst_octave_home (OCTAVE_LIBEXECDIR);
292ff0bf484b [project @ 1998-02-03 08:11:07 by jwe]
jwe
parents: 3040
diff changeset
147 }
292ff0bf484b [project @ 1998-02-03 08:11:07 by jwe]
jwe
parents: 3040
diff changeset
148
292ff0bf484b [project @ 1998-02-03 08:11:07 by jwe]
jwe
parents: 3040
diff changeset
149 static void
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
150 set_default_arch_lib_dir (void)
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
151 {
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
152 Varch_lib_dir = subst_octave_home (OCTAVE_ARCHLIBDIR);
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
153 }
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
154
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
155 static void
2439
dc870b8b229f [project @ 1996-10-30 07:57:31 by jwe]
jwe
parents: 2390
diff changeset
156 set_default_local_arch_lib_dir (void)
dc870b8b229f [project @ 1996-10-30 07:57:31 by jwe]
jwe
parents: 2390
diff changeset
157 {
dc870b8b229f [project @ 1996-10-30 07:57:31 by jwe]
jwe
parents: 2390
diff changeset
158 Vlocal_arch_lib_dir = subst_octave_home (OCTAVE_LOCALARCHLIBDIR);
dc870b8b229f [project @ 1996-10-30 07:57:31 by jwe]
jwe
parents: 2390
diff changeset
159 }
dc870b8b229f [project @ 1996-10-30 07:57:31 by jwe]
jwe
parents: 2390
diff changeset
160
dc870b8b229f [project @ 1996-10-30 07:57:31 by jwe]
jwe
parents: 2390
diff changeset
161 static void
5909
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 5832
diff changeset
162 set_default_local_api_arch_lib_dir (void)
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 5832
diff changeset
163 {
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 5832
diff changeset
164 Vlocal_api_arch_lib_dir = subst_octave_home (OCTAVE_LOCALAPIARCHLIBDIR);
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 5832
diff changeset
165 }
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 5832
diff changeset
166
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 5832
diff changeset
167 static void
3597
26662775f4e9 [project @ 2000-02-12 02:24:41 by jwe]
jwe
parents: 3535
diff changeset
168 set_default_local_ver_arch_lib_dir (void)
26662775f4e9 [project @ 2000-02-12 02:24:41 by jwe]
jwe
parents: 3535
diff changeset
169 {
26662775f4e9 [project @ 2000-02-12 02:24:41 by jwe]
jwe
parents: 3535
diff changeset
170 Vlocal_ver_arch_lib_dir = subst_octave_home (OCTAVE_LOCALVERARCHLIBDIR);
26662775f4e9 [project @ 2000-02-12 02:24:41 by jwe]
jwe
parents: 3535
diff changeset
171 }
26662775f4e9 [project @ 2000-02-12 02:24:41 by jwe]
jwe
parents: 3535
diff changeset
172
26662775f4e9 [project @ 2000-02-12 02:24:41 by jwe]
jwe
parents: 3535
diff changeset
173 static void
5814
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
174 set_default_local_ver_oct_file_dir (void)
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
175 {
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
176 Vlocal_ver_oct_file_dir = subst_octave_home (OCTAVE_LOCALVEROCTFILEDIR);
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
177 }
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
178
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
179 static void
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
180 set_default_local_api_oct_file_dir (void)
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
181 {
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
182 Vlocal_api_oct_file_dir = subst_octave_home (OCTAVE_LOCALAPIOCTFILEDIR);
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
183 }
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
184
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
185 static void
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
186 set_default_local_oct_file_dir (void)
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
187 {
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
188 Vlocal_oct_file_dir = subst_octave_home (OCTAVE_LOCALOCTFILEDIR);
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
189 }
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
190
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
191 static void
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
192 set_default_local_ver_fcn_file_dir (void)
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
193 {
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
194 Vlocal_ver_fcn_file_dir = subst_octave_home (OCTAVE_LOCALVERFCNFILEDIR);
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
195 }
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
196
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
197 static void
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
198 set_default_local_api_fcn_file_dir (void)
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
199 {
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
200 Vlocal_api_fcn_file_dir = subst_octave_home (OCTAVE_LOCALAPIFCNFILEDIR);
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
201 }
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
202
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
203 static void
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
204 set_default_local_fcn_file_dir (void)
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
205 {
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
206 Vlocal_fcn_file_dir = subst_octave_home (OCTAVE_LOCALFCNFILEDIR);
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
207 }
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
208
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
209 static void
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
210 set_default_fcn_file_dir (void)
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
211 {
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
212 Vfcn_file_dir = subst_octave_home (OCTAVE_FCNFILEDIR);
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
213 }
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
214
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
215 static void
5814
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
216 set_default_image_dir (void)
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
217 {
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
218 Vimage_dir = subst_octave_home (OCTAVE_IMAGEDIR);
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
219 }
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
220
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
221 static void
15157
a87fa9132b72 provide Voct_etc_dir variable
John W. Eaton <jwe@octave.org>
parents: 15088
diff changeset
222 set_default_oct_etc_dir (void)
a87fa9132b72 provide Voct_etc_dir variable
John W. Eaton <jwe@octave.org>
parents: 15088
diff changeset
223 {
a87fa9132b72 provide Voct_etc_dir variable
John W. Eaton <jwe@octave.org>
parents: 15088
diff changeset
224 Voct_etc_dir = subst_octave_home (OCTAVE_OCTETCDIR);
a87fa9132b72 provide Voct_etc_dir variable
John W. Eaton <jwe@octave.org>
parents: 15088
diff changeset
225 }
a87fa9132b72 provide Voct_etc_dir variable
John W. Eaton <jwe@octave.org>
parents: 15088
diff changeset
226
a87fa9132b72 provide Voct_etc_dir variable
John W. Eaton <jwe@octave.org>
parents: 15088
diff changeset
227 static void
15971
e27d9b9b71f4 gui: install translation files into $(datadir)/octave/$(version)/locale
Torsten <ttl@justmail.de>
parents: 15478
diff changeset
228 set_default_oct_locale_dir (void)
e27d9b9b71f4 gui: install translation files into $(datadir)/octave/$(version)/locale
Torsten <ttl@justmail.de>
parents: 15478
diff changeset
229 {
e27d9b9b71f4 gui: install translation files into $(datadir)/octave/$(version)/locale
Torsten <ttl@justmail.de>
parents: 15478
diff changeset
230 Voct_locale_dir = subst_octave_home (OCTAVE_OCTLOCALEDIR);
e27d9b9b71f4 gui: install translation files into $(datadir)/octave/$(version)/locale
Torsten <ttl@justmail.de>
parents: 15478
diff changeset
231 }
e27d9b9b71f4 gui: install translation files into $(datadir)/octave/$(version)/locale
Torsten <ttl@justmail.de>
parents: 15478
diff changeset
232
e27d9b9b71f4 gui: install translation files into $(datadir)/octave/$(version)/locale
Torsten <ttl@justmail.de>
parents: 15478
diff changeset
233 static void
5397
b12c0f920da0 [project @ 2005-06-17 07:52:28 by jwe]
jwe
parents: 5395
diff changeset
234 set_default_oct_file_dir (void)
b12c0f920da0 [project @ 2005-06-17 07:52:28 by jwe]
jwe
parents: 5395
diff changeset
235 {
b12c0f920da0 [project @ 2005-06-17 07:52:28 by jwe]
jwe
parents: 5395
diff changeset
236 Voct_file_dir = subst_octave_home (OCTAVE_OCTFILEDIR);
b12c0f920da0 [project @ 2005-06-17 07:52:28 by jwe]
jwe
parents: 5395
diff changeset
237 }
b12c0f920da0 [project @ 2005-06-17 07:52:28 by jwe]
jwe
parents: 5395
diff changeset
238
b12c0f920da0 [project @ 2005-06-17 07:52:28 by jwe]
jwe
parents: 5395
diff changeset
239 static void
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
240 set_default_bin_dir (void)
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
241 {
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
242 Vbin_dir = subst_octave_home (OCTAVE_BINDIR);
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
243 }
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
244
5814
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
245 void
11294
e2a4f3478b7c datetick.m: add missing semicolon
John W. Eaton <jwe@octave.org>
parents: 10840
diff changeset
246 set_exec_path (const std::string& path_arg)
4447
252b9162c084 [project @ 2003-07-08 18:37:53 by jwe]
jwe
parents: 4264
diff changeset
247 {
11294
e2a4f3478b7c datetick.m: add missing semicolon
John W. Eaton <jwe@octave.org>
parents: 10840
diff changeset
248 std::string tpath = path_arg;
e2a4f3478b7c datetick.m: add missing semicolon
John W. Eaton <jwe@octave.org>
parents: 10840
diff changeset
249
e2a4f3478b7c datetick.m: add missing semicolon
John W. Eaton <jwe@octave.org>
parents: 10840
diff changeset
250 if (tpath.empty ())
e2a4f3478b7c datetick.m: add missing semicolon
John W. Eaton <jwe@octave.org>
parents: 10840
diff changeset
251 tpath = octave_env::getenv ("OCTAVE_EXEC_PATH");
e2a4f3478b7c datetick.m: add missing semicolon
John W. Eaton <jwe@octave.org>
parents: 10840
diff changeset
252
e2a4f3478b7c datetick.m: add missing semicolon
John W. Eaton <jwe@octave.org>
parents: 10840
diff changeset
253 if (tpath.empty ())
e2a4f3478b7c datetick.m: add missing semicolon
John W. Eaton <jwe@octave.org>
parents: 10840
diff changeset
254 tpath = Vlocal_ver_arch_lib_dir + dir_path::path_sep_str ()
17787
175b392e91fe Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents: 17744
diff changeset
255 + Vlocal_api_arch_lib_dir + dir_path::path_sep_str ()
175b392e91fe Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents: 17744
diff changeset
256 + Vlocal_arch_lib_dir + dir_path::path_sep_str ()
175b392e91fe Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents: 17744
diff changeset
257 + Varch_lib_dir + dir_path::path_sep_str ()
175b392e91fe Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents: 17744
diff changeset
258 + Vbin_dir;
11294
e2a4f3478b7c datetick.m: add missing semicolon
John W. Eaton <jwe@octave.org>
parents: 10840
diff changeset
259
e2a4f3478b7c datetick.m: add missing semicolon
John W. Eaton <jwe@octave.org>
parents: 10840
diff changeset
260 VEXEC_PATH = tpath;
e2a4f3478b7c datetick.m: add missing semicolon
John W. Eaton <jwe@octave.org>
parents: 10840
diff changeset
261
17787
175b392e91fe Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents: 17744
diff changeset
262 // FIXME: should we really be modifying PATH in the environment?
11294
e2a4f3478b7c datetick.m: add missing semicolon
John W. Eaton <jwe@octave.org>
parents: 10840
diff changeset
263 // The way things are now, Octave will ignore directories set in the
e2a4f3478b7c datetick.m: add missing semicolon
John W. Eaton <jwe@octave.org>
parents: 10840
diff changeset
264 // PATH with calls like
e2a4f3478b7c datetick.m: add missing semicolon
John W. Eaton <jwe@octave.org>
parents: 10840
diff changeset
265 //
e2a4f3478b7c datetick.m: add missing semicolon
John W. Eaton <jwe@octave.org>
parents: 10840
diff changeset
266 // setenv ("PATH", "/my/path");
e2a4f3478b7c datetick.m: add missing semicolon
John W. Eaton <jwe@octave.org>
parents: 10840
diff changeset
267 //
e2a4f3478b7c datetick.m: add missing semicolon
John W. Eaton <jwe@octave.org>
parents: 10840
diff changeset
268 // To fix this, I think Octave should be searching the combination of
e2a4f3478b7c datetick.m: add missing semicolon
John W. Eaton <jwe@octave.org>
parents: 10840
diff changeset
269 // PATH and EXEC_PATH for programs that it executes instead of setting
e2a4f3478b7c datetick.m: add missing semicolon
John W. Eaton <jwe@octave.org>
parents: 10840
diff changeset
270 // the PATH in the environment and relying on the shell to do the
e2a4f3478b7c datetick.m: add missing semicolon
John W. Eaton <jwe@octave.org>
parents: 10840
diff changeset
271 // searching.
e2a4f3478b7c datetick.m: add missing semicolon
John W. Eaton <jwe@octave.org>
parents: 10840
diff changeset
272
5814
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
273 // This is static so that even if set_exec_path is called more than
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
274 // once, shell_path is the original PATH from the environment,
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
275 // before we start modifying it.
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
276 static std::string shell_path = octave_env::getenv ("PATH");
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
277
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
278 if (! shell_path.empty ())
11294
e2a4f3478b7c datetick.m: add missing semicolon
John W. Eaton <jwe@octave.org>
parents: 10840
diff changeset
279 tpath = shell_path + dir_path::path_sep_str () + tpath;
5814
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
280
11294
e2a4f3478b7c datetick.m: add missing semicolon
John W. Eaton <jwe@octave.org>
parents: 10840
diff changeset
281 octave_env::putenv ("PATH", tpath);
5814
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
282 }
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
283
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
284 void
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
285 set_image_path (const std::string& path)
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
286 {
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
287 VIMAGE_PATH = ".";
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
288
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
289 std::string tpath = path;
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
290
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
291 if (tpath.empty ())
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
292 tpath = octave_env::getenv ("OCTAVE_IMAGE_PATH");
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
293
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
294 if (! tpath.empty ())
8008
4d13a7a2f6ab dir_path: use singleton class for static data members
John W. Eaton <jwe@octave.org>
parents: 8007
diff changeset
295 VIMAGE_PATH += dir_path::path_sep_str () + tpath;
5814
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
296
5832
5e41e06f6a78 [project @ 2006-05-26 21:41:32 by jwe]
jwe
parents: 5823
diff changeset
297 tpath = genpath (Vimage_dir, "");
5e41e06f6a78 [project @ 2006-05-26 21:41:32 by jwe]
jwe
parents: 5823
diff changeset
298
5e41e06f6a78 [project @ 2006-05-26 21:41:32 by jwe]
jwe
parents: 5823
diff changeset
299 if (! tpath.empty ())
8008
4d13a7a2f6ab dir_path: use singleton class for static data members
John W. Eaton <jwe@octave.org>
parents: 8007
diff changeset
300 VIMAGE_PATH += dir_path::path_sep_str () + tpath;
5814
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
301 }
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
302
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
303 static void
8865
eace5649a8b5 set default value for doc_cache_file variable
John W. Eaton <jwe@octave.org>
parents: 8008
diff changeset
304 set_default_doc_cache_file (void)
eace5649a8b5 set default value for doc_cache_file variable
John W. Eaton <jwe@octave.org>
parents: 8008
diff changeset
305 {
15478
b1ff8c83e232 set Vdoc_cache_file and Vtexi_macros_file variables directly from command line options
John W. Eaton <jwe@octave.org>
parents: 15473
diff changeset
306 if (Vdoc_cache_file.empty ())
b1ff8c83e232 set Vdoc_cache_file and Vtexi_macros_file variables directly from command line options
John W. Eaton <jwe@octave.org>
parents: 15473
diff changeset
307 {
b1ff8c83e232 set Vdoc_cache_file and Vtexi_macros_file variables directly from command line options
John W. Eaton <jwe@octave.org>
parents: 15473
diff changeset
308 std::string def_file = subst_octave_home (OCTAVE_DOC_CACHE_FILE);
8865
eace5649a8b5 set default value for doc_cache_file variable
John W. Eaton <jwe@octave.org>
parents: 8008
diff changeset
309
15478
b1ff8c83e232 set Vdoc_cache_file and Vtexi_macros_file variables directly from command line options
John W. Eaton <jwe@octave.org>
parents: 15473
diff changeset
310 std::string env_file = octave_env::getenv ("OCTAVE_DOC_CACHE_FILE");
8865
eace5649a8b5 set default value for doc_cache_file variable
John W. Eaton <jwe@octave.org>
parents: 8008
diff changeset
311
15478
b1ff8c83e232 set Vdoc_cache_file and Vtexi_macros_file variables directly from command line options
John W. Eaton <jwe@octave.org>
parents: 15473
diff changeset
312 Vdoc_cache_file = env_file.empty () ? def_file : env_file;
b1ff8c83e232 set Vdoc_cache_file and Vtexi_macros_file variables directly from command line options
John W. Eaton <jwe@octave.org>
parents: 15473
diff changeset
313 }
8865
eace5649a8b5 set default value for doc_cache_file variable
John W. Eaton <jwe@octave.org>
parents: 8008
diff changeset
314 }
eace5649a8b5 set default value for doc_cache_file variable
John W. Eaton <jwe@octave.org>
parents: 8008
diff changeset
315
eace5649a8b5 set default value for doc_cache_file variable
John W. Eaton <jwe@octave.org>
parents: 8008
diff changeset
316 static void
14614
4e9dc46d4125 handle texinfo macros consistently in help system and manual
John W. Eaton <jwe@octave.org>
parents: 14429
diff changeset
317 set_default_texi_macros_file (void)
4e9dc46d4125 handle texinfo macros consistently in help system and manual
John W. Eaton <jwe@octave.org>
parents: 14429
diff changeset
318 {
15478
b1ff8c83e232 set Vdoc_cache_file and Vtexi_macros_file variables directly from command line options
John W. Eaton <jwe@octave.org>
parents: 15473
diff changeset
319 if (Vtexi_macros_file.empty ())
b1ff8c83e232 set Vdoc_cache_file and Vtexi_macros_file variables directly from command line options
John W. Eaton <jwe@octave.org>
parents: 15473
diff changeset
320 {
b1ff8c83e232 set Vdoc_cache_file and Vtexi_macros_file variables directly from command line options
John W. Eaton <jwe@octave.org>
parents: 15473
diff changeset
321 std::string def_file = subst_octave_home (OCTAVE_TEXI_MACROS_FILE);
14614
4e9dc46d4125 handle texinfo macros consistently in help system and manual
John W. Eaton <jwe@octave.org>
parents: 14429
diff changeset
322
15478
b1ff8c83e232 set Vdoc_cache_file and Vtexi_macros_file variables directly from command line options
John W. Eaton <jwe@octave.org>
parents: 15473
diff changeset
323 std::string env_file = octave_env::getenv ("OCTAVE_TEXI_MACROS_FILE");
14614
4e9dc46d4125 handle texinfo macros consistently in help system and manual
John W. Eaton <jwe@octave.org>
parents: 14429
diff changeset
324
15478
b1ff8c83e232 set Vdoc_cache_file and Vtexi_macros_file variables directly from command line options
John W. Eaton <jwe@octave.org>
parents: 15473
diff changeset
325 Vtexi_macros_file = env_file.empty () ? def_file : env_file;
b1ff8c83e232 set Vdoc_cache_file and Vtexi_macros_file variables directly from command line options
John W. Eaton <jwe@octave.org>
parents: 15473
diff changeset
326 }
14614
4e9dc46d4125 handle texinfo macros consistently in help system and manual
John W. Eaton <jwe@octave.org>
parents: 14429
diff changeset
327 }
4e9dc46d4125 handle texinfo macros consistently in help system and manual
John W. Eaton <jwe@octave.org>
parents: 14429
diff changeset
328
4e9dc46d4125 handle texinfo macros consistently in help system and manual
John W. Eaton <jwe@octave.org>
parents: 14429
diff changeset
329 static void
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
330 set_default_info_file (void)
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
331 {
15473
457a2ff2a71b set Vinfo_file and Vinfo_program variables directly from command line options
John W. Eaton <jwe@octave.org>
parents: 15470
diff changeset
332 if (Vinfo_file.empty ())
457a2ff2a71b set Vinfo_file and Vinfo_program variables directly from command line options
John W. Eaton <jwe@octave.org>
parents: 15470
diff changeset
333 {
457a2ff2a71b set Vinfo_file and Vinfo_program variables directly from command line options
John W. Eaton <jwe@octave.org>
parents: 15470
diff changeset
334 std::string std_info_file = subst_octave_home (OCTAVE_INFOFILE);
2512
fda09c1e787e [project @ 1996-11-14 08:39:41 by jwe]
jwe
parents: 2492
diff changeset
335
15473
457a2ff2a71b set Vinfo_file and Vinfo_program variables directly from command line options
John W. Eaton <jwe@octave.org>
parents: 15470
diff changeset
336 std::string oct_info_file = octave_env::getenv ("OCTAVE_INFO_FILE");
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
337
15473
457a2ff2a71b set Vinfo_file and Vinfo_program variables directly from command line options
John W. Eaton <jwe@octave.org>
parents: 15470
diff changeset
338 Vinfo_file = oct_info_file.empty () ? std_info_file : oct_info_file;
457a2ff2a71b set Vinfo_file and Vinfo_program variables directly from command line options
John W. Eaton <jwe@octave.org>
parents: 15470
diff changeset
339 }
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
340 }
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
341
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
342 static void
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
343 set_default_info_prog (void)
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
344 {
15473
457a2ff2a71b set Vinfo_file and Vinfo_program variables directly from command line options
John W. Eaton <jwe@octave.org>
parents: 15470
diff changeset
345 if (Vinfo_program.empty ())
457a2ff2a71b set Vinfo_file and Vinfo_program variables directly from command line options
John W. Eaton <jwe@octave.org>
parents: 15470
diff changeset
346 {
457a2ff2a71b set Vinfo_file and Vinfo_program variables directly from command line options
John W. Eaton <jwe@octave.org>
parents: 15470
diff changeset
347 std::string oct_info_prog = octave_env::getenv ("OCTAVE_INFO_PROGRAM");
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
348
15473
457a2ff2a71b set Vinfo_file and Vinfo_program variables directly from command line options
John W. Eaton <jwe@octave.org>
parents: 15470
diff changeset
349 if (oct_info_prog.empty ())
457a2ff2a71b set Vinfo_file and Vinfo_program variables directly from command line options
John W. Eaton <jwe@octave.org>
parents: 15470
diff changeset
350 Vinfo_program = "info";
457a2ff2a71b set Vinfo_file and Vinfo_program variables directly from command line options
John W. Eaton <jwe@octave.org>
parents: 15470
diff changeset
351 else
457a2ff2a71b set Vinfo_file and Vinfo_program variables directly from command line options
John W. Eaton <jwe@octave.org>
parents: 15470
diff changeset
352 Vinfo_program = std::string (oct_info_prog);
457a2ff2a71b set Vinfo_file and Vinfo_program variables directly from command line options
John W. Eaton <jwe@octave.org>
parents: 15470
diff changeset
353 }
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
354 }
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
355
4773
ccfbd6047a54 [project @ 2004-02-16 19:02:32 by jwe]
jwe
parents: 4486
diff changeset
356 static void
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
357 set_default_editor (void)
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
358 {
5794
1138ced03f14 [project @ 2006-05-08 20:23:04 by jwe]
jwe
parents: 5781
diff changeset
359 VEDITOR = "emacs";
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
360
3523
b80bbb43a1a9 [project @ 2000-02-02 10:25:52 by jwe]
jwe
parents: 3503
diff changeset
361 std::string env_editor = octave_env::getenv ("EDITOR");
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
362
2926
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
363 if (! env_editor.empty ())
5794
1138ced03f14 [project @ 2006-05-08 20:23:04 by jwe]
jwe
parents: 5781
diff changeset
364 VEDITOR = env_editor;
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
365 }
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
366
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
367 static void
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
368 set_local_site_defaults_file (void)
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
369 {
9132
eb1747dbd360 Update help strings for command line options
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
370 std::string lsf = octave_env::getenv ("OCTAVE_SITE_INITFILE");
5781
faafc2d98b8d [project @ 2006-05-02 19:40:19 by jwe]
jwe
parents: 5780
diff changeset
371
faafc2d98b8d [project @ 2006-05-02 19:40:19 by jwe]
jwe
parents: 5780
diff changeset
372 if (lsf.empty ())
faafc2d98b8d [project @ 2006-05-02 19:40:19 by jwe]
jwe
parents: 5780
diff changeset
373 {
17787
175b392e91fe Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents: 17744
diff changeset
374 Vlocal_site_defaults_file
175b392e91fe Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents: 17744
diff changeset
375 = subst_octave_home (OCTAVE_LOCALSTARTUPFILEDIR);
5781
faafc2d98b8d [project @ 2006-05-02 19:40:19 by jwe]
jwe
parents: 5780
diff changeset
376 Vlocal_site_defaults_file.append ("/octaverc");
faafc2d98b8d [project @ 2006-05-02 19:40:19 by jwe]
jwe
parents: 5780
diff changeset
377 }
faafc2d98b8d [project @ 2006-05-02 19:40:19 by jwe]
jwe
parents: 5780
diff changeset
378 else
faafc2d98b8d [project @ 2006-05-02 19:40:19 by jwe]
jwe
parents: 5780
diff changeset
379 Vlocal_site_defaults_file = lsf;
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
380 }
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
381
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
382 static void
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
383 set_site_defaults_file (void)
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
384 {
9132
eb1747dbd360 Update help strings for command line options
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
385 std::string sf = octave_env::getenv ("OCTAVE_VERSION_INITFILE");
5781
faafc2d98b8d [project @ 2006-05-02 19:40:19 by jwe]
jwe
parents: 5780
diff changeset
386
faafc2d98b8d [project @ 2006-05-02 19:40:19 by jwe]
jwe
parents: 5780
diff changeset
387 if (sf.empty ())
faafc2d98b8d [project @ 2006-05-02 19:40:19 by jwe]
jwe
parents: 5780
diff changeset
388 {
faafc2d98b8d [project @ 2006-05-02 19:40:19 by jwe]
jwe
parents: 5780
diff changeset
389 Vsite_defaults_file = subst_octave_home (OCTAVE_STARTUPFILEDIR);
faafc2d98b8d [project @ 2006-05-02 19:40:19 by jwe]
jwe
parents: 5780
diff changeset
390 Vsite_defaults_file.append ("/octaverc");
faafc2d98b8d [project @ 2006-05-02 19:40:19 by jwe]
jwe
parents: 5780
diff changeset
391 }
faafc2d98b8d [project @ 2006-05-02 19:40:19 by jwe]
jwe
parents: 5780
diff changeset
392 else
faafc2d98b8d [project @ 2006-05-02 19:40:19 by jwe]
jwe
parents: 5780
diff changeset
393 Vsite_defaults_file = sf;
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
394 }
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
395
15470
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
396 static void
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
397 set_built_in_docstrings_file (void)
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
398 {
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
399 if (Vbuilt_in_docstrings_file.empty ())
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
400 {
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
401 std::string df = octave_env::getenv ("OCTAVE_BUILT_IN_DOCSTRINGS_FILE");
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
402
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
403 if (df.empty ())
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
404 Vbuilt_in_docstrings_file
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
405 = Voct_etc_dir + file_ops::dir_sep_str () + "built-in-docstrings";
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
406 else
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
407 Vbuilt_in_docstrings_file = df;
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
408 }
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
409 }
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
410
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
411 void
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
412 install_defaults (void)
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
413 {
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
414 // OCTAVE_HOME must be set first!
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
415
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
416 set_octave_home ();
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
417
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
418 set_default_info_dir ();
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
419
3141
292ff0bf484b [project @ 1998-02-03 08:11:07 by jwe]
jwe
parents: 3040
diff changeset
420 set_default_data_dir ();
292ff0bf484b [project @ 1998-02-03 08:11:07 by jwe]
jwe
parents: 3040
diff changeset
421
292ff0bf484b [project @ 1998-02-03 08:11:07 by jwe]
jwe
parents: 3040
diff changeset
422 set_default_libexec_dir ();
292ff0bf484b [project @ 1998-02-03 08:11:07 by jwe]
jwe
parents: 3040
diff changeset
423
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
424 set_default_arch_lib_dir ();
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
425
5909
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 5832
diff changeset
426 set_default_local_ver_arch_lib_dir ();
a6a2423a9c25 [project @ 2006-07-27 19:35:22 by jwe]
jwe
parents: 5832
diff changeset
427 set_default_local_api_arch_lib_dir ();
2439
dc870b8b229f [project @ 1996-10-30 07:57:31 by jwe]
jwe
parents: 2390
diff changeset
428 set_default_local_arch_lib_dir ();
dc870b8b229f [project @ 1996-10-30 07:57:31 by jwe]
jwe
parents: 2390
diff changeset
429
5814
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
430 set_default_local_ver_oct_file_dir ();
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
431 set_default_local_api_oct_file_dir ();
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
432 set_default_local_oct_file_dir ();
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
433
5814
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
434 set_default_local_ver_fcn_file_dir ();
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
435 set_default_local_api_fcn_file_dir ();
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
436 set_default_local_fcn_file_dir ();
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
437
15157
a87fa9132b72 provide Voct_etc_dir variable
John W. Eaton <jwe@octave.org>
parents: 15088
diff changeset
438 set_default_oct_etc_dir ();
15971
e27d9b9b71f4 gui: install translation files into $(datadir)/octave/$(version)/locale
Torsten <ttl@justmail.de>
parents: 15478
diff changeset
439 set_default_oct_locale_dir ();
15157
a87fa9132b72 provide Voct_etc_dir variable
John W. Eaton <jwe@octave.org>
parents: 15088
diff changeset
440
5814
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
441 set_default_fcn_file_dir ();
5397
b12c0f920da0 [project @ 2005-06-17 07:52:28 by jwe]
jwe
parents: 5395
diff changeset
442 set_default_oct_file_dir ();
b12c0f920da0 [project @ 2005-06-17 07:52:28 by jwe]
jwe
parents: 5395
diff changeset
443
5814
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
444 set_default_image_dir ();
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
445
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
446 set_default_bin_dir ();
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
447
5814
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
448 set_exec_path ();
4447
252b9162c084 [project @ 2003-07-08 18:37:53 by jwe]
jwe
parents: 4264
diff changeset
449
5814
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
450 set_image_path ();
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
451
8865
eace5649a8b5 set default value for doc_cache_file variable
John W. Eaton <jwe@octave.org>
parents: 8008
diff changeset
452 set_default_doc_cache_file ();
eace5649a8b5 set default value for doc_cache_file variable
John W. Eaton <jwe@octave.org>
parents: 8008
diff changeset
453
14614
4e9dc46d4125 handle texinfo macros consistently in help system and manual
John W. Eaton <jwe@octave.org>
parents: 14429
diff changeset
454 set_default_texi_macros_file ();
4e9dc46d4125 handle texinfo macros consistently in help system and manual
John W. Eaton <jwe@octave.org>
parents: 14429
diff changeset
455
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
456 set_default_info_file ();
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
457
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
458 set_default_info_prog ();
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
459
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
460 set_default_editor ();
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
461
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
462 set_local_site_defaults_file ();
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
463
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
464 set_site_defaults_file ();
15470
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
465
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15195
diff changeset
466 set_built_in_docstrings_file ();
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
467 }
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
468
5794
1138ced03f14 [project @ 2006-05-08 20:23:04 by jwe]
jwe
parents: 5781
diff changeset
469 DEFUN (EDITOR, args, nargout,
17787
175b392e91fe Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents: 17744
diff changeset
470 "-*- texinfo -*-\n\
10840
89f4d7e294cc Grammarcheck .cc files
Rik <octave@nomad.inbox5.com>
parents: 10315
diff changeset
471 @deftypefn {Built-in Function} {@var{val} =} EDITOR ()\n\
5794
1138ced03f14 [project @ 2006-05-08 20:23:04 by jwe]
jwe
parents: 5781
diff changeset
472 @deftypefnx {Built-in Function} {@var{old_val} =} EDITOR (@var{new_val})\n\
13951
79aa00a94e9e doc: Document "local" option for configuration variables.
Rik <octave@nomad.inbox5.com>
parents: 12855
diff changeset
473 @deftypefnx {Built-in Function} {} EDITOR (@var{new_val}, \"local\")\n\
17991
22187db555cf Remove editor option from edit() and use only EDITOR() (bug #40600)
Carnë Draug <carandraug@octave.org>
parents: 17787
diff changeset
474 Query or set the internal variable that specifies the default text editor.\n\
22187db555cf Remove editor option from edit() and use only EDITOR() (bug #40600)
Carnë Draug <carandraug@octave.org>
parents: 17787
diff changeset
475 \n\
22187db555cf Remove editor option from edit() and use only EDITOR() (bug #40600)
Carnë Draug <carandraug@octave.org>
parents: 17787
diff changeset
476 The default value is taken from the environment variable @w{@env{EDITOR}}\n\
22187db555cf Remove editor option from edit() and use only EDITOR() (bug #40600)
Carnë Draug <carandraug@octave.org>
parents: 17787
diff changeset
477 when Octave starts. If the\n\
10840
89f4d7e294cc Grammarcheck .cc files
Rik <octave@nomad.inbox5.com>
parents: 10315
diff changeset
478 environment variable is not initialized, @w{@env{EDITOR}} will be set to\n\
17281
bc924baa2c4e doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents: 16926
diff changeset
479 @qcode{\"emacs\"}.\n\
13951
79aa00a94e9e doc: Document "local" option for configuration variables.
Rik <octave@nomad.inbox5.com>
parents: 12855
diff changeset
480 \n\
17281
bc924baa2c4e doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents: 16926
diff changeset
481 When called from inside a function with the @qcode{\"local\"} option, the\n\
bc924baa2c4e doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents: 16926
diff changeset
482 variable is changed locally for the function and any subroutines it calls. \n\
bc924baa2c4e doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents: 16926
diff changeset
483 The original variable value is restored when exiting the function.\n\
16926
23f6852052bb defaults.cc: refer to more functions in the seealso section of help text.
Carnë Draug <carandraug@octave.org>
parents: 16892
diff changeset
484 \n\
17991
22187db555cf Remove editor option from edit() and use only EDITOR() (bug #40600)
Carnë Draug <carandraug@octave.org>
parents: 17787
diff changeset
485 @seealso{edit, edit_history}\n\
5794
1138ced03f14 [project @ 2006-05-08 20:23:04 by jwe]
jwe
parents: 5781
diff changeset
486 @end deftypefn")
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
487 {
5794
1138ced03f14 [project @ 2006-05-08 20:23:04 by jwe]
jwe
parents: 5781
diff changeset
488 return SET_NONEMPTY_INTERNAL_STRING_VARIABLE (EDITOR);
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
489 }
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
490
12851
7fce673b934a codesprint: new tests for defaults.cc
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
491 /*
7fce673b934a codesprint: new tests for defaults.cc
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
492 %!test
7fce673b934a codesprint: new tests for defaults.cc
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
493 %! orig_val = EDITOR ();
7fce673b934a codesprint: new tests for defaults.cc
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
494 %! old_val = EDITOR ("X");
7fce673b934a codesprint: new tests for defaults.cc
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
495 %! assert (orig_val, old_val);
7fce673b934a codesprint: new tests for defaults.cc
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
496 %! assert (EDITOR (), "X");
7fce673b934a codesprint: new tests for defaults.cc
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
497 %! EDITOR (orig_val);
7fce673b934a codesprint: new tests for defaults.cc
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
498 %! assert (EDITOR (), orig_val);
14429
eff4a5933e28 Update %!tests in src/ directory with Octave coding conventions.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
499
eff4a5933e28 Update %!tests in src/ directory with Octave coding conventions.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
500 %!error (EDITOR (1, 2))
12851
7fce673b934a codesprint: new tests for defaults.cc
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
501 */
7fce673b934a codesprint: new tests for defaults.cc
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
502
5794
1138ced03f14 [project @ 2006-05-08 20:23:04 by jwe]
jwe
parents: 5781
diff changeset
503 DEFUN (EXEC_PATH, args, nargout,
17787
175b392e91fe Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents: 17744
diff changeset
504 "-*- texinfo -*-\n\
10840
89f4d7e294cc Grammarcheck .cc files
Rik <octave@nomad.inbox5.com>
parents: 10315
diff changeset
505 @deftypefn {Built-in Function} {@var{val} =} EXEC_PATH ()\n\
5794
1138ced03f14 [project @ 2006-05-08 20:23:04 by jwe]
jwe
parents: 5781
diff changeset
506 @deftypefnx {Built-in Function} {@var{old_val} =} EXEC_PATH (@var{new_val})\n\
13951
79aa00a94e9e doc: Document "local" option for configuration variables.
Rik <octave@nomad.inbox5.com>
parents: 12855
diff changeset
507 @deftypefnx {Built-in Function} {} EXEC_PATH (@var{new_val}, \"local\")\n\
5794
1138ced03f14 [project @ 2006-05-08 20:23:04 by jwe]
jwe
parents: 5781
diff changeset
508 Query or set the internal variable that specifies a colon separated\n\
11294
e2a4f3478b7c datetick.m: add missing semicolon
John W. Eaton <jwe@octave.org>
parents: 10840
diff changeset
509 list of directories to append to the shell PATH when executing external\n\
e2a4f3478b7c datetick.m: add missing semicolon
John W. Eaton <jwe@octave.org>
parents: 10840
diff changeset
510 programs. The initial value of is taken from the environment variable\n\
e2a4f3478b7c datetick.m: add missing semicolon
John W. Eaton <jwe@octave.org>
parents: 10840
diff changeset
511 @w{@env{OCTAVE_EXEC_PATH}}, but that value can be overridden by\n\
e2a4f3478b7c datetick.m: add missing semicolon
John W. Eaton <jwe@octave.org>
parents: 10840
diff changeset
512 the command line argument @option{--exec-path PATH}.\n\
13951
79aa00a94e9e doc: Document "local" option for configuration variables.
Rik <octave@nomad.inbox5.com>
parents: 12855
diff changeset
513 \n\
17281
bc924baa2c4e doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents: 16926
diff changeset
514 When called from inside a function with the @qcode{\"local\"} option, the\n\
bc924baa2c4e doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents: 16926
diff changeset
515 variable is changed locally for the function and any subroutines it calls. \n\
bc924baa2c4e doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents: 16926
diff changeset
516 The original variable value is restored when exiting the function.\n\
16926
23f6852052bb defaults.cc: refer to more functions in the seealso section of help text.
Carnë Draug <carandraug@octave.org>
parents: 16892
diff changeset
517 \n\
23f6852052bb defaults.cc: refer to more functions in the seealso section of help text.
Carnë Draug <carandraug@octave.org>
parents: 16892
diff changeset
518 @seealso{IMAGE_PATH, OCTAVE_HOME}\n\
5794
1138ced03f14 [project @ 2006-05-08 20:23:04 by jwe]
jwe
parents: 5781
diff changeset
519 @end deftypefn")
4217
301cc4cf87e9 [project @ 2002-12-05 03:33:01 by jwe]
jwe
parents: 3971
diff changeset
520 {
5794
1138ced03f14 [project @ 2006-05-08 20:23:04 by jwe]
jwe
parents: 5781
diff changeset
521 octave_value retval = SET_NONEMPTY_INTERNAL_STRING_VARIABLE (EXEC_PATH);
4217
301cc4cf87e9 [project @ 2002-12-05 03:33:01 by jwe]
jwe
parents: 3971
diff changeset
522
11298
cb94bdc74670 defaults.cc (FEXEC_PATH): only call set_exec_path if nargin is greater than zero
John W. Eaton <jwe@octave.org>
parents: 11294
diff changeset
523 if (args.length () > 0)
cb94bdc74670 defaults.cc (FEXEC_PATH): only call set_exec_path if nargin is greater than zero
John W. Eaton <jwe@octave.org>
parents: 11294
diff changeset
524 set_exec_path (VEXEC_PATH);
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
525
5794
1138ced03f14 [project @ 2006-05-08 20:23:04 by jwe]
jwe
parents: 5781
diff changeset
526 return retval;
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
527 }
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
528
12851
7fce673b934a codesprint: new tests for defaults.cc
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
529 /*
7fce673b934a codesprint: new tests for defaults.cc
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
530 %!test
7fce673b934a codesprint: new tests for defaults.cc
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
531 %! orig_val = EXEC_PATH ();
7fce673b934a codesprint: new tests for defaults.cc
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
532 %! old_val = EXEC_PATH ("X");
7fce673b934a codesprint: new tests for defaults.cc
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
533 %! assert (orig_val, old_val);
7fce673b934a codesprint: new tests for defaults.cc
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
534 %! assert (EXEC_PATH (), "X");
7fce673b934a codesprint: new tests for defaults.cc
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
535 %! EXEC_PATH (orig_val);
7fce673b934a codesprint: new tests for defaults.cc
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
536 %! assert (EXEC_PATH (), orig_val);
14429
eff4a5933e28 Update %!tests in src/ directory with Octave coding conventions.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
537
eff4a5933e28 Update %!tests in src/ directory with Octave coding conventions.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
538 %!error (EXEC_PATH (1, 2))
12851
7fce673b934a codesprint: new tests for defaults.cc
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
539 */
7fce673b934a codesprint: new tests for defaults.cc
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
540
5814
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
541 DEFUN (IMAGE_PATH, args, nargout,
17787
175b392e91fe Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents: 17744
diff changeset
542 "-*- texinfo -*-\n\
10840
89f4d7e294cc Grammarcheck .cc files
Rik <octave@nomad.inbox5.com>
parents: 10315
diff changeset
543 @deftypefn {Built-in Function} {@var{val} =} IMAGE_PATH ()\n\
5814
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
544 @deftypefnx {Built-in Function} {@var{old_val} =} IMAGE_PATH (@var{new_val})\n\
13951
79aa00a94e9e doc: Document "local" option for configuration variables.
Rik <octave@nomad.inbox5.com>
parents: 12855
diff changeset
545 @deftypefnx {Built-in Function} {} IMAGE_PATH (@var{new_val}, \"local\")\n\
5794
1138ced03f14 [project @ 2006-05-08 20:23:04 by jwe]
jwe
parents: 5781
diff changeset
546 Query or set the internal variable that specifies a colon separated\n\
1138ced03f14 [project @ 2006-05-08 20:23:04 by jwe]
jwe
parents: 5781
diff changeset
547 list of directories in which to search for image files.\n\
13951
79aa00a94e9e doc: Document "local" option for configuration variables.
Rik <octave@nomad.inbox5.com>
parents: 12855
diff changeset
548 \n\
17281
bc924baa2c4e doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents: 16926
diff changeset
549 When called from inside a function with the @qcode{\"local\"} option, the\n\
bc924baa2c4e doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents: 16926
diff changeset
550 variable is changed locally for the function and any subroutines it calls. \n\
bc924baa2c4e doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents: 16926
diff changeset
551 The original variable value is restored when exiting the function.\n\
16926
23f6852052bb defaults.cc: refer to more functions in the seealso section of help text.
Carnë Draug <carandraug@octave.org>
parents: 16892
diff changeset
552 \n\
23f6852052bb defaults.cc: refer to more functions in the seealso section of help text.
Carnë Draug <carandraug@octave.org>
parents: 16892
diff changeset
553 @seealso{EXEC_PATH, OCTAVE_HOME}\n\
5794
1138ced03f14 [project @ 2006-05-08 20:23:04 by jwe]
jwe
parents: 5781
diff changeset
554 @end deftypefn")
1138ced03f14 [project @ 2006-05-08 20:23:04 by jwe]
jwe
parents: 5781
diff changeset
555 {
5814
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
556 return SET_NONEMPTY_INTERNAL_STRING_VARIABLE (IMAGE_PATH);
5794
1138ced03f14 [project @ 2006-05-08 20:23:04 by jwe]
jwe
parents: 5781
diff changeset
557 }
1138ced03f14 [project @ 2006-05-08 20:23:04 by jwe]
jwe
parents: 5781
diff changeset
558
12851
7fce673b934a codesprint: new tests for defaults.cc
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
559 /*
7fce673b934a codesprint: new tests for defaults.cc
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
560 %!test
7fce673b934a codesprint: new tests for defaults.cc
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
561 %! orig_val = IMAGE_PATH ();
7fce673b934a codesprint: new tests for defaults.cc
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
562 %! old_val = IMAGE_PATH ("X");
7fce673b934a codesprint: new tests for defaults.cc
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
563 %! assert (orig_val, old_val);
7fce673b934a codesprint: new tests for defaults.cc
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
564 %! assert (IMAGE_PATH (), "X");
7fce673b934a codesprint: new tests for defaults.cc
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
565 %! IMAGE_PATH (orig_val);
7fce673b934a codesprint: new tests for defaults.cc
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
566 %! assert (IMAGE_PATH (), orig_val);
14429
eff4a5933e28 Update %!tests in src/ directory with Octave coding conventions.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
567
eff4a5933e28 Update %!tests in src/ directory with Octave coding conventions.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
568 %!error (IMAGE_PATH (1, 2))
12851
7fce673b934a codesprint: new tests for defaults.cc
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
569 */
7fce673b934a codesprint: new tests for defaults.cc
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
570
5780
cbf717bf8150 [project @ 2006-04-27 20:02:30 by jwe]
jwe
parents: 5777
diff changeset
571 DEFUN (OCTAVE_HOME, args, ,
17787
175b392e91fe Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents: 17744
diff changeset
572 "-*- texinfo -*-\n\
5780
cbf717bf8150 [project @ 2006-04-27 20:02:30 by jwe]
jwe
parents: 5777
diff changeset
573 @deftypefn {Built-in Function} {} OCTAVE_HOME ()\n\
cbf717bf8150 [project @ 2006-04-27 20:02:30 by jwe]
jwe
parents: 5777
diff changeset
574 Return the name of the top-level Octave installation directory.\n\
16926
23f6852052bb defaults.cc: refer to more functions in the seealso section of help text.
Carnë Draug <carandraug@octave.org>
parents: 16892
diff changeset
575 \n\
23f6852052bb defaults.cc: refer to more functions in the seealso section of help text.
Carnë Draug <carandraug@octave.org>
parents: 16892
diff changeset
576 @seealso{EXEC_PATH, IMAGE_PATH}\n\
5780
cbf717bf8150 [project @ 2006-04-27 20:02:30 by jwe]
jwe
parents: 5777
diff changeset
577 @end deftypefn")
cbf717bf8150 [project @ 2006-04-27 20:02:30 by jwe]
jwe
parents: 5777
diff changeset
578 {
cbf717bf8150 [project @ 2006-04-27 20:02:30 by jwe]
jwe
parents: 5777
diff changeset
579 octave_value retval;
2831
19c45d29f177 [project @ 1997-03-26 04:17:16 by jwe]
jwe
parents: 2651
diff changeset
580
5780
cbf717bf8150 [project @ 2006-04-27 20:02:30 by jwe]
jwe
parents: 5777
diff changeset
581 if (args.length () == 0)
cbf717bf8150 [project @ 2006-04-27 20:02:30 by jwe]
jwe
parents: 5777
diff changeset
582 retval = Voctave_home;
cbf717bf8150 [project @ 2006-04-27 20:02:30 by jwe]
jwe
parents: 5777
diff changeset
583 else
5823
080c08b192d8 [project @ 2006-05-19 05:32:17 by jwe]
jwe
parents: 5814
diff changeset
584 print_usage ();
5780
cbf717bf8150 [project @ 2006-04-27 20:02:30 by jwe]
jwe
parents: 5777
diff changeset
585
cbf717bf8150 [project @ 2006-04-27 20:02:30 by jwe]
jwe
parents: 5777
diff changeset
586 return retval;
5749
26beffa9f66f [project @ 2006-04-07 20:35:07 by jwe]
jwe
parents: 5451
diff changeset
587 }
3446
5ee5afb3981a [project @ 2000-01-17 09:42:43 by jwe]
jwe
parents: 3402
diff changeset
588
12851
7fce673b934a codesprint: new tests for defaults.cc
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
589 /*
14429
eff4a5933e28 Update %!tests in src/ directory with Octave coding conventions.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
590 %!assert (ischar (OCTAVE_HOME ()))
eff4a5933e28 Update %!tests in src/ directory with Octave coding conventions.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
591 %!error OCTAVE_HOME (1)
12851
7fce673b934a codesprint: new tests for defaults.cc
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
592 */
7fce673b934a codesprint: new tests for defaults.cc
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
593
5749
26beffa9f66f [project @ 2006-04-07 20:35:07 by jwe]
jwe
parents: 5451
diff changeset
594 DEFUNX ("OCTAVE_VERSION", FOCTAVE_VERSION, args, ,
17787
175b392e91fe Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents: 17744
diff changeset
595 "-*- texinfo -*-\n\
5749
26beffa9f66f [project @ 2006-04-07 20:35:07 by jwe]
jwe
parents: 5451
diff changeset
596 @deftypefn {Built-in Function} {} OCTAVE_VERSION ()\n\
26beffa9f66f [project @ 2006-04-07 20:35:07 by jwe]
jwe
parents: 5451
diff changeset
597 Return the version number of Octave, as a string.\n\
26beffa9f66f [project @ 2006-04-07 20:35:07 by jwe]
jwe
parents: 5451
diff changeset
598 @end deftypefn")
26beffa9f66f [project @ 2006-04-07 20:35:07 by jwe]
jwe
parents: 5451
diff changeset
599 {
26beffa9f66f [project @ 2006-04-07 20:35:07 by jwe]
jwe
parents: 5451
diff changeset
600 octave_value retval;
26beffa9f66f [project @ 2006-04-07 20:35:07 by jwe]
jwe
parents: 5451
diff changeset
601
26beffa9f66f [project @ 2006-04-07 20:35:07 by jwe]
jwe
parents: 5451
diff changeset
602 int nargin = args.length ();
26beffa9f66f [project @ 2006-04-07 20:35:07 by jwe]
jwe
parents: 5451
diff changeset
603
26beffa9f66f [project @ 2006-04-07 20:35:07 by jwe]
jwe
parents: 5451
diff changeset
604 if (nargin == 0)
26beffa9f66f [project @ 2006-04-07 20:35:07 by jwe]
jwe
parents: 5451
diff changeset
605 retval = OCTAVE_VERSION;
26beffa9f66f [project @ 2006-04-07 20:35:07 by jwe]
jwe
parents: 5451
diff changeset
606 else
5823
080c08b192d8 [project @ 2006-05-19 05:32:17 by jwe]
jwe
parents: 5814
diff changeset
607 print_usage ();
5749
26beffa9f66f [project @ 2006-04-07 20:35:07 by jwe]
jwe
parents: 5451
diff changeset
608
26beffa9f66f [project @ 2006-04-07 20:35:07 by jwe]
jwe
parents: 5451
diff changeset
609 return retval;
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
610 }
12851
7fce673b934a codesprint: new tests for defaults.cc
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
611
7fce673b934a codesprint: new tests for defaults.cc
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
612 /*
14429
eff4a5933e28 Update %!tests in src/ directory with Octave coding conventions.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
613 %!assert (ischar (OCTAVE_VERSION ()))
eff4a5933e28 Update %!tests in src/ directory with Octave coding conventions.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
614 %!error OCTAVE_VERSION (1)
12851
7fce673b934a codesprint: new tests for defaults.cc
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
615 */