GNU Octave  8.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
lo-sysdep.cc File Reference
#include <cstdlib>
#include <locale>
#include <codecvt>
#include "dir-ops.h"
#include "file-ops.h"
#include "lo-error.h"
#include "lo-sysdep.h"
#include "localcharset-wrapper.h"
#include "putenv-wrapper.h"
#include "unistd-wrappers.h"
#include "unsetenv-wrapper.h"
Include dependency graph for lo-sysdep.cc:

Go to the source code of this file.

Functions

int chdir (const std::string &path_arg)
 
std::FILE * fopen (const std::string &filename, const std::string &mode)
 
std::FILE * fopen_tmp (const std::string &name, const std::string &mode)
 
std::fstream fstream (const std::string &filename, const std::ios::openmode mode)
 
std::string get_ASCII_filename (const std::string &orig_file_name, const bool allow_locale)
 
bool get_dirlist (const std::string &dirname, string_vector &dirlist, std::string &msg)
 
std::string getcwd (void)
 
std::string getenv_wrapper (const std::string &name)
 
std::ifstream ifstream (const std::string &filename, const std::ios::openmode mode)
 
std::ofstream ofstream (const std::string &filename, const std::ios::openmode mode)
 
void putenv_wrapper (const std::string &name, const std::string &value)
 
int system (const std::string &cmd_str)
 
std::string u8_from_wstring (const std::wstring &wchar_string)
 
std::wstring u8_to_wstring (const std::string &utf8_string)
 
int unsetenv_wrapper (const std::string &name)
 

Function Documentation

◆ chdir()

int chdir ( const std::string &  path_arg)

Definition at line 106 of file lo-sysdep.cc.

References octave_chdir_wrapper(), and tilde_expand().

Referenced by interpreter::chdir(), env::do_chdir(), and octave_chdir_wrapper().

◆ fopen()

std::FILE* fopen ( const std::string &  filename,
const std::string &  mode 
)

◆ fopen_tmp()

std::FILE* fopen_tmp ( const std::string &  name,
const std::string &  mode 
)

Definition at line 386 of file lo-sysdep.cc.

References fopen(), and octave_unlink_wrapper().

Referenced by Ftmpfile().

◆ fstream()

std::fstream fstream ( const std::string &  filename,
const std::ios::openmode  mode 
)

Definition at line 410 of file lo-sysdep.cc.

References u8_to_wstring().

Referenced by history_system::do_edit_history().

◆ get_ASCII_filename()

◆ get_dirlist()

bool get_dirlist ( const std::string &  dirname,
string_vector dirlist,
std::string &  msg 
)

◆ getcwd()

std::string getcwd ( void  )

Definition at line 71 of file lo-sysdep.cc.

References free(), octave_getcwd_wrapper(), and u8_from_wstring().

Referenced by env::do_getcwd(), and octave_getcwd_wrapper().

◆ getenv_wrapper()

std::string getenv_wrapper ( const std::string &  name)

Definition at line 488 of file lo-sysdep.cc.

References u8_from_wstring(), and u8_to_wstring().

Referenced by env::do_getenv().

◆ ifstream()

◆ ofstream()

std::ofstream ofstream ( const std::string &  filename,
const std::ios::openmode  mode 
)

◆ putenv_wrapper()

void putenv_wrapper ( const std::string &  name,
const std::string &  value 
)

Definition at line 452 of file lo-sysdep.cc.

References len, malloc(), octave_putenv_wrapper(), and u8_to_wstring().

Referenced by env::putenv(), and unsetenv_wrapper().

◆ system()

int system ( const std::string &  cmd_str)

◆ u8_from_wstring()

std::string u8_from_wstring ( const std::wstring &  wchar_string)

◆ u8_to_wstring()

◆ unsetenv_wrapper()

int unsetenv_wrapper ( const std::string &  name)

Definition at line 501 of file lo-sysdep.cc.

References octave_unsetenv_wrapper(), putenv_wrapper(), and u8_to_wstring().

Referenced by Funsetenv().