[comp.sys.atari.st.tech] Environmental variables.

andrew@.cs.utk.edu (Andrew Krzywdzinski) (12/09/90)

I would like to be able to set environmental variables in my shell program
the same way Neodesk does it. I tried using the unix-like execve to
execute programs, giving it the pointer to the environmental strings,
but it didn't work. What's the deal ? Does anybody have an example of
how to do it ? I think there was a discussion on this topic a while
back (3 weeks), but I missed it totally. Please help!
Thanks in advance to all respondents.

-andrew krzywdzinski  (andrew@cs.utk.edu)

woju@mist.sub.org (Wolfgang Jung) (12/27/90)

In <1990Dec8.221952.13371@cs.utk.edu>, Andrew Krzywdzinski writes:
-<I would like to be able to set environmental variables in my shell program
-<the same way Neodesk does it. I tried using the unix-like execve to
-<execute programs, giving it the pointer to the environmental strings,
-<but it didn't work. What's the deal ? Does anybody have an example of
-<how to do it ? I think there was a discussion on this topic a while
-<back (3 weeks), but I missed it totally. Please help!
-<Thanks in advance to all respondents.

PATH=somewhere\0TEMP=C:\TMP\0\0

This is an example how the environment looks alike in memory, this kind of
thing you have to give the PEXEC Routine of GEMDOS otherwhise it could
happen, that GEMDOS crashes (Somehow it happened to me while experimenting
around with that stuff) Some compiler will give you a pointer to 
array of pointer to those strings. However if you want to startt Programs,
you should convert that arry into above format..
BTW the \0 is the NULL Character(EOS character..)


-- 
Bye,...
Don't trust your eyes. It's just an imagination of your brain !

woju@mist.sub.org
woju@image.in-berlin.de
woju@neon.in-berlin.de

(c) by Wolfgang Jung, Berlin (date look at header !!)