add casts to zune macros to silence some warnings
[tangerine.git] / workbench / libs / asl / freeaslrequest.c
bloba58849545fd8a1ec974f2b0fe6f7a8a19f6c9083
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: english
7 */
9 #include <proto/exec.h>
10 #include <proto/locale.h>
11 #include "asl_intern.h"
13 /*****************************************************************************
15 NAME */
16 #include <proto/asl.h>
18 AROS_LH1(void, FreeAslRequest,
20 /* SYNOPSIS */
21 AROS_LHA(APTR, requester, A0),
23 /* LOCATION */
24 struct Library *, AslBase, 9, Asl)
26 /* FUNCTION
27 Frees a requester that was allocated with AllocAslRequest().
29 INPUTS
30 requester - The requester that is to be freed.
32 RESULT
34 NOTES
36 EXAMPLE
38 BUGS
40 SEE ALSO
42 INTERNALS
44 HISTORY
45 27-11-96 digulla automatically created from
46 asl_lib.fd and clib/asl_protos.h
48 *****************************************************************************/
50 AROS_LIBFUNC_INIT
52 /* Here We should also free WBArg when multiselection etc. etc. */
53 struct ReqNode *reqnode;
55 if (!requester) return;
57 if ((reqnode = FindReqNode(requester, ASLB(AslBase))) != NULL)
59 /* Strip requester specific stuff */
60 StripRequester(requester, reqnode->rn_IntReq->ir_ReqType, ASLB(AslBase));
62 FreeVec(requester);
63 DeletePool(reqnode->rn_IntReq->ir_MemPool);
64 FreeVec(reqnode->rn_IntReq);
66 ObtainSemaphore( &(ASLB(AslBase)->ReqListSem) );
67 Remove( (struct Node *)reqnode );
68 ReleaseSemaphore( &(ASLB(AslBase)->ReqListSem) );
70 FreeMem(reqnode, sizeof (struct ReqNode));
74 return;
76 AROS_LIBFUNC_EXIT
77 } /* FreeAslRequest */