Private copy of the environment variables. More...
#include "config.h"
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include "envlist.h"
#include "memory.h"
#include "string2.h"
Go to the source code of this file.
Functions | |
void | envlist_free (char ***envp) |
Free the private copy of the environment. | |
char ** | envlist_init (char **envp) |
Create a copy of the environment. | |
bool | envlist_set (char ***envp, const char *name, const char *value, bool overwrite) |
Set an environment variable. | |
bool | envlist_unset (char ***envp, const char *name) |
Unset an environment variable. | |
Private copy of the environment variables.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file envlist.c.
void envlist_free | ( | char *** | envp | ) |
char ** envlist_init | ( | char ** | envp | ) |
Create a copy of the environment.
envp | Environment to copy |
ptr | Copy of the environment |
Definition at line 58 of file envlist.c.
bool envlist_set | ( | char *** | envp, |
const char * | name, | ||
const char * | value, | ||
bool | overwrite | ||
) |
Set an environment variable.
envp | Environment to modify |
name | Name of the variable |
value | New value |
overwrite | Should the variable be overwritten? |
true | Success: variable set, or overwritten |
false | Variable exists and overwrite was false |
It's broken out because some other parts of neomutt (filter.c) need to set/overwrite environment variables in EnvList before calling exec().
Definition at line 88 of file envlist.c.
bool envlist_unset | ( | char *** | envp, |
const char * | name | ||
) |
Unset an environment variable.
envp | Environment to modify |
name | Variable to unset |
true | Success: Variable unset |
false | Error: Variable doesn't exist |
Definition at line 136 of file envlist.c.