2024-09-11 21:56:53 +02:00
|
|
|
#ifndef _SWAY_ENV_H
|
|
|
|
#define _SWAY_ENV_H
|
|
|
|
|
2024-09-12 13:37:29 +02:00
|
|
|
/**
|
|
|
|
* Deallocates an environment array created by
|
|
|
|
* sway_env_get_envp or sway_env_setenv.
|
|
|
|
*/
|
|
|
|
void env_destroy(char **envp);
|
2024-09-11 21:56:53 +02:00
|
|
|
|
2024-09-12 13:37:29 +02:00
|
|
|
/**
|
|
|
|
* Gets a newly-allocated environment array pointer
|
|
|
|
* from the global environment.
|
|
|
|
*/
|
|
|
|
char **env_create();
|
2024-09-11 21:56:53 +02:00
|
|
|
|
2024-09-12 13:37:29 +02:00
|
|
|
/**
|
|
|
|
* Sets or overwrites an environment variable in the given environment.
|
|
|
|
* Setting a new variable will reallocate the entire array.
|
|
|
|
*/
|
2024-09-11 21:56:53 +02:00
|
|
|
char **env_setenv(char **envp, char *name, char *value);
|
|
|
|
|
|
|
|
#endif
|