struct wimp_message_header

David Bryan D.J.Bryan at cranfield.ac.uk
Thu Oct 19 16:56:44 BST 2000


In message <45mX2AA0qr75Ewxv at mk-net.demon.co.uk> you wrote:

> On Wed, 18 Oct 2000, at 18:45:04, David Bryan
> <D.J.Bryan at cranfield.ac.uk> wrote on the subject "struct
> wimp_message_header":
> 
> >Why does struct wimp_message_header have a data member?  This
> >makes its sizeof differ from what I would expect.
> 
> Yes, it is legacy code, retained for backwards compatibility only. The
> macro wimp_SIZEOF_MESSAGE_HEADER(0) will return the correct size.

Legacy?  AFAICS, the struct first appeared in version 6.00.
 
> Current code should not need to use the wimp_message_header structure,
> which has been subsumed in the macro wimp_MESSAGE_HEADER_MEMBERS, which
> in turn forms the basis for the definition of the preferred individual
> message structures.

I wasn't sure whether this was for internal use only.  I failed to
find anything specific in the documentation.  The StrongHelp
manual documents wimp_message_header, but not
wimp_MESSAGE_HEADER_MEMBERS.  So, I had assumed it was off limits.
 
> If you really want a header with no data members, you can define your
> own:
>   struct
>   {
>     wimp_MESSAGE_HEADER_MEMBERS
>   } message_header;
> 
> and, if you so choose, take the sizeof that. 

OK.  But, wimp.h has lines like

  typedef wimp_message_header wimp_full_message_mode_change;

So, I was going to use wimp_message_header for other header-only
messages.

-- 
David Bryan




More information about the oslib-user mailing list