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
Macros | Functions | Variables
mkoctfile.in.cc File Reference
#include <string>
#include <cstring>
#include <map>
#include <list>
#include <algorithm>
#include <iostream>
#include <fstream>
#include <vector>
#include <cstdlib>
#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_PREFIX   %OCTAVE_CONF_PREFIX%
 
#define OCTAVE_VERSION   %OCTAVE_CONF_VERSION%
 

Functions

static std::string basename (const std::string &s, bool strip_path=false)
 
bool ends_with (const std::string &s, const std::string &suffix)
 
static std::string get_line (FILE *fp)
 
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 int run_command (const std::string &cmd, bool printonly=false)
 
bool starts_with (const std::string &s, const std::string &prefix)
 

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

#define OCTAVE_PREFIX   %OCTAVE_CONF_PREFIX%

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

Referenced by initialize().

#define OCTAVE_VERSION   %OCTAVE_CONF_VERSION%

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

Function Documentation

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

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

References max(), retval, s, and string.

Referenced by main().

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

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

Referenced by main().

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

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

References c, and string.

Referenced by main().

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

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

References string, and val.

Referenced by initialize().

static void initialize ( void  )
static

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

References get_octave_home(), get_variable(), OCTAVE_PREFIX, quote_path(), string, and subst_octave_home().

Referenced by main().

bool is_true ( const std::string s)

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

Referenced by main().

int main ( int  argc,
char **  argv 
)
static std::string quote_path ( const std::string s)
static

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

References s.

Referenced by initialize(), and main().

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

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

References octave_wexitstatus_wrapper(), octave_wifexited_wrapper(), result, and system().

Referenced by main().

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

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

Referenced by main().

Variable Documentation

bool debug = false
static

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

std::string help_msg
static

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

Referenced by main().

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

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

Referenced by main().

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

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

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

Referenced by main().