|
Boost : |
From: Fernando Cacciola (fcacciola_at_[hidden])
Date: 2002-01-23 16:53:17
----- Original Message -----
From: <larsbj_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Wednesday, January 23, 2002 6:35 PM
Subject: Re: [boost] environment variable access
> "Fernando Cacciola" <fcacciola_at_[hidden]> writes:
>
> | ----- Original Message -----
> | From: <larsbj_at_[hidden]>
> | To: <boost_at_[hidden]>
> | Sent: Wednesday, January 23, 2002 5:50 PM
> | Subject: Re: [boost] environment variable access
> >
> >
> >> "Fernando Cacciola" <fcacciola_at_[hidden]> writes:
> >>
> >> | You can use find(), but then "environment" would have to define
> | iterators,
> >> | at least '.end()' to compare against, thus
> >> | it would look too much like a finite-size sequence while it might be
> | not.
> >>
> >> I can't think of one case where it won't be finite-size.
> >>
> >> (at least not in a case that is environment specific)
> >>
> >
> | The source of variables, itself, such as the enviroment, can be of
finite
> | size.
> | But does it mean that this must be reflected into the data structure?
>
> Are there systems that do not have the equivalent of getenv and
> putenv?
>
> An super simple implementation on most unices could result in (f.ex.):
>
> envir_iterator env(environ);
> envir_iterator end;
> for (; env != end; ++env) {
> pair<string, string> p = *env;
> }
>
> Or do you want to avoid using the system environment?
>
This look good, but I have no idea how to implement that in terms of
'getenv'...
How do you walk through all enviroment variables with it?
Fernando Cacciola
Sierra s.r.l.
fcacciola_at_[hidden]
www.gosierra.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk