start service tasks separately in-case platforms need to perform additional set-up...
[AROS.git] / workbench / libs / iffparse / closeclipboard.c
blob8f923936031d9b85e530f917e0433749049fcc4b
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include "iffparse_intern.h"
8 /*****************************************************************************
10 NAME */
11 #include <proto/iffparse.h>
13 AROS_LH1(void, CloseClipboard,
15 /* SYNOPSIS */
16 AROS_LHA(struct ClipboardHandle *, clipHandle, A0),
18 /* LOCATION */
19 struct Library *, IFFParseBase, 42, IFFParse)
21 /* FUNCTION
22 Closes the clipboard.device and frees the ClipboardHandle
24 INPUTS
25 clip - pointer to a ClipboardHandle struct created with OpenClipboard.
27 RESULT
28 None.
30 NOTES
32 EXAMPLE
34 BUGS
36 SEE ALSO
37 OpenClipboard(), InitIFFAsClip()
39 INTERNALS
41 *****************************************************************************/
43 AROS_LIBFUNC_INIT
45 if (clipHandle != NULL)
47 /* Delete the messageports */
49 ClosePort (&(clipHandle->cbh_CBport), IPB(IFFParseBase));
50 ClosePort (&(clipHandle->cbh_SatisfyPort), IPB(IFFParseBase));
52 CloseDevice((struct IORequest *)&(clipHandle->cbh_Req));
55 Free the IO request is just a question of freiing the memory
56 allocated for it. Since the ioClipReq structure resides inside
57 the clipboardhandle, (it's all just one big portion of memory),
58 we just free the clipboardhandle.
60 FreeMem(clipHandle, sizeof (struct ClipboardHandle));
63 AROS_LIBFUNC_EXIT
64 } /* CloseClipboard */