www.delorie.com/djgpp/doc/libc/libc_392.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

getenv

Syntax

 
#include <stdlib.h>

char *getenv(const char *name);

Description

Get the setting of the environment variable name. Do not alter or free the returned value.

Return Value

The value, or NULL if that variable does not exist.

Portability

ANSI/ISO C C89; C99
POSIX 1003.2-1992; 1003.1-2001

Example

 
char *term = getenv("TERM");


  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2004   by DJ Delorie     Updated Apr 2004