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

Re: [MiNT] Problem with shel_write()



On Friday 19 Aug 2011 19:45:40 Jo Even Skarstein wrote:
> 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.

Wow. That's so weird. I would never have found out. Thanks for pointing this 
out, Jo Even.

Cheers,
JFL
-- 
Jean-François Lemaire