ENVIRONMENT settings

Richard A. O'Keefe ok at quintus.uucp
Sat Dec 10 11:00:40 AEST 1988


In article <76 at notrees.ACA.MCC.COM> unniks at notrees.ACA.MCC.COM (C. Unnikrishnan) writes:
>From article <10551 at swan.ulowell.edu>, by tclark at 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?



More information about the Comp.unix.questions mailing list