Subject: Re: environ(7)
To: None <current-users@netbsd.org>
From: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
List: current-users
Date: 11/07/1994 17:02:36
>> I'm missing the declaration of extern char **environ;
> [...] Since environ is considered to be an obsolete interface,
It is? What replaces it? All I see from "man -k environ" is, aside
from three commands in section 1, getenv/putenv/setenv/unsetenv, which
is fine for noddy little uses but hopeless for anything that wants to,
say, destroy any environment variable whose name contains the letter A,
or anything that similarly requires looping over all environment
variables. For example, it would be completely impossible to write
printenv(1) with them.
(Okay, not _completely_ impossible. printenv could do something like
for L from 1 upwards
for all strings of length L (count in base 254)
do something with getenv()
but that would be ruinously inefficient, not to mention nonterminating.)
der Mouse
mouse@collatz.mcrcim.mcgill.edu