Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site hocda.UUCP Path: utzoo!watmath!clyde!floyd!harpo!ulysses!mhuxl!houxm!hocda!hom From: hom@hocda.UUCP (H.MORRIS) Newsgroups: net.unix-wizards Subject: Re: "Re: Undocumented Stuff" Message-ID: <387@hocda.UUCP> Date: Wed, 21-Mar-84 18:04:14 EST Article-I.D.: hocda.387 Posted: Wed Mar 21 18:04:14 1984 Date-Received: Thu, 22-Mar-84 04:00:50 EST References: <1794@rlgvax.UUCP> Organization: Bell Labs, Holmdel Lines: 17 Speaking of undocumented things, the most startling one I know of is the third argument to main() which exists on every U**X I have worked with, and which points to the list of environment variables. Normally you don't declare it and that is fine, but I started noticing some utility programs with this argument (like many version of shell would have to have it). If it's documented anywhere, I'd be interested in knowing about it. E.g. to print the list of environment variables: main(argc, argv, envp) char *argv[], *envp[]; { register char **p; for(p=envp; *p ; ++p) puts(*p); } Does anyone have a UNIX on which this doesn't work?