GNU Octave  4.0.0
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.h>
#include <sys/types.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%
 
#define WEXITSTATUS(stat_val)   (static_cast<unsigned> (stat_val) >> 8)
 
#define WIFEXITED(stat_val)   (((stat_val) & 255) == 0)
 

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 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 63 of file mkoctfile.in.cc.

Referenced by initialize().

#define OCTAVE_VERSION   %OCTAVE_CONF_VERSION%

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

#define WEXITSTATUS (   stat_val)    (static_cast<unsigned> (stat_val) >> 8)

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

Referenced by run_command().

#define WIFEXITED (   stat_val)    (((stat_val) & 255) == 0)

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

Referenced by run_command().

Function Documentation

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

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

References max().

Referenced by main().

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

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

Referenced by main().

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

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

Referenced by main().

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

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

Referenced by initialize().

static void initialize ( void  )
static
bool is_true ( const std::string &  s)

Definition at line 373 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 102 of file mkoctfile.in.cc.

Referenced by initialize(), and main().

static int run_command ( const std::string &  cmd)
static

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

References debug, WEXITSTATUS, and WIFEXITED.

Referenced by main().

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

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

Referenced by main().

Variable Documentation

bool debug = false
static

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

Referenced by main(), and run_command().

std::string help_msg
static

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

Referenced by main().

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

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

Referenced by main().

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

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

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

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

Referenced by main().