Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ getenv(3C) — HP-UX 7.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

exec(2)

putenv(3C)

environ(5)

GETENV(3C)

NAME

getenv − return value for environment name

SYNOPSIS

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

DESCRIPTION

Getenv searches the environment list (see environ(5)) for a string of the form name=value, and returns a pointer to the value in the current environment if such a string is present, otherwise a NULL pointer.  Name 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. 

WARNINGS

Getenv returns a pointer to static data which may be overwritten by subsequent calls. 

SEE ALSO

exec(2), putenv(3C), environ(5). 

EXTERNAL INFLUENCES

Locale

The LC_CTYPE category determines the interpretation of characters in name as single- and/or multi-byte characters. 

International Code Set Support

Single- and multi-byte character code sets are supported. 

STANDARDS CONFORMANCE

getenv: SVID2, XPG2, XPG3, POSIX.1, FIPS 151-1, ANSI C

Hewlett-Packard Company  —  HP-UX Release 7.0: Sept 1989

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026