GNU Octave  4.2.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
oct-uname.cc
Go to the documentation of this file.
1 /*
2 
3 Copyright (C) 2005-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 <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  {
54  }
55  }
56  }
57 }
Octave interface to the compression and uncompression libraries.
Definition: aepbalance.cc:47
std::string m_sysname
Definition: oct-uname.h:83
std::string sysname(void) const
Definition: oct-uname.h:72
std::string version(void) const
Definition: oct-uname.h:75
int octave_uname_wrapper(char **sysname, char **nodename, char **release, char **version, char **machine)
Definition: uname-wrapper.c:38
std::string m_version
Definition: oct-uname.h:86
std::string nodename(void) const
Definition: oct-uname.h:73
std::string msg
Definition: oct-uname.h:89
void init(void)
Definition: oct-uname.cc:38
std::string m_release
Definition: oct-uname.h:85
std::string m_nodename
Definition: oct-uname.h:84
std::string m_machine
Definition: oct-uname.h:87
std::string machine(void) const
Definition: oct-uname.h:76
std::string release(void) const
Definition: oct-uname.h:74