Date: Thu, 12 Jun 1997 18:38:59 +0300 (IDT) From: Eli Zaretskii To: Ben N Shadwick cc: djgpp AT delorie DOT com Subject: Re: environment variables In-Reply-To: <19970612.064604.9222.0.bshadwick@juno.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Thu, 12 Jun 1997, Ben N Shadwick wrote: > It seems like there should be some kind of function to allow you to just > browse through them all without knowing the name of each variable, in > case you just want to look over what variables there are, but I don't > recall any. There is no such function, but you can examine the environment directly: extern char ** environ; char **ep = environ; while (*ep) { char *evar = *ep; /* Do whatever you like with this var */ ep++; } The elements of the `environ' array look like so: "VAR=VALUE"