Adds new environment variables or modifies the values of existing ones.
#include <stdlib.h> int putenv (const char *envstring);
envstring
Environment-variable table entry definition, which must be a character string of this form:
varname = string
Where:
varname |
The name of the environment variable to be added or modified. |
string |
The variable's value. |
putenv operates only on the local process. The process environment is pre-loaded from "global" values which are set in the registry. The registry ...\<nodename>\INTIME.INI\CLIB contains values which are loaded into the environment.
Environment variables customize the environment in which a thread executes. This function affects only the current process' environment; it does not modify the default environment.
If varname is already part of the environment, its value is replaced by string; otherwise, the new variable is placed in the first empty slot in the environment-variable table. If you specify a valid varname and null string, the environment variable is removed.
There is one environment-variable table shared by all threads using the C library. If the table has not been initialized by a previous call to getenv, putenv first calls getenv before proceeding.
Versions | Defined in | Include | Link to |
---|---|---|---|
INtime 3.0 | intime/rt/include/stdlib.h | stdlib.h | clib.lib |