Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C Library Reference - <u>synopsis:</u> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
    #include <env.h>
    int clearenv( void );

Description:
    The clearenv function clears the process environment area.  No
    environment variables are defined immediately after a call to the
    clearenv function.  Note that this clears the  PATH,  COMSPEC, and  TZ
    environment variables which may then affect the operation of other
    library functions.

    The clearenv function may manipulate the value of the pointer  environ.

Returns:
    The clearenv function returns zero upon successful completion.
     Otherwise, it will return a non-zero value and set  errno to indicate
    the error.

Errors:
    When an error has occurred,  errno contains a value indicating the type
    of error that has been detected.

    Constant     Meaning

ENOMEM
    Not enough memory to allocate a control structure.


Example:
    The following example clears the entire environment area and sets up a
    new TZ environment variable.

    #include <env.h>

    void main()
      {
        clearenv();
        setenv( "TZ", "EST5EDT", 0 );
      }

Classification:
    POSIX 1003.1

Systems:
    All, Netware

See Also:
    exec Functions, getenv, putenv, _searchenv, setenv, spawn Functions,
    system

See Also:

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson