home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 5 / Amiga Tools 5.iso / tools / developer-tools / aros / source / exec / library / src / remlibrary.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-07-16  |  1.5 KB  |  71 lines

  1. /*
  2.     (C) 1995, 96 AROS - The Amiga Replacement OS
  3.     $Id$
  4.     $Log$
  5.     Desc:
  6.     Lang: english
  7. */
  8. #include "exec_intern.h"
  9. #include <exec/execbase.h>
  10. #include <aros/libcall.h>
  11. #include <dos/dos.h>
  12.  
  13. /*****************************************************************************
  14.  
  15.     NAME */
  16.     #include <clib/exec_protos.h>
  17.  
  18.     __AROS_LH1(void, RemLibrary,
  19.  
  20. /*  SYNOPSIS */
  21.     __AROS_LA(struct Library *, library,A1),
  22.  
  23. /*  LOCATION */
  24.     struct ExecBase *, SysBase, 67, Exec)
  25.  
  26. /*  FUNCTION
  27.     Calls the given library's expunge vector, thus trying to delete it.
  28.     The library may refuse to do so and still be open after this call.
  29.  
  30.     INPUTS
  31.     library - Pointer to the library structure.
  32.  
  33.     RESULT
  34.  
  35.     NOTES
  36.  
  37.     EXAMPLE
  38.  
  39.     BUGS
  40.  
  41.     SEE ALSO
  42.     AddLibrary(), MakeLibrary(), MakeFunctions(), InitStruct(), SumLibrary().
  43.  
  44.     INTERNALS
  45.  
  46.     HISTORY
  47.  
  48. ******************************************************************************/
  49. {
  50.     __AROS_FUNC_INIT
  51.  
  52.     /* Arbitrate for the library list */
  53.     Forbid();
  54.  
  55.     /* Call expunge vector */
  56.     (void)__AROS_LC1I(ULONG, expunge,
  57.     __AROS_LCA(struct Library *, library, A6),
  58.     struct Library *, library, 3, UserLib);
  59.     /*
  60.     Normally you'd expect the library to be expunged if this returns
  61.     non-zero, but this is only exec which doesn't know anything about
  62.     seglists - therefore dos.library has to SetFunction() into this
  63.     vector for the additional functionality.
  64.     */
  65.  
  66.     /* All done. */
  67.     Permit();
  68.     __AROS_FUNC_EXIT
  69. } /* RemLibrary */
  70.  
  71.