Path: utzoo!utgpu!water!watmath!clyde!att!ucbvax!decwrl!labrea!denali!karish
From: karish@denali.stanford.edu (Chuck Karish)
Newsgroups: comp.unix.questions
Subject: Re: setenv/putenv/unsetenv.
Summary: POSIX requires only getenv().
Message-ID: <23335@labrea.Stanford.EDU>
Date: 22 Aug 88 02:16:57 GMT
References: <2969@zyx.ZYX.SE>
Sender: news@labrea.Stanford.EDU
Reply-To: karish@denali.stanford.edu (Chuck Karish)
Organization: Mindcraft, Inc.
Lines: 19

In article <2969@zyx.ZYX.SE> arndt@zyx.SE (Arndt Jonasson) writes:
>
>Does anyone have a PD implementation of C functions to manipulate a
>program's environment? The operations that should be supported are:

[ getenv(), setenv(), unsetenv() ]

>Does Posix include these?

As of Draft 12.3, the POSIX 1003.1 standard includes only getenv().
It's pretty simple to write the others; all you have to do is to
change the contents of the strings pointed to by the `environ' pointers.
This may entail using realloc() where strings get longer, and re-
assigning pointers to pointers (unsetenv()).

Chuck Karish	ARPA:	karish@denali.stanford.edu
		BITNET:	karish%denali@forsythe.stanford.edu
		UUCP:	{decvax,hplabs!hpda}!mindcrf!karish
		USPS:	1825 California St. #5   Mountain View, CA 94041