powerd++
0.4.4
|
File local scope. More...
Enumerations | |
enum | OE { OE::USAGE, OE::FILE_IN, OE::FILE_OUT, OE::CMD, OE::OPT_NOOPT = CMD, OE::OPT_UNKNOWN, OE::OPT_DASH, OE::OPT_LDASH, OE::OPT_DONE } |
An enum for command line parsing. More... | |
Functions | |
const char * | filename (char const *const path) |
Performs very rudimentary file name argument checks. More... | |
void | execute (char const *const file, char *const argv[]) |
Executes the given command, substituting this process. More... | |
void | set_library_path (int const argc, char *const argv[]) |
If running from an explicit path add the path to the library search path. More... | |
Variables | |
const char *const | USAGE = "[-h] [-i file] [-o file] command [...]" |
The short usage string. | |
const Parameter< OE > | PARAMETERS [] |
Definitions of command line parameters. More... | |
File local scope.
|
strong |
void anonymous_namespace{loadplay.cpp}::execute | ( | char const *const | file, |
char *const | argv[] | ||
) |
Executes the given command, substituting this process.
This function is a wrapper around execvp(3) and does not return.
file | The command to execute, looked up in PATH if no path is provided |
argv | The command line arguments of the command |
errors::Exception{Exit::EEXEC} |
const char* anonymous_namespace{loadplay.cpp}::filename | ( | char const *const | path | ) |
Performs very rudimentary file name argument checks.
path | The file path to check |
void anonymous_namespace{loadplay.cpp}::set_library_path | ( | int const | argc, |
char *const | argv[] | ||
) |
If running from an explicit path add the path to the library search path.
This function facilitates calling loadplay
directly from the build directory for testing and allows it to pick up libloadplay.so
from the same directory.
argc,argv | The command line arguments provided to loadplay |
Definitions of command line parameters.