Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!samsung!usc!elroy.jpl.nasa.gov!jato!mars!kaleb From: kaleb@mars.jpl.nasa.gov (Kaleb Keithley) Newsgroups: comp.sys.ibm.pc Subject: Re: Getting programme dir Message-ID: <3826@jato.Jpl.Nasa.Gov> Date: 25 May 90 15:45:03 GMT References: <1990May23.155510.6403@cs.utk.edu> <127@evtprp0b.UUCP> Sender: news@jato.Jpl.Nasa.Gov Reply-To: kaleb@mars.UUCP (Kaleb Keithley) Organization: Jet Propulsion Laboratory, Pasadena, CA. Lines: 15 In article <127@evtprp0b.UUCP> tea6219@evtprp0b.UUCP (Terry E. Acker) writes: >In MSC 5.0, there is a function (I believe its called getenv) that can access the environment passed to the program. In the environment is the PATH variable, which you will be able to inspect. And if you declare main as follows: int main (argc, argv, envp) int argc; char **argv; char **envp; {} then envp points to a null terminated array of all the environment parameters. just like argv points to a null term'd array of all the command line options. kaleb@thyme.jpl.nasa.gov Jet Propeller Labs Kaleb Keithley