From 17178535cc9df5e834dfd43e3b2b919e02e5798d Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Thu, 26 Oct 2023 19:53:29 -0400 Subject: Initial commit --- include/environment.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 include/environment.h (limited to 'include/environment.h') diff --git a/include/environment.h b/include/environment.h new file mode 100644 index 0000000..db15d27 --- /dev/null +++ b/include/environment.h @@ -0,0 +1,23 @@ +/** + * @file environment.h + */ +#ifndef SPM_ENVIRONMENT_H +#define SPM_ENVIRONMENT_H + +#include +#include +#include +#include "environment.h" + +typedef struct StrList RuntimeEnv; + +ssize_t runtime_contains(RuntimeEnv *env, const char *key); +RuntimeEnv *runtime_copy(char **env); +int runtime_replace(RuntimeEnv **dest, char **src); +char *runtime_get(RuntimeEnv *env, const char *key); +void runtime_set(RuntimeEnv *env, const char *_key, const char *_value); +char *runtime_expand_var(RuntimeEnv *env, const char *input); +void runtime_export(RuntimeEnv *env, char **keys); +void runtime_apply(RuntimeEnv *env); +void runtime_free(RuntimeEnv *env); +#endif //SPM_ENVIRONMENT_H -- cgit