Path: utzoo!mnetor!uunet!nuchat!peter From: peter@nuchat.UUCP (Peter da Silva) Newsgroups: comp.sys.amiga Subject: Re: getenv() -- Lattice 4.0 Message-ID: <669@nuchat.UUCP> Date: 21 Feb 88 02:42:20 GMT References: <6893@agate.BERKELEY.EDU> <334@sas.UUCP> Organization: Public Access - Houston, Tx Lines: 24 Keywords: getenv, stdlib.h, Lattice > [Explanation of why Lattice "getenv" searches the assign list, based on > loose terminology in the ANSI draft standard] If you notice, it does say that getenv returns a *string*, which to me implies a null terminated sequence of characters. Besides, there's more to writing a good 'C' library than just following ANSI. The semantics of getenv should be the same as the semantics of the UNIX getenv function. This is what any portable programs will be looking for, and that after all is the purpose of ANSI 'C'. Getenv variables don't have to be local but shared by child processes, as the UNIX ones are. Making them global as Manx does is OK... however they should be names that the user can assign arbitrary character strings to befoire running your program. If you don't like Manx's method of hiding them, you could always store them in RAM:ENVIRON or something. It'd be better to maintain compatibility on that level, since it's become a bit of a standard (well, the ARP people seem to like it). Suggestion for C=: come up with formal support for environment variables in some future version of the Amiga O/S. -- -- a clone of Peter (have you hugged your wolf today) da Silva `-_-' -- normally ...!hoptoad!academ!uhnix1!sugar!peter U -- Disclaimer: These aren't mere opinions... these are *values*.