[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] Problem with shel_write()
On Fri, 2011-08-19 at 19:11 +0200, Jean-François Lemaire wrote:
> I have an issue with shell_write(). I call it with a command line
> (shel_write(SWM_LAUNCH, 0, CL_NORMAL, path, command)) to launch a GEM
> application that receives the command line. However, the GEM app is correctly
> launched, but the 1st character of the command line is missing. So "command"
> becomes "ommand". The workaround is easy enough but I would like to
> understand what I'm doing wrong.
The argument string is in "Pascal" format. This means that the length of
the string is put in the first byte, and the string does not have to be
NULL-terminated.
http://toshyp.atari.org/en/00500b.html#Pexec
Jo Even