[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: 'getenv' C function



Pedro Zorzenon Neto <pzn@terra.com.br> writes:

>   The upstream author uses this software for some Unix and also for DOS.
>   The author intends to incorporate my patch in the upstream, I'd like to
> know if "getenv" will work in DOS.

It's a standard ANSI C function as defined in ISO 9899-1999:

     7.20.4.5 The getenv function

     Synopsis
1           #include <stdlib.h>
            char *getenv(const char *name);
     Description
2    The getenv function searches an environment list, provided by
     the host environment, for a string that matches the string
     pointed to by name. The set of environment names and the
     method for altering the environment list are
     implementation-defined.
3    The implementation shall behave as if no library function calls
     the getenv function.  
     Returns
4    The getenv function returns a pointer to a string associated
     with the matched list member. The string pointed to shall
     not be modified by the program, but may be overwritten by a
     subsequent call to the getenv function. If the specified
     name cannot be found, a null pointer is returned.

-- 
"It takes a certain amount of shamelessness
 to be a monomaniac billionaire dwarf."
--Jon Katz <URL:http://slashdot.org/articles/99/03/17/1634238.shtml>



Reply to: