r4548@vps: verhaegs | 2007-04-23 10:55:24 -0400
[AROS.git] / compiler / alib / freeievents.c
blobe63d0a25cff24ff5dab480a45e791070becf30f5
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 /*****************************************************************************
8 NAME */
10 #include <libraries/commodities.h>
11 #include <proto/exec.h>
12 #include <devices/inputevent.h>
14 VOID FreeIEvents(
16 /* SYNOPSIS */
18 struct InputEvent *ie)
20 /* FUNCTION
22 Frees a chain of input events allocated by InvertString().
24 INPUTS
26 ie -- input event chain
28 RESULT
30 NOTES
32 EXAMPLE
34 BUGS
36 SEE ALSO
38 Commodities.library/InvertString()
40 INTERNALS
42 HISTORY
44 ******************************************************************************/
46 struct InputEvent *next;
48 for(next = ie; next != NULL; ie = next)
50 next = ie->ie_NextEvent;
52 if(ie->ie_Class == IECLASS_NEWPOINTERPOS &&
53 (ie->ie_SubClass == IESUBCLASS_TABLET ||
54 ie->ie_SubClass == IESUBCLASS_NEWTABLET ||
55 ie->ie_SubClass == IESUBCLASS_PIXEL))
56 FreeVec(ie->ie_EventAddress);
58 FreeMem(ie, sizeof(struct InputEvent));
60 } /* FreeIEvents */