OAR

RTEMS GNU Tools On-Line Library


getenv

PREV UP NEXT Bookshelf

1.15: getenv---look up environment variable

Synopsis

#include <stdlib.h>
char *getenv(const char *name);

Description
getenv searches the list of environment variable names and values (using the global pointer `char **environ') for a variable whose name matches the string at name. If a variable name matches, getenv returns a pointer to the associated value.


Returns
A pointer to the (string) value of the environment variable, or NULL if there is no such environment variable.


Portability
getenv is ANSI, but the rules for properly forming names of environment variables vary from one system to another.

getenv requires a global pointer environ.



PREV UP NEXT Bookshelf

Packaging copyright © 1988-2000 OAR Corporation
Context copyright by each document's author. See Free Software Foundation for information.