Added kernel module for starting the usb stack at boot time. It's not activated thoug...
[cake.git] / rom / intuition / freeintuimessage.c
blobfa0e94cb1a8223d8499b55e92d6c53cad95b6662
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 Copyright © 2001-2003, The MorphOS Development Team. All Rights Reserved.
4 $Id$
5 */
7 #include <proto/utility.h>
8 #include "intuition_intern.h"
10 /*****i***********************************************************************
12 NAME */
13 #include <proto/intuition.h>
15 AROS_LH1(void, FreeIntuiMessage,
17 /* SYNOPSIS */
18 AROS_LHA(struct IntuiMessage *, imsg, A0),
20 /* LOCATION */
21 struct IntuitionBase *, IntuitionBase, 149, Intuition)
23 /* FUNCTION
24 Private to AROS: free an IntuiMessage previously allocated
25 with AllocIntuiMessage.
27 INPUTS
28 imsg - The IntuiMessage. May be NULL.
30 RESULT
31 none
33 NOTES
35 EXAMPLE
37 BUGS
39 SEE ALSO
41 INTERNALS
43 HISTORY
45 *****************************************************************************/
47 AROS_LIBFUNC_INIT
49 DEBUG_FREEINTUIMESSAGE(dprintf("FreeIntuiMessage: Msg 0x%lx\n", imsg));
51 ASSERT_VALID_PTR_OR_NULL(imsg);
53 #define EIM(x) ((struct ExtIntuiMessage *)(x))
55 if (imsg)
57 if ((imsg->Class == IDCMP_IDCMPUPDATE) && (imsg->IAddress))
59 FreeTagItems((struct TagItem *)imsg->IAddress);
62 if (EIM(imsg)->eim_TabletData)
64 if (EIM(imsg)->eim_TabletData->td_TagList) FreeTagItems(EIM(imsg)->eim_TabletData->td_TagList);
65 FreePooled(GetPrivIBase(IntuitionBase)->IDCMPPool,EIM(imsg)->eim_TabletData,sizeof (struct TabletData));
67 FreePooled(GetPrivIBase(IntuitionBase)->IDCMPPool,imsg, sizeof(struct IntIntuiMessage));
70 DEBUG_FREEINTUIMESSAGE(dprintf("FreeIntuiMessage: done\n"));
71 AROS_LIBFUNC_EXIT