On Wed, Feb 09, 2011 at 02:28:42PM +0100, c...@wzff.de wrote:
> 
> An alternative to this would be exporting these variables as
> environment variables. This way you don't have to do any parsing on
> your own (well, maybe inside the strings but not externally). Of
> course it only works for very simple use cases which don't need dozens
> of variables

well, don't beat up only one of the twins:

extern char **environ; 
extern char **argv;

char *foo = NULL;
foo = getenv("foo");
environ = argv;
if (getenv("foo") != NULL) 
    foo = getenv("foo");


Patrick 

Reply via email to