MessageTrans problems
Ralph Corderoy
ralph at inputplus.demon.co.uk
Fri Nov 2 21:49:11 GMT 2001
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?
Cheers,
Ralph.
More information about the oslib-user
mailing list