OSLib 6.70 released

Tony van der Hoff tony at mk-net.demon.co.uk
Tue Aug 3 12:39:33 BST 2004


Erik Groenhuis <e.groenhuis at xs4all.nl> wrote in message
<2fbb69d74c.root at hop2.xs4all.nl>

[snip]
> 
> Moving from using the Toolbox with clib to using the Toolbox with
> OSLibSupport is, indeed, not trivial.
> 
Like you, I originally misunderstood Druck's rather terse message.
Fortunately he clarified by email.

Nonetheless, I would tend to agree that OSLibSupport has suffered neglect. I
originally put it forward in the hope that contributions, such as yours,
would be submitted. When this didn't generally happen, I got a bit
disillusioned with it. However, the event handling stuff *has* had quite a
bit of attention over the years.

Personally I have recently been more involved in Linux work, to the
detriment of RISC OS. I can't really see this trend reversing, but I'm happy
to continue to support OSLib/OSLibSupport. Users are welcome to
contribute...

> Some points of attention are:
> 
> - event_poll() and event_poll_idle():
>   Contrary to the regular versions, these functions from OSLibSupport
>   do not accept NULL parameteres for the event_code and poll_block
>   parameters. They must point to actual objects of type wimp_event_no
>   and wimp_block respectively. Calling event_poll(0,0,0) will usually
>   crash the program. The poll_word parameter is required when and only
>   when the Pollword is used (as determined by the mask passed to
>   event_set_mask() ).
> 
OK, good idea. I'll look at fixing this.

> - OSLibSupport has two headers involved in showing information to the
>   user: Err.h and Message.h.
>   . Err.h is mainly concerned with showing error boxes, and hardly has
>     support for MessageTrans.
>   . Message.h is mainly concerned with MessageTrans. It can show a variety
>     of error boxes, but insists the user passes a
>     messagetrans_control_block parameter and an application name. The
>     demand for these parameters was, according to the sources, added
>     later. There is no explanation why they were added.
>   We probably need to  make a global messblock and pass it.
>   . Worry: maybe it is required to pass a *different* message block from
>     the one passed to toolbox_initialise().
> 
> - Message_ShowError() makes a mess of messages with 3 parameters.
>   This is because the value returned by Message_GetMessage() is
>   held in a static char [] in an internal Message routine. When we try to
>   use this string in the subsequent call to Message_ShowError(), it is
>   overwritten with the contents of the token retrieved with the second
>   call. Solution: copy the string of the first call to a private char[].
> 
I agree. These two modules were concieved as a good idea, but development
has not proceeded much. I think quite a lot needs doing here...

Choices is another area which needs attention,

> - There is no manual for the routines defined in OSLibSupport. For
>   those who are interested, I scrambled some information in a StrongHelp
>   file. See http://www.xs4all.nl/~erikgrnh/riscos/OSLibSupMan.zip . It
>   contains info about Choices_, Err_, Event_ and Message_ calls.
> 
That's great :) I'd like to add it to the main distribution, but I imagine
you want to do some more work on it. Let me know when you're happy at
releasing it.

> Hope this helps.
> 
Indeed, very much. Thank you.
-- 
Tony van der Hoff
Buckinghamshire England



More information about the oslib-user mailing list