Mail Archives: djgpp/1997/06/15/17:17:19
Vic wrote:
> 
> John M. Aldrich wrote:
> > > main(int argc, char *argv[], /*something here*/)
> >
> > There may well be (in fact, I think there is), but it's a nonstandard
> > way to get the environment.  The standard interface is through the
> > getenv() and putenv() functions; look them up in the libc docs for more
> > info.
> it's main(int argc, char *argv[], char *env[])
> I think every compiler supports this one
From the comp.lang.c Frequently Asked Questions, question 11.13
(http://www.eskimo.com/~scs/C-faq/q11.13.html):
Question 11.13
But what about main's third argument, envp? 
It's a non-standard (though common) extension. If you really need to
access the environment in ways beyind what the standard getenv function
provides, though, the global variable environ is probably a better
avenue (though it's equally non-standard). 
References: ANSI Sec. F.5.1 
ISO Sec. G.5.1 
H&S Sec. 20.1 pp. 416-7 
-- 
---------------------------------------------------------------------
|      John M. Aldrich       | "A woman is not property, and hus-   |
|       aka Fighteer I       | bands who think otherwise are living |
|   mailto:fighteer AT cs DOT com   | in a dreamworld."                    |
| http://www.cs.com/fighteer |                - Lazarus Long        |
---------------------------------------------------------------------
- Raw text -