aboutsummaryrefslogtreecommitdiff
path: root/include/environment.h
blob: db15d27ef29a3b034e01a635c61a2018f310a8cb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/**
 * @file environment.h
 */
#ifndef SPM_ENVIRONMENT_H
#define SPM_ENVIRONMENT_H

#include <stdio.h>
#include <stdlib.h>
#include <dirent.h>
#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