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/C++ v10.0 : C library - <b>synopsis:</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
    int clearenv( void );
    #include <env.h>

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.

    ENOMEM
        Not enough memory to allocate a control structure.


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

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

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