home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!sdd.hp.com!hplabs!ucbvax!KOPC.HHS.DK!ARNE
- From: ARNE@KOPC.HHS.DK (Arne Vajhxj)
- Newsgroups: comp.os.vms
- Subject: Re: Where is the putenv()???
- Message-ID: <01GTFX7GCEAQ8WVZH8@kopc.hhs.dk>
- Date: 12 Jan 93 18:14:23 GMT
- Sender: daemon@ucbvax.BERKELEY.EDU
- Distribution: world
- Organization: The Internet
- Lines: 56
-
- > Hi, I am porting a make to VMS.
-
- That has been done before !
-
- > and it needs putenv(). while the getenv()
- > is in the stdlib.h but I can find nowhere
- > the putenv().
-
- There is no putenv in VAXCRTL !
-
- The some alternatives f.ex.: LIB$SET_LOGICAL and LIB$SET_SYMBOL which sets
- defines logicals and symbols. Theese logical/symbols can be retrieved
- again with getenv.
-
- Example with LIB$SET_LOGICAL:
-
- #include <descrip.h>
-
- int lib$set_logical();
-
- main()
- {
- $DESCRIPTOR(namdes,"TEST");
- $DESCRIPTOR(valdes,"This is a logical");
- lib$set_logical(&namdes,&valdes);
- };
-
- Example with LIB$SET_SYMBOL:
-
- #include <descrip.h>
-
- int lib$set_symbol();
-
- main()
- {
- $DESCRIPTOR(namdes,"TEST");
- $DESCRIPTOR(valdes,"This is a symbol");
- lib$set_symbol(&namdes,&valdes);
- };
-
- PS: If both a logical and a symbol exist for a getenv call, then getenv
- will return the logical.
-
- PPS: Both the above examples will create a "permanent" [may the VMS gods
- forgive me that way of putting it] logical/symbol, while the putenv
- in your code may assume it to be temporary.
-
- Hope it helps !
-
- Arne
-
- Arne Vajhxj local DECNET: KO::ARNE
- Computer Department PSI: PSI%23831001304030::ARNE
- Business School of Southern Denmark Internet: ARNE@KO.HHS.DK
-
-
-