Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: main() Date: Sat, 15 Apr 2017 15:31:03 -0700 Organization: None to speak of Lines: 22 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="da8d94982bea82fb3f3cc3c0e5345c5b"; logging-data="5707"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18dXuWQkHkpvLUNuvo1G7IH" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:jQpz0mqwrJ9RHnWlEiHWjpMRA7A= sha1:Xj/zFM7jm7+tY6alF8MBK9Y6mVU= Xref: csiph.com comp.lang.c:108166 Malcolm McLean writes: [...] > Exactly. > envp is one of those things which probably should be in the standard but > isn't, as many programs need the environment variables. POSIX has `extern char **environ;`. And of course standard C has getenv(), which isn't as flexible (you can only get the value of an environment variable if you already know its name, but that's usually enough). > Having said that, setting environment variables is a horrid thing to > require of a user. Balderdash. (And in may cases, environment variables are set by the environment, not explicitly by the user.) -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"