Path: utzoo!utgpu!watmath!clyde!bellcore!rutgers!tut.cis.ohio-state.edu!unmvax!pprg.unm.edu!hc!lll-winken!arisia!quintus!ok From: ok@quintus.uucp (Richard A. O'Keefe) Newsgroups: comp.unix.questions Subject: Re: ENVIRONMENT settings Message-ID: <838@quintus.UUCP> Date: 10 Dec 88 01:00:40 GMT References: <10551@swan.ulowell.edu> <76@notrees.ACA.MCC.COM> Sender: news@quintus.UUCP Reply-To: ok@quintus.UUCP (Richard A. O'Keefe) Organization: Quintus Computer Systems, Inc. Lines: 12 In article <76@notrees.ACA.MCC.COM> unniks@notrees.ACA.MCC.COM (C. Unnikrishnan) writes: >From article <10551@swan.ulowell.edu>, by tclark@hawk.ulowell.edu (T.C. Clark): >> I'm writing a C program in which I would like to read in >> some of the user's ENVIRONMENT settings (ie. logname, printer) >here's a portion of the code pulled out from a source file >main (argc, argv, envp) > char **envp; Wouldn't it be simpler to do just extern char *getenv(); char *LogName = getenv("LOGNAME"); char *Printer = getenv("PRINTER"); and so on?