GNU Octave
4.4.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
main-cli.cc
Go to the documentation of this file.
1
/*
2
3
Copyright (C) 2012-2018 John W. Eaton
4
5
This file is part of Octave.
6
7
Octave is free software: you can redistribute it and/or modify it
8
under the terms of the GNU General Public License as published by
9
the Free Software Foundation, either version 3 of the License, or
10
(at your option) any later version.
11
12
Octave is distributed in the hope that it will be useful, but
13
WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
GNU General Public License for more details.
16
17
You should have received a copy of the GNU General Public License
18
along with Octave; see the file COPYING. If not, see
19
<https://www.gnu.org/licenses/>.
20
21
*/
22
23
#if defined (HAVE_CONFIG_H)
24
# include "config.h"
25
#endif
26
27
#include <cstdlib>
28
29
#include <iostream>
30
#include <string>
31
32
#include "
liboctave-build-info.h
"
33
34
#include "
liboctinterp-build-info.h
"
35
36
#include "
oct-env.h
"
37
#include "
signal-wrappers.h
"
38
39
#include "
defaults.h
"
40
#include "
octave.h
"
41
#include "
octave-build-info.h
"
42
#include "
sysdep.h
"
43
44
static
void
45
check_hg_versions
(
void
)
46
{
47
bool
ok =
true
;
48
49
// Each library and executable has its own definition of the hg
50
// id. They should always match but may be different because of a
51
// botched installation or incorrect LD_LIBRARY_PATH or some other
52
// unusual problem.
53
54
std::string
octave_id =
octave_hg_id
();
55
std::string
liboctave_id =
liboctave_hg_id
();
56
std::string
liboctinterp_id =
liboctinterp_hg_id
();
57
58
if
(octave_id != liboctave_id)
59
{
60
std::cerr <<
"octave hg id ("
61
<< octave_id
62
<<
") does not match liboctave hg id ("
63
<< liboctave_id
64
<<
')'
<< std::endl;
65
ok =
false
;
66
}
67
68
if
(octave_id != liboctinterp_id)
69
{
70
std::cerr <<
"octave hg id ("
71
<< octave_id
72
<<
") does not match liboctinterp hg id ("
73
<< liboctinterp_id
74
<<
')'
<< std::endl;
75
ok =
false
;
76
}
77
78
if
(! ok)
79
exit (1);
80
}
81
82
int
83
main
(
int
argc
,
char
**
argv
)
84
{
85
check_hg_versions
();
86
87
octave_block_async_signals
();
88
89
octave::sys::env::set_program_name
(
argv
[0]);
90
91
octave::cli_application app (
argc
,
argv
);
92
93
return
app.execute ();
94
}
liboctave_hg_id
OCTAVE_API std::string liboctave_hg_id(void)
Definition:
liboctave-build-info.in.cc:31
main
int main(int argc, char **argv)
Definition:
main-cli.cc:83
check_hg_versions
static void check_hg_versions(void)
Definition:
main-cli.cc:45
oct-env.h
argc
int argc
Definition:
load-save.cc:646
liboctinterp-build-info.h
sysdep.h
argv
string_vector argv
Definition:
load-save.cc:648
signal-wrappers.h
liboctave-build-info.h
octave_block_async_signals
void octave_block_async_signals(void)
Definition:
signal-wrappers.c:659
octave::sys::env::set_program_name
static void set_program_name(const std::string &s)
Definition:
oct-env.cc:171
liboctinterp_hg_id
OCTAVE_API std::string liboctinterp_hg_id(void)
Definition:
liboctinterp-build-info.in.cc:31
octave_hg_id
std::string octave_hg_id(void)
Definition:
octave-build-info.in.cc:31
string
If this string is the system will ring the terminal sometimes it is useful to be able to print the original representation of the string
Definition:
utils.cc:888
octave.h
octave-build-info.h
defaults.h
src
main-cli.cc
Generated on Sat Sep 1 2018 14:01:47 for GNU Octave by
1.8.14