[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MiNT] Test program for shel_write(SWM_LAUNCH, ...)



Hi list,

Still trying to understand what's going on with the current working
directory of applications and so, not sure if my own programs were at
fault, I wrote a couple of the simplest possible GEM test programs that
exhibit the problem I'm facing.

Here's how to test: run swcaller.prg; it will display in a GEM alert box
the path it's sending the AES via shel_write() to launch swcallee.prg
2 times in a row. swcallee.prg will display it's current working
directory in an alert box.

Why 2 times? Because on my system, the 1st swcalle.prg instance has a
correct working directory (something like "F:\swtest") but the second
instance always has "U:\c\mint\1-19-CUR\XAAES". (NOTE: My suspicion is that on
other systems the current working directory is wrong everytime).

Needles to say, this doesn't help real applications that need to load
support files from their current working directory...

If you modify either of the programs, recompile with:
gcc -Wall -fomit-frame-pointer -O2 swcaller.c -o swcaller.prg -lgem -s
gcc -Wall -fomit-frame-pointer -O2 swcallee.c -o swcallee.prg -lgem -s
or somesuch.

Cheers,
JFL
-- 
Jean-François Lemaire


Attachment: swtest.tar.bz2
Description: Binary data