GNU Octave
4.4.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
oct-uname.cc
Go to the documentation of this file.
1
/*
2
3
Copyright (C) 2005-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 <cerrno>
28
#include <cstring>
29
30
#include "
oct-uname.h
"
31
#include "
uname-wrapper.h
"
32
33
namespace
octave
34
{
35
namespace
sys
36
{
37
void
38
uname::init
(
void
)
39
{
40
char
*
sysname
, *
nodename
, *
release
, *
version
, *
machine
;
41
42
err
=
octave_uname_wrapper
(&
sysname
, &
nodename
, &
release
,
43
&
version
, &
machine
);
44
45
if
(
err
< 0)
46
msg
= std::strerror (errno);
47
else
48
{
49
m_sysname
=
sysname
;
50
m_nodename
=
nodename
;
51
m_release
=
release
;
52
m_version
=
version
;
53
m_machine
=
machine
;
54
msg
=
""
;
55
}
56
}
57
}
58
}
octave::sys::uname::err
int err
Definition:
oct-uname.h:90
octave
Definition:
aepbalance.cc:44
octave::sys::uname::m_sysname
std::string m_sysname
Definition:
oct-uname.h:83
octave::sys::uname::version
std::string version(void) const
Definition:
oct-uname.h:75
octave_uname_wrapper
int octave_uname_wrapper(char **sysname, char **nodename, char **release, char **version, char **machine)
Definition:
uname-wrapper.c:38
octave::sys::uname::sysname
std::string sysname(void) const
Definition:
oct-uname.h:72
octave::sys::uname::nodename
std::string nodename(void) const
Definition:
oct-uname.h:73
octave::sys::uname::m_version
std::string m_version
Definition:
oct-uname.h:86
oct-uname.h
octave::sys::uname::msg
std::string msg
Definition:
oct-uname.h:89
octave::sys::uname::init
void init(void)
Definition:
oct-uname.cc:38
octave::sys::uname::release
std::string release(void) const
Definition:
oct-uname.h:74
octave::sys::uname::m_release
std::string m_release
Definition:
oct-uname.h:85
octave::sys::uname::m_nodename
std::string m_nodename
Definition:
oct-uname.h:84
octave::sys::uname::machine
std::string machine(void) const
Definition:
oct-uname.h:76
octave::sys::uname::m_machine
std::string m_machine
Definition:
oct-uname.h:87
uname-wrapper.h
liboctave
system
oct-uname.cc
Generated on Sat Sep 1 2018 14:01:46 for GNU Octave by
1.8.14