getenv()

get value of environment variable 

Function


SYNOPSIS

#include <stdlib.h>

char *getenv(const char *name);


DESCRIPTION

The getenv() function searches the environment for a string of the form name=value; and, if such a string is present, it returns a pointer to value. If it cannot find the specified name, it returns a null pointer.


PARAMETERS

name 

Points to the name of the system variable to look up.


RETURN VALUES

If successful, getenv() returns a pointer to a string that contains the value for the specified name. If it cannot find the specified name, it returns a null pointer.


CONFORMANCE

ANSI ISO 9899-1990.


MULTITHREAD SAFETY LEVEL

MT-Safe.


PORTING ISSUES

When a NuTCRACKER Platform application starts, the NuTCRACKER Platform converts all paths in the environment from Windows format to NuTCRACKER Platform format. When exec()ing another program, the environment is converted back to Win32 format. When adding paths to the environment with putenv(), you should ensure that these paths are in NuTCRACKER Platform format, by using _NutPathToNutc() when appropriate. If you fail to do this, the path can be misinterpreted when NuTCRACKER Platform tries to convert the environment back to Win32 format.

You can control which environment variables get converted and which do not with the by setting the $NUT_ENV_CONVERT or NUT_ENV_LITERAL environment variables.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
_NutWIN32getenv(), execl(), execlp(), execv(), execve(), execvp(), putenv()

Miscellaneous:
environ


PTC MKS Toolkit 10.1 patch 1 Documentation Build 2.