Lolly 1.4.27
Loading...
Searching...
No Matches
sys_utils.hpp
Go to the documentation of this file.
1
2/******************************************************************************
3 * MODULE : sys_utils.hpp
4 * DESCRIPTION: system utilities
5 * COPYRIGHT : (C) 1999-2016 Joris van der Hoeven, Denis Raux
6 *******************************************************************************
7 * This software falls under the GNU general public license version 3 or later.
8 * It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE
9 * in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>.
10 ******************************************************************************/
11
12#ifndef SYS_UTILS_H
13#define SYS_UTILS_H
14
15#include "array.hpp"
16#include "string.hpp"
17
18#if defined(OS_MINGW) || defined(_WIN32) || defined(_WIN64)
19#define URL_CONCATER '\\'
20#define URL_SEPARATOR ';'
21#else
22#define URL_CONCATER '/'
23#define URL_SEPARATOR ':'
24#endif
25
26string get_env (string var);
27void set_env (string var, string with);
28
29string get_user_login ();
30string get_user_name ();
31
32bool os_win ();
33bool os_mingw ();
34bool os_macos ();
35bool os_wasm ();
36
38
41namespace lolly {
42void init_tbox ();
43string get_stacktrace (unsigned int max_frames= 127);
44} // namespace lolly
45
46#endif // defined SYS_UTILS_H
The list class represents a linked list.
Definition list.hpp:48
unsigned int SN
Definition minmax.hpp:11
void init_tbox()
string get_stacktrace(unsigned int max_frames)
string get_user_name()
Definition sys_utils.cpp:79
bool os_macos()
bool os_mingw()
array< string > evaluate_system(array< string > arg, array< int > fd_in, array< string > in, array< int > fd_out)
SN get_process_id()
bool os_win()
Definition sys_utils.cpp:94
void set_env(string var, string with)
Definition sys_utils.cpp:49
string get_env(string var)
Definition sys_utils.cpp:25
string get_user_login()
Definition sys_utils.cpp:64
bool os_wasm()