-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenv.h
More file actions
29 lines (22 loc) · 660 Bytes
/
Copy pathenv.h
File metadata and controls
29 lines (22 loc) · 660 Bytes
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
27
28
29
#ifndef SIMPLE_SHELL__ENV_H
#define SIMPLE_SHELL__ENV_H
#include <inttypes.h>
#include "shell_types.h"
#include "strings.h"
#include "alloc.h"
/**
* struct environment_vars - struct for holding environment variables.
* @len: number of variables in the array.
* @env: array of pointers to environment variable strings.
*/
struct environment_vars
{
intmax_t len;
char **env;
};
typedef struct environment_vars environment_vars;
#define SETENV_INVALID_NAME -2
intmax_t _getenv(
const environment_vars * const environ, const char * const name);
int _setenv(environment_vars * const environ, view_string * const var);
#endif /* SIMPLE_SHELL__ENV_H */