2 Copyright © 1995-2003, The AROS Development Team. All rights reserved.
3 Copyright © 2001-2003, The MorphOS Development Team. All Rights Reserved.
7 #include <proto/utility.h>
8 #include "intuition_intern.h"
10 /*****************************************************************************
13 #include <proto/intuition.h>
15 AROS_LH1(void, FreeIntuiMessage
,
18 AROS_LHA(struct IntuiMessage
*, imsg
, A0
),
21 struct IntuitionBase
*, IntuitionBase
, 149, Intuition
)
24 Private to AROS: free an IntuiMessage previously allocated
25 with AllocIntuiMessage.
28 imsg - The IntuiMessage. May be NULL.
45 *****************************************************************************/
48 AROS_LIBBASE_EXT_DECL(struct IntuitionBase
*,IntuitionBase
)
50 DEBUG_FREEINTUIMESSAGE(dprintf("FreeIntuiMessage: Msg 0x%lx\n", imsg
));
52 ASSERT_VALID_PTR_OR_NULL(imsg
);
54 #define EIM(x) ((struct ExtIntuiMessage *)(x))
58 if ((imsg
->Class
== IDCMP_IDCMPUPDATE
) && (imsg
->IAddress
))
60 FreeTagItems((struct TagItem
*)imsg
->IAddress
);
63 if (EIM(imsg
)->eim_TabletData
)
65 if (EIM(imsg
)->eim_TabletData
->td_TagList
) FreeTagItems(EIM(imsg
)->eim_TabletData
->td_TagList
);
66 FreePooled(GetPrivIBase(IntuitionBase
)->IDCMPPool
,EIM(imsg
)->eim_TabletData
,sizeof (struct TabletData
));
68 FreePooled(GetPrivIBase(IntuitionBase
)->IDCMPPool
,imsg
, sizeof(struct IntIntuiMessage
));
71 DEBUG_FREEINTUIMESSAGE(dprintf("FreeIntuiMessage: done\n"));