46 for (
char **p =
EnvList; p && *p; p++)
64 char **src = NULL, **dst = NULL;
66 for (src = envp; src && *src; src++)
70 for (src = envp, dst =
EnvList; src && *src; src++, dst++)
91 char work[1024] = { 0 };
98 if ((len != 0) && ((*envp)[len] ==
'='))
109 snprintf(work,
sizeof(work),
"%s=%s", name,
NONULL(value));
134 if (!name || (name[0] ==
'\0'))
140 while (envp && *envp)
143 if ((len != 0) && ((*envp)[len] ==
'='))
147 char **save = envp++;
char ** mutt_envlist_getlist(void)
Get the private environment.
bool mutt_envlist_unset(const char *name)
Unset an environment variable.
void mutt_envlist_free(void)
Free the private copy of the environment.
bool mutt_envlist_set(const char *name, const char *value, bool overwrite)
Set an environment variable.
void mutt_envlist_init(char *envp[])
Create a copy of the environment.
char ** EnvList
Private copy of the environment variables.
Private copy of the environment variables.
void * mutt_mem_calloc(size_t nmemb, size_t size)
Allocate zeroed memory on the heap.
void mutt_mem_realloc(void *ptr, size_t size)
Resize a block of memory on the heap.
Memory management wrappers.
char * mutt_str_dup(const char *str)
Copy a string, safely.
size_t mutt_str_startswith(const char *str, const char *prefix)
Check whether a string starts with a prefix.
char * mutt_str_replace(char **p, const char *s)
Replace one string with another.
String manipulation functions.