![]() |
STASIS
A pipeline delivery generator
|

Functions | |
| void | runtime_export (RuntimeEnv *env, char **keys) |
| RuntimeEnv * | runtime_copy (char **env) |
| int | runtime_replace (RuntimeEnv **dest, char **src) |
| ssize_t | runtime_contains (RuntimeEnv *env, const char *key) |
| char * | runtime_get (RuntimeEnv *env, const char *key) |
| char * | runtime_expand_var (RuntimeEnv *env, char *input) |
| void | runtime_set (RuntimeEnv *env, const char *_key, char *_value) |
| void | runtime_apply (RuntimeEnv *env) |
| void | runtime_free (RuntimeEnv *env) |
| void runtime_apply | ( | RuntimeEnv * | env | ) |
Update the global environ array with data from RuntimeEnv
| env | RuntimeEnv structure |

| ssize_t runtime_contains | ( | RuntimeEnv * | env, |
| const char * | key ) |
Determine whether a key exists in the runtime environment
Example:
| env | RuntimeEnv structure |
| key | Environment variable string |

| RuntimeEnv * runtime_copy | ( | char ** | env | ) |
Populate a RuntimeEnv structure
Example:
| env | Array of strings in var=value format |
RuntimeEnv structure 
| char * runtime_expand_var | ( | RuntimeEnv * | env, |
| char * | input ) |
Parse an input string and expand any environment variable(s) found
Example:
| env | RuntimeEnv structure |
| input | String to parse |
NULL 
| void runtime_export | ( | RuntimeEnv * | env, |
| char ** | keys ) |
Print a shell-specific listing of environment variables to stdout
Example:
Usage:
Example of exporting specific keys from the environment:
| env | RuntimeEnv structure |
| keys | Array of keys to export. A value of NULL exports all environment keys |

| void runtime_free | ( | RuntimeEnv * | env | ) |
Free RuntimeEnv allocated by runtime_copy
| env | RuntimeEnv structure |

| char * runtime_get | ( | RuntimeEnv * | env, |
| const char * | key ) |
Retrieve the value of a runtime environment variable
Example:
| env | RuntimeEnv structure |
| key | Environment variable string |
NULL 
| int runtime_replace | ( | RuntimeEnv ** | dest, |
| char ** | src ) |
Replace the contents of dest with src
| dest | pointer of type RuntimeEnv |
| src | pointer to environment array |

| void runtime_set | ( | RuntimeEnv * | env, |
| const char * | _key, | ||
| char * | _value ) |
Set a runtime environment variable.
Note: _value is passed through runtime_expand_var to provide shell expansion
Example:
| env | RuntimeEnv structure |
| _key | Environment variable to set |
| _value | New environment variable value |
