home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / misc / emu / AROSdev.lha / AROS / workbench / libs / iffparse / closeclipboard.c < prev    next >
Encoding:
C/C++ Source or Header  |  1997-02-03  |  1.6 KB  |  72 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: closeclipboard.c,v 1.2 1997/02/03 18:38:00 digulla Exp $
  4.  
  5.     Desc:
  6.     Lang: english
  7. */
  8. #include "iffparse_intern.h"
  9.  
  10. /*****************************************************************************
  11.  
  12.     NAME */
  13. #include <proto/iffparse.h>
  14.  
  15.     AROS_LH1(void, CloseClipboard,
  16.  
  17. /*  SYNOPSIS */
  18.     AROS_LHA(struct ClipboardHandle *, clipHandle, A0),
  19.  
  20. /*  LOCATION */
  21.     struct Library *, IFFParseBase, 42, IFFParse)
  22.  
  23. /*  FUNCTION
  24.     Closes the clipboard.device and frees the ClipboardHandle
  25.  
  26.     INPUTS
  27.     clip - pointer to a ClipboardHandle struct created with OpenClipboard.
  28.  
  29.     RESULT
  30.     None.
  31.  
  32.     NOTES
  33.  
  34.     EXAMPLE
  35.  
  36.     BUGS
  37.  
  38.     SEE ALSO
  39.     OpenClipboard(), InitIFFAsClip()
  40.  
  41.     INTERNALS
  42.  
  43.     HISTORY
  44.   27-11-96    digulla automatically created from
  45.       iffparse_lib.fd and clib/iffparse_protos.h
  46.  
  47. *****************************************************************************/
  48. {
  49.     AROS_LIBFUNC_INIT
  50.     AROS_LIBBASE_EXT_DECL(struct Library *,IFFParseBase)
  51.  
  52.     if (clipHandle != NULL)
  53.     {
  54.     /* Delete the messageports */
  55.  
  56.     ClosePort (&(clipHandle->cbh_CBport), IPB(IFFParseBase));
  57.     ClosePort (&(clipHandle->cbh_SatisfyPort), IPB(IFFParseBase));
  58.  
  59.     CloseDevice((struct IORequest *)&(clipHandle->cbh_Req));
  60.  
  61.     /*
  62.         Free the IO request is just a question of freiing the memory
  63.         allocated for it. Since the ioClipReq structure resides inside
  64.         the clipboardhandle, (it's all just one big portion of memory),
  65.         we just free the clipboardhandle.
  66.     */
  67.     FreeMem(clipHandle, sizeof (struct ClipboardHandle));
  68.     }
  69.  
  70.     AROS_LIBFUNC_EXIT
  71. } /* CloseClipboard */
  72.