On Sat, Feb 10, 2001 at 06:52:54PM -0700, [EMAIL PROTECTED] wrote:
> In a recent note, Thomas Dickey said:
>
> > Date: Sat, 10 Feb 2001 20:22:32 -0500
> >
> > some platforms have unsetenv(), which my Linux manpage says is BSD 4.3
> > (however, not everyone has it - you may end up making your own to
> > remove an entry from 'environ', or simply rename a variable temporarily,
> > e.g., "LINES" to "_LYNX" and "COLS" to "LYNX" - ugly but easy).
> >
> Ugly indeed. I suspect I must then unrename it before I do another
> putenv() with the same name, else I create a memory leak.
yes - renaming was what I had in mind to make it simpler to adjust the
environment list (otherwise you're constantly reallocating it - bear in
mind that it's initially not derived from malloc).
I've also read that 'environ' is not necessarily supported on all platforms
(Unix-style that is), so it's something more for the configure script.
--
Thomas E. Dickey <[EMAIL PROTECTED]>
http://dickey.his.com
ftp://dickey.his.com
; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to [EMAIL PROTECTED]