GNU Octave  6.2.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
mkoctfile.in.cc File Reference
#include <string>
#include <cstring>
#include <map>
#include <list>
#include <algorithm>
#include <iostream>
#include <fstream>
#include <sstream>
#include <vector>
#include <cstdlib>
#include "mkostemps-wrapper.h"
#include "uniconv-wrappers.h"
#include "unistd-wrappers.h"
#include "wait-wrappers.h"
#include "shared-fcns.h"
Include dependency graph for mkoctfile.in.cc:

Go to the source code of this file.

Macros

#define OCTAVE_EXEC_PREFIX   %OCTAVE_CONF_EXEC_PREFIX%
 
#define OCTAVE_PREFIX   %OCTAVE_CONF_PREFIX%
 
#define OCTAVE_VERSION   %OCTAVE_CONF_VERSION%
 

Functions

static std::string basename (const std::string &s, bool strip_path=false)
 
static void clean_up_tmp_files (const std::list< std::string > &tmp_files)
 
bool ends_with (const std::string &s, const std::string &suffix)
 
static std::string get_line (FILE *fp)
 
static std::string get_temp_directory (void)
 
static std::string get_variable (const char *name, const std::string &defval)
 
static void initialize (void)
 
bool is_true (const std::string &s)
 
int main (int argc, char **argv)
 
static std::string quote_path (const std::string &s)
 
static std::string replace_prefix (std::string s)
 
static int run_command (const std::string &cmd, bool printonly=false)
 
bool starts_with (const std::string &s, const std::string &prefix)
 
static std::string tmp_objfile_name (void)
 

Variables

static bool debug = false
 
static std::string help_msg
 
static std::string usage_msg = "usage: mkoctfile [options] file ..."
 
static std::map< std::string, std::string > vars
 
static std::string version_msg = "mkoctfile, version " %OCTAVE_CONF_VERSION%
 

Macro Definition Documentation

◆ OCTAVE_EXEC_PREFIX

#define OCTAVE_EXEC_PREFIX   %OCTAVE_CONF_EXEC_PREFIX%

Definition at line 80 of file mkoctfile.in.cc.

◆ OCTAVE_PREFIX

#define OCTAVE_PREFIX   %OCTAVE_CONF_PREFIX%

Definition at line 76 of file mkoctfile.in.cc.

◆ OCTAVE_VERSION

#define OCTAVE_VERSION   %OCTAVE_CONF_VERSION%

Definition at line 72 of file mkoctfile.in.cc.

Function Documentation

◆ basename()

static std::string basename ( const std::string &  s,
bool  strip_path = false 
)
static

Definition at line 528 of file mkoctfile.in.cc.

References max(), and retval.

Referenced by main(), unique_symbol_name(), and octave::xzip().

◆ clean_up_tmp_files()

static void clean_up_tmp_files ( const std::list< std::string > &  tmp_files)
static

Definition at line 653 of file mkoctfile.in.cc.

References octave_unlink_wrapper().

Referenced by main().

◆ ends_with()

bool ends_with ( const std::string &  s,
const std::string &  suffix 
)
inline

Definition at line 560 of file mkoctfile.in.cc.

Referenced by main().

◆ get_line()

static std::string get_line ( FILE *  fp)
static

Definition at line 122 of file mkoctfile.in.cc.

Referenced by main().

◆ get_temp_directory()

static std::string get_temp_directory ( void  )
static

Definition at line 593 of file mkoctfile.in.cc.

References octave_getenv().

Referenced by tmp_objfile_name().

◆ get_variable()

static std::string get_variable ( const char *  name,
const std::string &  defval 
)
static

Definition at line 140 of file mkoctfile.in.cc.

References name.

Referenced by initialize().

◆ initialize()

◆ is_true()

bool is_true ( const std::string &  s)

Definition at line 587 of file mkoctfile.in.cc.

Referenced by Fcellstr(), Fmkstemp(), Fopenvar(), and main().

◆ main()

◆ quote_path()

static std::string quote_path ( const std::string &  s)
static

Definition at line 151 of file mkoctfile.in.cc.

Referenced by initialize(), and main().

◆ replace_prefix()

static std::string replace_prefix ( std::string  s)
static

Definition at line 160 of file mkoctfile.in.cc.

References prepend_octave_exec_home().

Referenced by initialize().

◆ run_command()

static int run_command ( const std::string &  cmd,
bool  printonly = false 
)
static

Definition at line 567 of file mkoctfile.in.cc.

References debug, octave_wexitstatus_wrapper(), and octave_wifexited_wrapper().

Referenced by main().

◆ starts_with()

bool starts_with ( const std::string &  s,
const std::string &  prefix 
)
inline

Definition at line 554 of file mkoctfile.in.cc.

Referenced by main().

◆ tmp_objfile_name()

static std::string tmp_objfile_name ( void  )
static

Definition at line 633 of file mkoctfile.in.cc.

References get_temp_directory(), octave_mkostemps_wrapper(), and retval.

Referenced by main().

Variable Documentation

◆ debug

bool debug = false
static

Definition at line 378 of file mkoctfile.in.cc.

Referenced by main(), and run_command().

◆ help_msg

std::string help_msg
static

Definition at line 380 of file mkoctfile.in.cc.

Referenced by main().

◆ usage_msg

std::string usage_msg = "usage: mkoctfile [options] file ..."
static

Definition at line 374 of file mkoctfile.in.cc.

Referenced by main().

◆ vars

std::map<std::string, std::string> vars
static

Definition at line 69 of file mkoctfile.in.cc.

Referenced by initialize(), and main().

◆ version_msg

std::string version_msg = "mkoctfile, version " %OCTAVE_CONF_VERSION%
static

Definition at line 376 of file mkoctfile.in.cc.

Referenced by main().