home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / misc / emu / AROSdev.lha / AROS / rom / dos / unloadseg.c < prev    next >
Encoding:
C/C++ Source or Header  |  1997-01-27  |  1.6 KB  |  82 lines

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