bobmon@iuvax.cs.indiana.edu (RAMontante) (07/19/89)
One way is to use the oft-overlooked third argument to main:
int main(int argc, char **argv, char **env)
{
return 0; /* ...or whatever... */
}
env is an array containing all the environment variables. I recently
posted a little utility called `printenv' which uses this to display any
or all environment variables' values.
See pp. 17-19, 24 in the TCv2.0 Reference Manual.