Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ getenv(3) — CLIX 3.1r7.6.22

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

sh(1)

putenv(3)

clearenv(3)



  getenv(3)                           CLIX                           getenv(3)



  NAME

    getenv - Returns the value of a specified environment variable

  LIBRARY

    Standard C Library (libc.a)

  SYNOPSIS

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

  PARAMETERS

    name   Points to a string containing the name of an environment variable.

  DESCRIPTION

    The getenv() function searches the environment list for a string of the
    form name=value, and returns a pointer to a string containing the
    corresponding value for name.

  EXAMPLES

    To return the value of the HOME environment variable:

    char *home_directory;
    home_directory = getenv("HOME");


  RETURN VALUES

    The getenv() function returns a pointer to a string containing the value
    in the current environment if such a string is present.  If such a string
    is not present, a NULL pointer is returned.

  RELATED INFORMATION

    Commands:  sh(1)

    Functions:  putenv(3), clearenv(3)











  2/94 - Intergraph Corporation                                              1




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