GNU Octave
4.2.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
main-gui.cc
Go to the documentation of this file.
1
/*
2
3
Copyright (C) 2012-2017 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 the
9
Free Software Foundation; either version 3 of the License, or (at your
10
option) any later version.
11
12
Octave is distributed in the hope that it will be useful, but WITHOUT
13
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15
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
<http://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 "
liboctgui-build-info.h
"
37
38
#include "
oct-env.h
"
39
40
#include "
defaults.h
"
41
#include "
octave.h
"
42
#include "
octave-build-info.h
"
43
#include "
octave-gui.h
"
44
#include "
sysdep.h
"
45
46
static
void
47
check_hg_versions
(
void
)
48
{
49
bool
ok =
true
;
50
51
// Each library and executable has its own definition of the hg
52
// id. They should always match but may be different because of a
53
// botched installation or incorrect LD_LIBRARY_PATH or some other
54
// unusual problem.
55
56
std::string
octave_id =
octave_hg_id
();
57
std::string
liboctave_id =
liboctave_hg_id
();
58
std::string
liboctinterp_id =
liboctinterp_hg_id
();
59
std::string
liboctgui_id =
liboctgui_hg_id
();
60
61
if
(octave_id != liboctave_id)
62
{
63
std::cerr <<
"octave hg id ("
64
<< octave_id
65
<<
") does not match liboctave hg id ("
66
<< liboctave_id
67
<<
")"
<< std::endl;
68
ok =
false
;
69
}
70
71
if
(octave_id != liboctinterp_id)
72
{
73
std::cerr <<
"octave hg id ("
74
<< octave_id
75
<<
") does not match liboctinterp hg id ("
76
<< liboctinterp_id
77
<<
")"
<< std::endl;
78
ok =
false
;
79
}
80
81
if
(octave_id != liboctgui_id)
82
{
83
std::cerr <<
"octave hg id ("
84
<< octave_id
85
<<
") does not match liboctgui hg id ("
86
<< liboctgui_id
87
<<
")"
<< std::endl;
88
ok =
false
;
89
}
90
91
if
(! ok)
92
exit (1);
93
}
94
95
int
96
main
(
int
argc
,
char
**
argv
)
97
{
98
check_hg_versions
();
99
100
octave::sys::env::set_program_name
(argv[0]);
101
102
octave::gui_application
app (argc, argv);
103
104
return
app.
execute
();
105
}
liboctgui_hg_id
std::string liboctgui_hg_id(void)
Definition:
liboctgui-build-info.cc:31
oct-env.h
liboctinterp_hg_id
std::string liboctinterp_hg_id(void)
Definition:
liboctinterp-build-info.cc:31
main
int main(int argc, char **argv)
Definition:
main-gui.cc:96
argc
int argc
Definition:
load-save.cc:633
octave::gui_application::execute
int execute(void)
Definition:
octave-gui.cc:125
liboctinterp-build-info.h
octave-gui.h
sysdep.h
argv
string_vector argv
Definition:
load-save.cc:635
liboctgui-build-info.h
check_hg_versions
static void check_hg_versions(void)
Definition:
main-gui.cc:47
octave_hg_id
std::string octave_hg_id(void)
Definition:
octave-build-info.cc:31
liboctave-build-info.h
octave::sys::env::set_program_name
static void set_program_name(const std::string &s)
Definition:
oct-env.cc:171
octave::gui_application
Definition:
octave-gui.h:30
liboctave_hg_id
std::string liboctave_hg_id(void)
Definition:
liboctave-build-info.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:854
octave.h
octave-build-info.h
defaults.h
Generated on Wed May 10 2017 15:43:00 for GNU Octave by
1.8.8