-
Notifications
You must be signed in to change notification settings - Fork 0
/
env.h
26 lines (17 loc) · 876 Bytes
/
env.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifndef ENV
#define ENV
#include "variable_store.h"
void loadEnvironmentVariables(char** env, struct VariableStore* envVars);
// Sets the value of an environment variable
void setEnvironmentVariable(struct VariableStore* envVars, char* name, char* value);
// Deletes an environment variable
void removeEnvironmentVariable(struct VariableStore* envVars, char* name);
// Returns the environment variable's value if found, or an empty string otherwise
char* getEnvironmentVariable(struct VariableStore* envVars, char* name);
// Executes setenv command
void exec_setenv(struct VariableStore* envVars, char* cmdString);
// Executes unsetenv command
void exec_unsetenv(struct VariableStore* envVars, char* cmdString);
// Replaces environment variables in cmdString with their values
void evaluateEnvironmentVariables(struct VariableStore* envVars, char* cmdString);
#endif