VMS Help
CRTL, setenv
*Conan The Librarian
|
Inserts or resets the environment variable name in the current
environment list.
Format
#include <stdlib.h>
int setenv (const char *name, const char *value, int
overwrite);
name
A variable name in the environment variable list.
value
The value for the environment variable.
overwrite
A value of 0 or 1 indicating whether to reset the environment
variable, if it exists.
This function inserts or resets the environment variable name
in the current environment list. If the variable name does not
exist in the list, it is inserted with the value argument. If the
variable does exist, the overwrite argument is tested. When the
overwrite argument value is:
o 0 (zero) - then the variable is not reset.
o 1 - then the variable is reset to value.
0 Indicates success.
-1 Indicates an error. errno is set to ENOMEM-
Not enough memory available to expand the
environment list.