Re: environment question



Would love to but dosnt work.
the compiler dosnt think environ exists and there is no mention of it in
stdlib.h

On Mon, 4 Oct 1999, Harold Campbell wrote:

> environ is NULL terminated. Just loop through the array grabbing names
> and values till you hit NULL.
> 
> bob@cs.csoft.net wrote:
> > 
> > In my "begining linux programming" book it says that all the environment
> > variables are stored like:
> > 
> > #include<stdlib.h>
> > extern char **environ;
> > 
> > but this is not work.
> > I need to be able to get a list of all names and values of all environment
> > variables. How do I do this now? I know about getenv and putenv, but they
> > arnt any good without knowing the variable names wich I dont.
> > 
> > Thanks,
> > Bob
> > 
> > --
> > To unsubscribe: mail gnome-devel-list-request@gnome.org with "unsubscribe"
> > as the Subject.
> 
> -- 
> Harold
> 



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