MessageTrans problems

Tony van der Hoff tony at mk-net.demon.co.uk
Mon Nov 5 18:10:37 GMT 2001


On 2 Nov 2001, in message <200111022149.VAA29735 at inputplus.demon.co.uk>,
Ralph Corderoy <ralph at inputplus.demon.co.uk> wrote:

> 
> Hi Jonathan,
> 
> > > PRM 3-745
> > > MessageTrans_Lookup returns a pointer to the token terminator in r1
> > > messagetrans_lookup() doesn't return this.
> > 
> > OSLib doesn't always return everything that the SWI does.  Sometimes,
> > a SWI returns the same information in different ways, or sometimes it
> > returns redundant information to make it easier to use in different
> > ways in assembler. 
> >
> > This is one of those: if you have called
> > 
> >       result = messagetrans_lookup (cb, token, buffer, size,
> >           arg0, arg1, arg2, arg3, &used);
> > 
> > you can get the pointer to the token terminator as
> > 
> >       token + strlen (token)
> > 
> > (or maybe as token + strcspn (",);")) so there's no point returning it.
> 
> I didn't appreciate this about OSLib's definitions.  It makes it
> awkward to generate the marshalling code from emulated SWI to riscose C
> function as the function, if using OSLib's prototype, won't be able to
> fully implement the SWI, i.e. the pointer to the token terminator in
> r1.
> 
> Any clever ideas anyone?
> 
Follow-up to OSLib-team.

-- 
Tony van der Hoff         | MailTo:tony at mk-net.demon.co.uk
                          | MailTo:avanderhoff at iee.org
Buckinghamshire, England  | http:www.mk-net.demon.co.uk



More information about the oslib-user mailing list