Mail Archives: djgpp/1994/09/02/14:03:26
> watersm1> Using djgpp 1.11, getenv() behaves strangely when the environment
> watersm1> variable contains spaces. eg
>
> watersm1> set TMP = C:/TMP
>
> watersm1> then getenv() returns C:/TMPMP
>
> This might still be in 1.12. I noticed that a call to a prg failed
> because go32 could not get to c:/gcc/bin/emu3877. I had a blank after
> the = in my SET GO32 command.
If you do
SET TMP = C:/TMP
then getenv("TMP") should return NULL. getenv("TMP ") should return
" C:/TMP". The blanks are significant to DOS in both the variable name and
its value. Of course, one can argue about whether it _should_ work this way.
Trailing blanks in the variable don't get trimmed either, so you might find
yourself looking for "c:/gcc/bin/ emu3877".
- Raw text -