annotate libinterp/corefcn/defaults.cc @ 31605:e88a07dec498 stable

maint: Use macros to begin/end C++ namespaces. * oct-conf-post-public.in.h: Define two macros (OCTAVE_BEGIN_NAMESPACE, OCTAVE_END_NAMESPACE) that can be used to start/end a namespace. * mk-opts.pl, build-env.h, build-env.in.cc, __betainc__.cc, __contourc__.cc, __dsearchn__.cc, __eigs__.cc, __expint__.cc, __ftp__.cc, __gammainc__.cc, __ichol__.cc, __ilu__.cc, __isprimelarge__.cc, __lin_interpn__.cc, __magick_read__.cc, __pchip_deriv__.cc, __qp__.cc, amd.cc, auto-shlib.cc, auto-shlib.h, balance.cc, base-text-renderer.cc, base-text-renderer.h, besselj.cc, bitfcns.cc, bsxfun.cc, c-file-ptr-stream.cc, c-file-ptr-stream.h, call-stack.cc, call-stack.h, ccolamd.cc, cellfun.cc, chol.cc, colamd.cc, colloc.cc, conv2.cc, daspk.cc, dasrt.cc, dassl.cc, data.cc, data.h, debug.cc, defaults.cc, defaults.h, defun-int.h, defun.cc, det.cc, dirfns.cc, display.cc, display.h, dlmread.cc, dmperm.cc, dot.cc, dynamic-ld.cc, dynamic-ld.h, eig.cc, ellipj.cc, environment.cc, environment.h, error.cc, error.h, errwarn.h, event-manager.cc, event-manager.h, event-queue.cc, event-queue.h, fcn-info.cc, fcn-info.h, fft.cc, fft2.cc, fftn.cc, file-io.cc, filter.cc, find.cc, ft-text-renderer.cc, ft-text-renderer.h, gcd.cc, getgrent.cc, getpwent.cc, getrusage.cc, givens.cc, gl-render.cc, gl-render.h, gl2ps-print.cc, gl2ps-print.h, graphics-toolkit.cc, graphics-toolkit.h, graphics.cc, graphics.in.h, gsvd.cc, gtk-manager.cc, gtk-manager.h, hash.cc, help.cc, help.h, hess.cc, hex2num.cc, hook-fcn.cc, hook-fcn.h, input.cc, input.h, interpreter-private.cc, interpreter-private.h, interpreter.cc, interpreter.h, inv.cc, jsondecode.cc, jsonencode.cc, kron.cc, latex-text-renderer.cc, latex-text-renderer.h, load-path.cc, load-path.h, load-save.cc, load-save.h, lookup.cc, ls-ascii-helper.cc, ls-ascii-helper.h, ls-oct-text.cc, ls-utils.cc, ls-utils.h, lsode.cc, lu.cc, mappers.cc, matrix_type.cc, max.cc, mex-private.h, mex.cc, mgorth.cc, nproc.cc, oct-fstrm.cc, oct-fstrm.h, oct-hdf5-types.cc, oct-hdf5-types.h, oct-hist.cc, oct-hist.h, oct-iostrm.cc, oct-iostrm.h, oct-opengl.h, oct-prcstrm.cc, oct-prcstrm.h, oct-procbuf.cc, oct-procbuf.h, oct-process.cc, oct-process.h, oct-stdstrm.h, oct-stream.cc, oct-stream.h, oct-strstrm.cc, oct-strstrm.h, oct-tex-lexer.in.ll, oct-tex-parser.yy, ordqz.cc, ordschur.cc, pager.cc, pager.h, pinv.cc, pow2.cc, pr-flt-fmt.cc, pr-output.cc, procstream.cc, procstream.h, psi.cc, qr.cc, quad.cc, quadcc.cc, qz.cc, rand.cc, rcond.cc, regexp.cc, schur.cc, settings.cc, settings.h, sighandlers.cc, sighandlers.h, sparse-xdiv.cc, sparse-xdiv.h, sparse-xpow.cc, sparse-xpow.h, sparse.cc, spparms.cc, sqrtm.cc, stack-frame.cc, stack-frame.h, stream-euler.cc, strfind.cc, strfns.cc, sub2ind.cc, svd.cc, sylvester.cc, symbfact.cc, syminfo.cc, syminfo.h, symrcm.cc, symrec.cc, symrec.h, symscope.cc, symscope.h, symtab.cc, symtab.h, syscalls.cc, sysdep.cc, sysdep.h, text-engine.cc, text-engine.h, text-renderer.cc, text-renderer.h, time.cc, toplev.cc, tril.cc, tsearch.cc, typecast.cc, url-handle-manager.cc, url-handle-manager.h, urlwrite.cc, utils.cc, utils.h, variables.cc, variables.h, xdiv.cc, xdiv.h, xnorm.cc, xnorm.h, xpow.cc, xpow.h, __delaunayn__.cc, __fltk_uigetfile__.cc, __glpk__.cc, __init_fltk__.cc, __init_gnuplot__.cc, __ode15__.cc, __voronoi__.cc, audiodevinfo.cc, audioread.cc, convhulln.cc, fftw.cc, gzip.cc, mk-build-env-features.sh, mk-builtins.pl, cdef-class.cc, cdef-class.h, cdef-fwd.h, cdef-manager.cc, cdef-manager.h, cdef-method.cc, cdef-method.h, cdef-object.cc, cdef-object.h, cdef-package.cc, cdef-package.h, cdef-property.cc, cdef-property.h, cdef-utils.cc, cdef-utils.h, ov-base.cc, ov-base.h, ov-bool-mat.cc, ov-builtin.h, ov-cell.cc, ov-class.cc, ov-class.h, ov-classdef.cc, ov-classdef.h, ov-complex.cc, ov-fcn-handle.cc, ov-fcn-handle.h, ov-fcn.h, ov-java.cc, ov-java.h, ov-mex-fcn.h, ov-null-mat.cc, ov-oncleanup.cc, ov-struct.cc, ov-typeinfo.cc, ov-typeinfo.h, ov-usr-fcn.cc, ov-usr-fcn.h, ov.cc, ov.h, octave.cc, octave.h, mk-ops.sh, op-b-b.cc, op-b-bm.cc, op-b-sbm.cc, op-bm-b.cc, op-bm-bm.cc, op-bm-sbm.cc, op-cdm-cdm.cc, op-cell.cc, op-chm.cc, op-class.cc, op-cm-cm.cc, op-cm-cs.cc, op-cm-m.cc, op-cm-s.cc, op-cm-scm.cc, op-cm-sm.cc, op-cs-cm.cc, op-cs-cs.cc, op-cs-m.cc, op-cs-s.cc, op-cs-scm.cc, op-cs-sm.cc, op-dm-dm.cc, op-dm-scm.cc, op-dm-sm.cc, op-dm-template.cc, op-dms-template.cc, op-fcdm-fcdm.cc, op-fcm-fcm.cc, op-fcm-fcs.cc, op-fcm-fm.cc, op-fcm-fs.cc, op-fcn.cc, op-fcs-fcm.cc, op-fcs-fcs.cc, op-fcs-fm.cc, op-fcs-fs.cc, op-fdm-fdm.cc, op-fm-fcm.cc, op-fm-fcs.cc, op-fm-fm.cc, op-fm-fs.cc, op-fs-fcm.cc, op-fs-fcs.cc, op-fs-fm.cc, op-fs-fs.cc, op-i16-i16.cc, op-i32-i32.cc, op-i64-i64.cc, op-i8-i8.cc, op-int-concat.cc, op-m-cm.cc, op-m-cs.cc, op-m-m.cc, op-m-s.cc, op-m-scm.cc, op-m-sm.cc, op-mi.cc, op-pm-pm.cc, op-pm-scm.cc, op-pm-sm.cc, op-pm-template.cc, op-range.cc, op-s-cm.cc, op-s-cs.cc, op-s-m.cc, op-s-s.cc, op-s-scm.cc, op-s-sm.cc, op-sbm-b.cc, op-sbm-bm.cc, op-sbm-sbm.cc, op-scm-cm.cc, op-scm-cs.cc, op-scm-m.cc, op-scm-s.cc, op-scm-scm.cc, op-scm-sm.cc, op-sm-cm.cc, op-sm-cs.cc, op-sm-m.cc, op-sm-s.cc, op-sm-scm.cc, op-sm-sm.cc, op-str-m.cc, op-str-s.cc, op-str-str.cc, op-struct.cc, op-ui16-ui16.cc, op-ui32-ui32.cc, op-ui64-ui64.cc, op-ui8-ui8.cc, ops.h, anon-fcn-validator.cc, anon-fcn-validator.h, bp-table.cc, bp-table.h, comment-list.cc, comment-list.h, filepos.h, lex.h, lex.ll, oct-lvalue.cc, oct-lvalue.h, oct-parse.yy, parse.h, profiler.cc, profiler.h, pt-anon-scopes.cc, pt-anon-scopes.h, pt-arg-list.cc, pt-arg-list.h, pt-args-block.cc, pt-args-block.h, pt-array-list.cc, pt-array-list.h, pt-assign.cc, pt-assign.h, pt-binop.cc, pt-binop.h, pt-bp.cc, pt-bp.h, pt-cbinop.cc, pt-cbinop.h, pt-cell.cc, pt-cell.h, pt-check.cc, pt-check.h, pt-classdef.cc, pt-classdef.h, pt-cmd.h, pt-colon.cc, pt-colon.h, pt-const.cc, pt-const.h, pt-decl.cc, pt-decl.h, pt-eval.cc, pt-eval.h, pt-except.cc, pt-except.h, pt-exp.cc, pt-exp.h, pt-fcn-handle.cc, pt-fcn-handle.h, pt-id.cc, pt-id.h, pt-idx.cc, pt-idx.h, pt-jump.h, pt-loop.cc, pt-loop.h, pt-mat.cc, pt-mat.h, pt-misc.cc, pt-misc.h, pt-pr-code.cc, pt-pr-code.h, pt-select.cc, pt-select.h, pt-spmd.cc, pt-spmd.h, pt-stmt.cc, pt-stmt.h, pt-tm-const.cc, pt-tm-const.h, pt-unop.cc, pt-unop.h, pt-vm-eval.cc, pt-walk.cc, pt-walk.h, pt.cc, pt.h, token.cc, token.h, Range.cc, Range.h, idx-vector.cc, idx-vector.h, range-fwd.h, CollocWt.cc, CollocWt.h, aepbalance.cc, aepbalance.h, chol.cc, chol.h, gepbalance.cc, gepbalance.h, gsvd.cc, gsvd.h, hess.cc, hess.h, lo-mappers.cc, lo-mappers.h, lo-specfun.cc, lo-specfun.h, lu.cc, lu.h, oct-convn.cc, oct-convn.h, oct-fftw.cc, oct-fftw.h, oct-norm.cc, oct-norm.h, oct-rand.cc, oct-rand.h, oct-spparms.cc, oct-spparms.h, qr.cc, qr.h, qrp.cc, qrp.h, randgamma.cc, randgamma.h, randmtzig.cc, randmtzig.h, randpoisson.cc, randpoisson.h, schur.cc, schur.h, sparse-chol.cc, sparse-chol.h, sparse-lu.cc, sparse-lu.h, sparse-qr.cc, sparse-qr.h, svd.cc, svd.h, child-list.cc, child-list.h, dir-ops.cc, dir-ops.h, file-ops.cc, file-ops.h, file-stat.cc, file-stat.h, lo-sysdep.cc, lo-sysdep.h, lo-sysinfo.cc, lo-sysinfo.h, mach-info.cc, mach-info.h, oct-env.cc, oct-env.h, oct-group.cc, oct-group.h, oct-password.cc, oct-password.h, oct-syscalls.cc, oct-syscalls.h, oct-time.cc, oct-time.h, oct-uname.cc, oct-uname.h, action-container.cc, action-container.h, base-list.h, cmd-edit.cc, cmd-edit.h, cmd-hist.cc, cmd-hist.h, f77-fcn.h, file-info.cc, file-info.h, lo-array-errwarn.cc, lo-array-errwarn.h, lo-hash.cc, lo-hash.h, lo-ieee.h, lo-regexp.cc, lo-regexp.h, lo-utils.cc, lo-utils.h, oct-base64.cc, oct-base64.h, oct-glob.cc, oct-glob.h, oct-inttypes.h, oct-mutex.cc, oct-mutex.h, oct-refcount.h, oct-shlib.cc, oct-shlib.h, oct-sparse.cc, oct-sparse.h, oct-string.h, octave-preserve-stream-state.h, pathsearch.cc, pathsearch.h, quit.cc, quit.h, unwind-prot.cc, unwind-prot.h, url-transfer.cc, url-transfer.h : Use new macros to begin/end C++ namespaces.
author Rik <rik@octave.org>
date Thu, 01 Dec 2022 14:23:45 -0800
parents 32d2b6604a9f
children aac27ad79be6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
27923
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
1 ////////////////////////////////////////////////////////////////////////
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
2 //
30564
796f54d4ddbf update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents: 30354
diff changeset
3 // Copyright (C) 1996-2022 The Octave Project Developers
27923
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
4 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
5 // See the file COPYRIGHT.md in the top-level directory of this
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
6 // distribution or <https://octave.org/copyright/>.
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
7 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
8 // This file is part of Octave.
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
9 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
10 // Octave is free software: you can redistribute it and/or modify it
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
11 // under the terms of the GNU General Public License as published by
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
12 // the Free Software Foundation, either version 3 of the License, or
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
13 // (at your option) any later version.
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
14 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
15 // Octave is distributed in the hope that it will be useful, but
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
16 // WITHOUT ANY WARRANTY; without even the implied warranty of
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
18 // GNU General Public License for more details.
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
19 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
20 // You should have received a copy of the GNU General Public License
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
21 // along with Octave; see the file COPYING. If not, see
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
22 // <https://www.gnu.org/licenses/>.
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
23 //
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
24 ////////////////////////////////////////////////////////////////////////
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
25
21724
aba2e6293dd8 use "#if ..." consistently instead of "#ifdef" and "#ifndef"
John W. Eaton <jwe@octave.org>
parents: 21301
diff changeset
26 #if defined (HAVE_CONFIG_H)
21301
40de9f8f23a6 Use '#include "config.h"' rather than <config.h>.
Rik <rik@octave.org>
parents: 21200
diff changeset
27 # include "config.h"
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
28 #endif
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
29
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
30 #include <cstdlib>
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
31
6114
a0dafb51dd06 [project @ 2006-10-27 14:02:16 by jwe]
jwe
parents: 5909
diff changeset
32 #include <algorithm>
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
33 #include <string>
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
34
5814
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5794
diff changeset
35 #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
36 #include "file-ops.h"
2926
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
37 #include "oct-env.h"
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2847
diff changeset
38
23466
5da300c55e89 use "" instead of <> for including defaults.h and version.h
John W. Eaton <jwe@octave.org>
parents: 23450
diff changeset
39 #include "defaults.h"
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
40 #include "defun.h"
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
41 #include "error.h"
3040
443851377f3f [project @ 1997-06-06 09:29:28 by jwe]
jwe
parents: 2993
diff changeset
42 #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
43 #include "ovl.h"
2390
c2c1482c34c8 [project @ 1996-10-12 19:13:23 by jwe]
jwe
parents: 2203
diff changeset
44 #include "ov.h"
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
45 #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
46 #include "version.h"
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
47
23720
d3a9ffc9fdbd move config macros from defaults.cc to a separate file
John W. Eaton <jwe@octave.org>
parents: 23719
diff changeset
48 #include "default-defs.h"
23713
4feef926733a rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents: 23712
diff changeset
49
31605
e88a07dec498 maint: Use macros to begin/end C++ namespaces.
Rik <rik@octave.org>
parents: 30888
diff changeset
50 OCTAVE_BEGIN_NAMESPACE(octave)
29960
939bef0b66e0 merge "namespace octave" and OCTAVE_NAMESPACE_BEGIN/END blocks
John W. Eaton <jwe@octave.org>
parents: 29958
diff changeset
51
31605
e88a07dec498 maint: Use macros to begin/end C++ namespaces.
Rik <rik@octave.org>
parents: 30888
diff changeset
52 OCTAVE_BEGIN_NAMESPACE(config)
e88a07dec498 maint: Use macros to begin/end C++ namespaces.
Rik <rik@octave.org>
parents: 30888
diff changeset
53
25460
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
54 // Variables that name directories or files are substituted into source
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
55 // files with "${prefix}/" stripped from the beginning of the string.
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
56
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
57 // All configure variables of this form should be specified as absolute
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
58 // directory names. The only ones that should not be absolute here are
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
59 // ones that have had "${prefix}/" or "${exec_prefix} stripped.
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
60
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
61 static std::string
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
62 prepend_home_dir (const std::string& hd, const std::string& s)
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
63 {
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
64 std::string retval = s;
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
65
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
66 char dir_sep_char = sys::file_ops::dir_sep_char ();
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
67
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
68 if (! sys::env::absolute_pathname (retval))
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
69 retval = hd + dir_sep_char + s;
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
70
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
71 if (dir_sep_char != '/')
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
72 std::replace (retval.begin (), retval.end (), '/', dir_sep_char);
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
73
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
74 return retval;
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
75 }
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
76
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
77 static std::string get_octave_home (void)
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
78 {
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
79 std::string op = OCTAVE_PREFIX;
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
80
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
81 std::string oh = sys::env::getenv ("OCTAVE_HOME");
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
82
27956
2310164737b3 fix many spelling errors (bug #57613)
John W. Eaton <jwe@octave.org>
parents: 26376
diff changeset
83 // If OCTAVE_HOME is set in the environment, use that. Otherwise,
25460
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
84 // default to ${prefix} from configure.
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
85
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
86 return oh.empty () ? op : oh;
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
87 }
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
88
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
89 static std::string get_octave_exec_home (void)
23721
b2d55b52ee51 new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents: 23720
diff changeset
90 {
25460
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
91 std::string op = OCTAVE_PREFIX;
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
92 std::string oep = OCTAVE_EXEC_PREFIX;
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
93
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
94 std::string oh = sys::env::getenv ("OCTAVE_HOME");
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
95 std::string oeh = sys::env::getenv ("OCTAVE_EXEC_HOME");
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
96
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
97 // If OCTAVE_EXEC_HOME is set in the environment, use that.
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
98 // Otherwise, if ${prefix} and ${exec_prefix} from configure are set
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
99 // to the same value, use OCTAVE_HOME from the environment if it is set.
27956
2310164737b3 fix many spelling errors (bug #57613)
John W. Eaton <jwe@octave.org>
parents: 26376
diff changeset
100 // Otherwise, default to ${exec_prefix} from configure.
25460
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
101
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
102 if (! oeh.empty ())
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
103 return oeh;
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
104
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
105 if (op == oep && ! oh.empty ())
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
106 return oh;
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
107
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
108 return oep;
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
109 }
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
110
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
111 static std::string get_local_site_defaults_file (void)
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
112 {
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
113 std::string lsf = sys::env::getenv ("OCTAVE_SITE_INITFILE");
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
114
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
115 return lsf.empty () ? local_startupfile_dir () + "/octaverc" : lsf;
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
116 }
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
117
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
118 static std::string get_site_defaults_file (void)
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
119 {
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
120 std::string sf = sys::env::getenv ("OCTAVE_VERSION_INITFILE");
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
121
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
122 return sf.empty () ? startupfile_dir () + "/octaverc" : sf;
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
123 }
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
124
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
125 std::string prepend_octave_home (const std::string& s)
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
126 {
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
127 return prepend_home_dir (octave_home (), s);
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
128 }
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
129
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
130 std::string prepend_octave_exec_home (const std::string& s)
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
131 {
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
132 return prepend_home_dir (octave_exec_home (), s);
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
133 }
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
134
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
135 std::string canonical_host_type (void)
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
136 {
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
137 static const std::string s_canonical_host_type
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
138 = OCTAVE_CANONICAL_HOST_TYPE;
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
139
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
140 return s_canonical_host_type;
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
141 }
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
142
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
143 std::string release (void)
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
144 {
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
145 static const std::string s_octave_release = OCTAVE_RELEASE;
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
146
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
147 return s_octave_release;
23721
b2d55b52ee51 new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents: 23720
diff changeset
148 }
b2d55b52ee51 new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents: 23720
diff changeset
149
25460
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
150 std::string default_pager (void)
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
151 {
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
152 static const std::string s_default_pager = OCTAVE_DEFAULT_PAGER;
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
153
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
154 return s_default_pager;
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
155 }
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
156
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
157 std::string octave_home (void)
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
158 {
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
159 static const std::string s_octave_home = get_octave_home ();
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
160
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
161 return s_octave_home;
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
162 }
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
163
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
164 std::string octave_exec_home (void)
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
165 {
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
166 static const std::string s_octave_exec_home = get_octave_exec_home ();
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
167
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
168 return s_octave_exec_home;
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
169 }
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
170
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
171 std::string bin_dir (void)
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
172 {
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
173 static const std::string s_bin_dir
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
174 = prepend_octave_exec_home (OCTAVE_BINDIR);
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
175
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
176 return s_bin_dir;
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
177 }
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
178
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
179 std::string data_dir (void)
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
180 {
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
181 static const std::string s_data_dir
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
182 = prepend_octave_home (OCTAVE_DATADIR);
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
183
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
184 return s_data_dir;
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
185 }
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
186
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
187 std::string dataroot_dir (void)
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
188 {
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
189 static const std::string s_dataroot_dir
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
190 = prepend_octave_home (OCTAVE_DATAROOTDIR);
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
191
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
192 return s_dataroot_dir;
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
193 }
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
194
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
195 std::string include_dir (void)
23721
b2d55b52ee51 new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents: 23720
diff changeset
196 {
25460
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
197 static const std::string s_include_dir
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
198 = prepend_octave_home (OCTAVE_INCLUDEDIR);
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
199
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
200 return s_include_dir;
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
201 }
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
202
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
203 std::string lib_dir (void)
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
204 {
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
205 static const std::string s_lib_dir
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
206 = prepend_octave_exec_home (OCTAVE_LIBDIR);
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
207
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
208 return s_lib_dir;
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
209 }
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
210
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
211 std::string libexec_dir (void)
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
212 {
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
213 static const std::string s_libexec_dir
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
214 = prepend_octave_exec_home (OCTAVE_LIBEXECDIR);
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
215
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
216 return s_libexec_dir;
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
217 }
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
218
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
219 std::string arch_lib_dir (void)
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
220 {
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
221 static const std::string s_arch_lib_dir
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
222 = prepend_octave_exec_home (OCTAVE_ARCHLIBDIR);
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
223
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
224 return s_arch_lib_dir;
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
225 }
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
226
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
227 std::string info_dir (void)
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
228 {
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
229 static const std::string s_info_dir
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
230 = prepend_octave_exec_home (OCTAVE_INFODIR);
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
231
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
232 return s_info_dir;
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
233 }
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
234
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
235 std::string local_ver_arch_lib_dir (void)
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
236 {
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
237 static const std::string s_local_ver_arch_lib_dir
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
238 = prepend_octave_exec_home (OCTAVE_LOCALVERARCHLIBDIR);
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
239
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
240 return s_local_ver_arch_lib_dir;
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
241 }
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
242
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
243 std::string local_api_arch_lib_dir (void)
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
244 {
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
245 static const std::string s_local_api_arch_lib_dir
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
246 = prepend_octave_exec_home (OCTAVE_LOCALAPIARCHLIBDIR);
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
247
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
248 return s_local_api_arch_lib_dir;
23721
b2d55b52ee51 new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents: 23720
diff changeset
249 }
b2d55b52ee51 new class to manage help system and associated variables
John W. Eaton <jwe@octave.org>
parents: 23720
diff changeset
250
25460
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
251 std::string local_arch_lib_dir (void)
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
252 {
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
253 static const std::string s_local_arch_lib_dir
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
254 = prepend_octave_exec_home (OCTAVE_LOCALARCHLIBDIR);
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
255
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
256 return s_local_arch_lib_dir;
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
257 }
23717
06579337237b move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents: 23713
diff changeset
258
25460
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
259 std::string local_ver_oct_file_dir (void)
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
260 {
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
261 static const std::string s_local_ver_oct_file_dir
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
262 = prepend_octave_exec_home (OCTAVE_LOCALVEROCTFILEDIR);
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
263
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
264 return s_local_ver_oct_file_dir;
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
265 }
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
266
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
267 std::string local_api_oct_file_dir (void)
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
268 {
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
269 static const std::string s_local_api_oct_file_dir
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
270 = prepend_octave_exec_home (OCTAVE_LOCALAPIOCTFILEDIR);
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
271
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
272 return s_local_api_oct_file_dir;
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
273 }
23717
06579337237b move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents: 23713
diff changeset
274
25460
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
275 std::string local_oct_file_dir (void)
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
276 {
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
277 static const std::string s_local_oct_file_dir
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
278 = prepend_octave_exec_home (OCTAVE_LOCALOCTFILEDIR);
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
279
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
280 return s_local_oct_file_dir;
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
281 }
23717
06579337237b move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents: 23713
diff changeset
282
25460
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
283 std::string oct_file_dir (void)
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
284 {
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
285 static const std::string s_oct_file_dir
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
286 = prepend_octave_exec_home (OCTAVE_OCTFILEDIR);
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
287
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
288 return s_oct_file_dir;
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
289 }
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
290
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
291 std::string local_ver_fcn_file_dir (void)
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
292 {
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
293 static const std::string s_local_ver_fcn_file_dir
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
294 = prepend_octave_home (OCTAVE_LOCALVERFCNFILEDIR);
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
295
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
296 return s_local_ver_fcn_file_dir;
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
297 }
23717
06579337237b move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents: 23713
diff changeset
298
25460
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
299 std::string local_api_fcn_file_dir (void)
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
300 {
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
301 static const std::string s_local_api_fcn_file_dir
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
302 = prepend_octave_home (OCTAVE_LOCALAPIFCNFILEDIR);
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
303
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
304 return s_local_api_fcn_file_dir;
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
305 }
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
306
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
307 std::string local_fcn_file_dir (void)
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
308 {
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
309 static const std::string s_local_fcn_file_dir
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
310 = prepend_octave_home (OCTAVE_LOCALFCNFILEDIR);
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
311
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
312 return s_local_fcn_file_dir;
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
313 }
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
314
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
315 std::string fcn_file_dir (void)
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
316 {
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
317 static const std::string s_fcn_file_dir
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
318 = prepend_octave_home (OCTAVE_FCNFILEDIR);
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
319
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
320 return s_fcn_file_dir;
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
321 }
23717
06579337237b move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents: 23713
diff changeset
322
25460
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
323 std::string oct_data_dir (void)
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
324 {
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
325 static const std::string s_oct_data_dir
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
326 = prepend_octave_home (OCTAVE_OCTDATADIR);
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
327
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
328 return s_oct_data_dir;
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
329 }
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
330
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
331 std::string oct_doc_dir (void)
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
332 {
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
333 static const std::string s_oct_doc_dir
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
334 = prepend_octave_home (OCTAVE_OCTDOCDIR);
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
335
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
336 return s_oct_doc_dir;
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
337 }
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
338
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
339 std::string oct_etc_dir (void)
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
340 {
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
341 static const std::string s_oct_etc_dir
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
342 = prepend_octave_home (OCTAVE_OCTETCDIR);
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
343
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
344 return s_oct_etc_dir;
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
345 }
23717
06579337237b move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents: 23713
diff changeset
346
25460
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
347 std::string oct_fonts_dir (void)
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
348 {
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
349 static const std::string s_oct_fonts_dir
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
350 = prepend_octave_home (OCTAVE_OCTFONTSDIR);
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
351
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
352 return s_oct_fonts_dir;
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
353 }
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
354
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
355 std::string oct_include_dir (void)
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
356 {
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
357 static const std::string s_oct_include_dir
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
358 = prepend_octave_home (OCTAVE_OCTINCLUDEDIR);
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
359
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
360 return s_oct_include_dir;
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
361 }
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
362
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
363 std::string oct_lib_dir (void)
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
364 {
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
365 static const std::string s_oct_lib_dir
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
366 = prepend_octave_exec_home (OCTAVE_OCTLIBDIR);
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
367
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
368 return s_oct_lib_dir;
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
369 }
23717
06579337237b move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents: 23713
diff changeset
370
25460
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
371 std::string oct_locale_dir (void)
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
372 {
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
373 static const std::string s_oct_locale_dir
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
374 = prepend_octave_home (OCTAVE_OCTLOCALEDIR);
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
375
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
376 return s_oct_locale_dir;
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
377 }
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
378
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
379 std::string oct_tests_dir (void)
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
380 {
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
381 static const std::string s_oct_tests_dir
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
382 = prepend_octave_home (OCTAVE_OCTTESTSDIR);
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
383
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
384 return s_oct_tests_dir;
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
385 }
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
386
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
387 std::string man_dir (void)
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
388 {
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
389 static const std::string s_man_dir
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
390 = prepend_octave_home (OCTAVE_MANDIR);
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
391
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
392 return s_man_dir;
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
393 }
23717
06579337237b move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents: 23713
diff changeset
394
25460
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
395 std::string man1_dir (void)
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
396 {
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
397 static const std::string s_man1_dir
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
398 = prepend_octave_home (OCTAVE_MAN1DIR);
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
399
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
400 return s_man1_dir;
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
401 }
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
402
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
403 std::string man1_ext (void)
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
404 {
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
405 static const std::string s_man1_ext = OCTAVE_MAN1EXT;
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
406
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
407 return s_man1_ext;
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
408 }
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
409
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
410 std::string image_dir (void)
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
411 {
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
412 static const std::string s_image_dir
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
413 = prepend_octave_home (OCTAVE_IMAGEDIR);
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
414
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
415 return s_image_dir;
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
416 }
23717
06579337237b move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents: 23713
diff changeset
417
25460
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
418 std::string local_startupfile_dir (void)
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
419 {
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
420 static const std::string s_local_startupfile_dir
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
421 = prepend_octave_home (OCTAVE_LOCALSTARTUPFILEDIR);
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
422
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
423 return s_local_startupfile_dir;
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
424 }
23717
06579337237b move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents: 23713
diff changeset
425
25460
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
426 std::string startupfile_dir (void)
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
427 {
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
428 static const std::string s_startupfile_dir
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
429 = prepend_octave_home (OCTAVE_STARTUPFILEDIR);
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
430
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
431 return s_startupfile_dir;
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
432 }
23717
06579337237b move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents: 23713
diff changeset
433
25460
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
434 std::string local_site_defaults_file (void)
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
435 {
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
436 static const std::string s_local_site_defaults_file
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
437 = get_local_site_defaults_file ();
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
438
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
439 return s_local_site_defaults_file;
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
440 }
23717
06579337237b move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents: 23713
diff changeset
441
25460
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
442 std::string site_defaults_file (void)
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
443 {
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
444 static const std::string s_site_defaults_file
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
445 = get_site_defaults_file ();
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
446
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
447 return s_site_defaults_file;
627d6bde9b8d solve installation info initialization problem differently
John W. Eaton <jwe@octave.org>
parents:
diff changeset
448 }
31605
e88a07dec498 maint: Use macros to begin/end C++ namespaces.
Rik <rik@octave.org>
parents: 30888
diff changeset
449
e88a07dec498 maint: Use macros to begin/end C++ namespaces.
Rik <rik@octave.org>
parents: 30888
diff changeset
450 OCTAVE_END_NAMESPACE(config)
23717
06579337237b move configuration variables inside octave::config namespace
John W. Eaton <jwe@octave.org>
parents: 23713
diff changeset
451
5780
cbf717bf8150 [project @ 2006-04-27 20:02:30 by jwe]
jwe
parents: 5777
diff changeset
452 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
453 doc: /* -*- texinfo -*-
30888
32d2b6604a9f doc: Ensure documentation lists output argument when it exists for functions in libinterp/
Rik <rik@octave.org>
parents: 30564
diff changeset
454 @deftypefn {} {@var{dir} =} OCTAVE_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
455 Return the name of the top-level Octave installation directory.
30888
32d2b6604a9f doc: Ensure documentation lists output argument when it exists for functions in libinterp/
Rik <rik@octave.org>
parents: 30564
diff changeset
456
23713
4feef926733a rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents: 23712
diff changeset
457 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
458 @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
459 @end deftypefn */)
5780
cbf717bf8150 [project @ 2006-04-27 20:02:30 by jwe]
jwe
parents: 5777
diff changeset
460 {
20802
8bb38ba1bad6 eliminate return statements after calls to print_usage
John W. Eaton <jwe@octave.org>
parents: 20172
diff changeset
461 if (args.length () != 0)
5823
080c08b192d8 [project @ 2006-05-19 05:32:17 by jwe]
jwe
parents: 5814
diff changeset
462 print_usage ();
5780
cbf717bf8150 [project @ 2006-04-27 20:02:30 by jwe]
jwe
parents: 5777
diff changeset
463
29961
7d6709900da7 eliminate octave:: namespace tags in DEFUN and DEFMETHOD and more
John W. Eaton <jwe@octave.org>
parents: 29960
diff changeset
464 return ovl (config::octave_home ());
5749
26beffa9f66f [project @ 2006-04-07 20:35:07 by jwe]
jwe
parents: 5451
diff changeset
465 }
3446
5ee5afb3981a [project @ 2000-01-17 09:42:43 by jwe]
jwe
parents: 3402
diff changeset
466
12851
7fce673b934a codesprint: new tests for defaults.cc
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
467 /*
14429
eff4a5933e28 Update %!tests in src/ directory with Octave coding conventions.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
468 %!assert (ischar (OCTAVE_HOME ()))
eff4a5933e28 Update %!tests in src/ directory with Octave coding conventions.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
469 %!error OCTAVE_HOME (1)
12851
7fce673b934a codesprint: new tests for defaults.cc
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
470 */
7fce673b934a codesprint: new tests for defaults.cc
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
471
23713
4feef926733a rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents: 23712
diff changeset
472 DEFUN (OCTAVE_EXEC_HOME, args, ,
4feef926733a rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents: 23712
diff changeset
473 doc: /* -*- texinfo -*-
30888
32d2b6604a9f doc: Ensure documentation lists output argument when it exists for functions in libinterp/
Rik <rik@octave.org>
parents: 30564
diff changeset
474 @deftypefn {} {@var{dir} =} OCTAVE_EXEC_HOME ()
23713
4feef926733a rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents: 23712
diff changeset
475 Return the name of the top-level Octave installation directory for
30888
32d2b6604a9f doc: Ensure documentation lists output argument when it exists for functions in libinterp/
Rik <rik@octave.org>
parents: 30564
diff changeset
476 architecture-dependent files.
32d2b6604a9f doc: Ensure documentation lists output argument when it exists for functions in libinterp/
Rik <rik@octave.org>
parents: 30564
diff changeset
477
32d2b6604a9f doc: Ensure documentation lists output argument when it exists for functions in libinterp/
Rik <rik@octave.org>
parents: 30564
diff changeset
478 If not specified separately, the value is the same as OCTAVE_HOME@.
32d2b6604a9f doc: Ensure documentation lists output argument when it exists for functions in libinterp/
Rik <rik@octave.org>
parents: 30564
diff changeset
479 OCTAVE_EXEC_HOME corresponds to the configuration variable @var{exec_prefix}.
23713
4feef926733a rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents: 23712
diff changeset
480 @seealso{EXEC_PATH, IMAGE_PATH, OCTAVE_HOME}
4feef926733a rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents: 23712
diff changeset
481 @end deftypefn */)
4feef926733a rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents: 23712
diff changeset
482 {
4feef926733a rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents: 23712
diff changeset
483 if (args.length () != 0)
4feef926733a rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents: 23712
diff changeset
484 print_usage ();
4feef926733a rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents: 23712
diff changeset
485
29961
7d6709900da7 eliminate octave:: namespace tags in DEFUN and DEFMETHOD and more
John W. Eaton <jwe@octave.org>
parents: 29960
diff changeset
486 return ovl (config::octave_exec_home ());
23713
4feef926733a rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents: 23712
diff changeset
487 }
4feef926733a rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents: 23712
diff changeset
488
4feef926733a rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents: 23712
diff changeset
489 /*
4feef926733a rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents: 23712
diff changeset
490 %!assert (ischar (OCTAVE_EXEC_HOME ()))
4feef926733a rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents: 23712
diff changeset
491 %!error OCTAVE_EXEC_HOME (1)
4feef926733a rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents: 23712
diff changeset
492 */
4feef926733a rename files missed in previous commit
John W. Eaton <jwe@octave.org>
parents: 23712
diff changeset
493
5749
26beffa9f66f [project @ 2006-04-07 20:35:07 by jwe]
jwe
parents: 5451
diff changeset
494 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
495 doc: /* -*- texinfo -*-
30888
32d2b6604a9f doc: Ensure documentation lists output argument when it exists for functions in libinterp/
Rik <rik@octave.org>
parents: 30564
diff changeset
496 @deftypefn {} {@var{verstr} =} OCTAVE_VERSION ()
21966
112b20240c87 move docstrings in C++ files out of C strings and into comments
John W. Eaton <jwe@octave.org>
parents: 21962
diff changeset
497 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
498 @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
499 @end deftypefn */)
5749
26beffa9f66f [project @ 2006-04-07 20:35:07 by jwe]
jwe
parents: 5451
diff changeset
500 {
20802
8bb38ba1bad6 eliminate return statements after calls to print_usage
John W. Eaton <jwe@octave.org>
parents: 20172
diff changeset
501 if (args.length () != 0)
5823
080c08b192d8 [project @ 2006-05-19 05:32:17 by jwe]
jwe
parents: 5814
diff changeset
502 print_usage ();
5749
26beffa9f66f [project @ 2006-04-07 20:35:07 by jwe]
jwe
parents: 5451
diff changeset
503
21127
df7891224709 maint: Use "return ovl (...)" in DEFUN macros.
Rik <rik@octave.org>
parents: 21100
diff changeset
504 return ovl (OCTAVE_VERSION);
2203
88a4d3580427 [project @ 1996-05-15 06:09:30 by jwe]
jwe
parents:
diff changeset
505 }
12851
7fce673b934a codesprint: new tests for defaults.cc
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
506
7fce673b934a codesprint: new tests for defaults.cc
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
507 /*
14429
eff4a5933e28 Update %!tests in src/ directory with Octave coding conventions.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
508 %!assert (ischar (OCTAVE_VERSION ()))
eff4a5933e28 Update %!tests in src/ directory with Octave coding conventions.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
509 %!error OCTAVE_VERSION (1)
12851
7fce673b934a codesprint: new tests for defaults.cc
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
510 */
29462
280defaf2023 pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29358
diff changeset
511
280defaf2023 pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29358
diff changeset
512 DEFUN (user_config_dir, args, ,
280defaf2023 pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29358
diff changeset
513 doc: /* -*- texinfo -*-
30354
c980f938fdd8 doc: grammarcheck C++ files in libinterp/ directory ahead of 7.1 release.
Rik <rik@octave.org>
parents: 29961
diff changeset
514 @deftypefn {} {cfg_dir =} user_config_dir ()
29462
280defaf2023 pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29358
diff changeset
515 Return the (platform-specific) directory for user configuration.
280defaf2023 pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29358
diff changeset
516 @seealso{user_data_dir}
280defaf2023 pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29358
diff changeset
517 @end deftypefn */)
280defaf2023 pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29358
diff changeset
518 {
280defaf2023 pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29358
diff changeset
519 if (args.length () != 0)
280defaf2023 pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29358
diff changeset
520 print_usage ();
280defaf2023 pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29358
diff changeset
521
29961
7d6709900da7 eliminate octave:: namespace tags in DEFUN and DEFMETHOD and more
John W. Eaton <jwe@octave.org>
parents: 29960
diff changeset
522 return ovl (sys::env::get_user_config_directory ());
29462
280defaf2023 pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29358
diff changeset
523 }
280defaf2023 pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29358
diff changeset
524
280defaf2023 pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29358
diff changeset
525 /*
280defaf2023 pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29358
diff changeset
526 %!assert (ischar (user_config_dir ()))
280defaf2023 pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29358
diff changeset
527 %!error user_config_dir (1)
280defaf2023 pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29358
diff changeset
528 */
280defaf2023 pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29358
diff changeset
529
280defaf2023 pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29358
diff changeset
530 DEFUN (user_data_dir, args, ,
280defaf2023 pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29358
diff changeset
531 doc: /* -*- texinfo -*-
30354
c980f938fdd8 doc: grammarcheck C++ files in libinterp/ directory ahead of 7.1 release.
Rik <rik@octave.org>
parents: 29961
diff changeset
532 @deftypefn {} {data_dir =} user_data_dir ()
29462
280defaf2023 pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29358
diff changeset
533 Return the (platform-specific) directory for user data.
280defaf2023 pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29358
diff changeset
534 @seealso{user_config_dir}
280defaf2023 pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29358
diff changeset
535 @end deftypefn */)
280defaf2023 pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29358
diff changeset
536 {
280defaf2023 pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29358
diff changeset
537 if (args.length () != 0)
280defaf2023 pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29358
diff changeset
538 print_usage ();
280defaf2023 pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29358
diff changeset
539
29961
7d6709900da7 eliminate octave:: namespace tags in DEFUN and DEFMETHOD and more
John W. Eaton <jwe@octave.org>
parents: 29960
diff changeset
540 return ovl (sys::env::get_user_data_directory ());
29462
280defaf2023 pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29358
diff changeset
541 }
280defaf2023 pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29358
diff changeset
542
280defaf2023 pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29358
diff changeset
543 /*
280defaf2023 pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29358
diff changeset
544 %!assert (ischar (user_data_dir ()))
280defaf2023 pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29358
diff changeset
545 %!error user_data_dir (1)
280defaf2023 pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29358
diff changeset
546 */
280defaf2023 pkg.m: Install local packages in version dependent path (bug #58299).
Markus Mützel <markus.muetzel@gmx.de>
parents: 29358
diff changeset
547
31605
e88a07dec498 maint: Use macros to begin/end C++ namespaces.
Rik <rik@octave.org>
parents: 30888
diff changeset
548 OCTAVE_END_NAMESPACE(octave)