env-util.h revision 5aaddefb351e87ea1e97db92924a75ff8aa50181
5254d77805cd35b9356d072ba325c356c43b0d51Timo Sirainen/* Add new environment variable. Wrapper to putenv(). Note that calls to this
ecc81625167ed96c04c02aa190a1ea5baa65b474Timo Sirainen function allocates memory which isn't free'd until env_clean() is called. */
ecc81625167ed96c04c02aa190a1ea5baa65b474Timo Sirainen/* Remove a single environment. */
ecc81625167ed96c04c02aa190a1ea5baa65b474Timo Sirainen/* Clear all environment variables. */
ecc81625167ed96c04c02aa190a1ea5baa65b474Timo Sirainen/* Clear all environment variables except what's listed in preserve_envs[] */
ecc81625167ed96c04c02aa190a1ea5baa65b474Timo Sirainenvoid env_clean_except(const char *const preserve_envs[]);
c0435c854a0e7246373b9752d163095cc4fbe985Timo Sirainen/* Save a copy of the current environment. */
ecc81625167ed96c04c02aa190a1ea5baa65b474Timo Sirainen/* Clear the current environment and restore the backup. */
ecc81625167ed96c04c02aa190a1ea5baa65b474Timo Sirainenvoid env_backup_restore(struct env_backup *env);
ecc81625167ed96c04c02aa190a1ea5baa65b474Timo Sirainen/* Free the memory used by environment backup. */
8edc373587d75f8040e3c4416e50638aa2a32188Timo Sirainen/* Free all memory used by env_put() function. Environment must not be
c0435c854a0e7246373b9752d163095cc4fbe985Timo Sirainen accessed afterwards. */