getenv [ HP C/iX Library Reference Manual ] MPE/iX 5.0 Documentation
HP C/iX Library Reference Manual
getenv
Returns the value of an environment variable.
Syntax
#include <stdlib.h>
char *getenv (const char *name);
Parameters
name The string to search. The string may be either the desired
name, null-terminated, or of the form name=value, in which
case getenv() uses the portion to the left of the = as the
search key.
Return Values
x A pointer to a string associated with the environment
variable pointed to by name.
NULL The value pointed to by name was not found in the
environment list.
Description
The getenv function searches the environment list for a string that
matches the string pointed to by name, and returns a pointer to the value
in the current environment if such a string is present. If the string is
not present, getenv() returns a null pointer.
The environment list consists of JCW variables and MPE/iX variables.
Refer to the MPE/iX Commands Reference Manual for more information on
MPE/iX variables.
[REV BEG]
NOTE If linking with the POSIX/iX library, refer to the description of
getenv() located in the MPE/iX Developer's Kit Reference Manual.
[REV END][REV BEG]
See Also
ANSI C 4.10.4.4[REV END]
MPE/iX 5.0 Documentation