home *** CD-ROM | disk | FTP | other *** search
/ MACD 4 / MACD4.iso / Emulatory / AROS / dos / unloadseg.c < prev    next >
Encoding:
C/C++ Source or Header  |  1978-03-06  |  1.4 KB  |  74 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: unloadseg.c,v 1.4 1996/10/24 15:50:38 aros Exp $
  4.     $Log: unloadseg.c,v $
  5.     Revision 1.4  1996/10/24 15:50:38  aros
  6.     Use the official AROS macros over the __AROS versions.
  7.  
  8.     Revision 1.3  1996/08/13 13:52:52  digulla
  9.     Replaced <dos/dosextens.h> by "dos_intern.h" or added "dos_intern.h"
  10.     Replaced AROS_LA by AROS_LHA
  11.  
  12.     Revision 1.2  1996/08/01 17:40:59  digulla
  13.     Added standard header for all files
  14.  
  15.     Desc:
  16.     Lang: english
  17. */
  18. #include <clib/exec_protos.h>
  19. #include <dos/dos.h>
  20. #include "dos_intern.h"
  21.  
  22. /*****************************************************************************
  23.  
  24.     NAME */
  25.     #include <clib/dos_protos.h>
  26.  
  27.     AROS_LH1(void, UnLoadSeg,
  28.  
  29. /*  SYNOPSIS */
  30.     AROS_LHA(BPTR, seglist, D1),
  31.  
  32. /*  LOCATION */
  33.     struct DosLibrary *, DOSBase, 26, Dos)
  34.  
  35. /*  FUNCTION
  36.     Free a segment list allocated with LoadSeg().
  37.  
  38.     INPUTS
  39.     seglist - The segment list.
  40.  
  41.     RESULT
  42.  
  43.     NOTES
  44.  
  45.     EXAMPLE
  46.  
  47.     BUGS
  48.  
  49.     SEE ALSO
  50.     LoadSeg()
  51.  
  52.     INTERNALS
  53.  
  54.     HISTORY
  55.     29-10-95    digulla automatically created from
  56.                 dos_lib.fd and clib/dos_protos.h
  57.  
  58. *****************************************************************************/
  59. {
  60.     AROS_LIBFUNC_INIT
  61.     AROS_LIBBASE_EXT_DECL(struct DosLibrary *,DOSBase)
  62.  
  63.     BPTR next;
  64.  
  65.     while(seglist)
  66.     {
  67.     next=*(BPTR *)BADDR(seglist);
  68.     FreeVec(BADDR(seglist));
  69.     seglist=next;
  70.     }
  71.  
  72.     AROS_LIBFUNC_EXIT
  73. } /* UnLoadSeg */
  74.