home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / misc / emu / AROSdev.lha / AROS / rom / exec / remove.c < prev    next >
Encoding:
C/C++ Source or Header  |  1997-01-09  |  1.9 KB  |  92 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: remove.c,v 1.9 1997/01/01 03:46:15 ldp Exp $
  4.     $Log: remove.c,v $
  5.     Revision 1.9  1997/01/01 03:46:15  ldp
  6.     Committed Amiga native (support) code
  7.  
  8.     Changed clib to proto
  9.  
  10.     Revision 1.8  1996/12/10 13:51:52  aros
  11.     Moved all #include's in the first column so makedepend can see it.
  12.  
  13.     Revision 1.7  1996/10/24 15:50:56  aros
  14.     Use the official AROS macros over the __AROS versions.
  15.  
  16.     Revision 1.6  1996/10/21 20:48:22  aros
  17.     Changed struct SysBase to struct ExecBase
  18.  
  19.     Revision 1.5  1996/08/13 13:56:07  digulla
  20.     Replaced AROS_LA by AROS_LHA
  21.     Replaced some AROS_LH*I by AROS_LH*
  22.     Sorted and added includes
  23.  
  24.     Revision 1.4  1996/08/01 17:41:17  digulla
  25.     Added standard header for all files
  26.  
  27.     Desc:
  28.     Lang: english
  29. */
  30. #include "exec_intern.h"
  31. #include <exec/lists.h>
  32. #include <proto/exec.h>
  33.  
  34. /*****************************************************************************
  35.  
  36.     NAME */
  37.  
  38.     AROS_LH1I(void, Remove,
  39.  
  40. /*  SYNOPSIS */
  41.     AROS_LHA(struct Node *, node, A1),
  42.  
  43. /*  LOCATION */
  44.     struct ExecBase *, SysBase, 42, Exec)
  45.  
  46. /*  FUNCTION
  47.     Remove a node from a list.
  48.  
  49.     INPUTS
  50.     node - This node to be removed.
  51.  
  52.     RESULT
  53.  
  54.     NOTES
  55.     There is no need to specify the list but the node must be in
  56.     a list !
  57.  
  58.     EXAMPLE
  59.     struct Node * node;
  60.  
  61.     // Remove node
  62.     Remove (node);
  63.  
  64.     BUGS
  65.  
  66.     SEE ALSO
  67.  
  68.     INTERNALS
  69.  
  70.     HISTORY
  71.     26-08-95    digulla created after EXEC-Routine
  72.     26-10-95    digulla adjusted to new calling scheme
  73.  
  74. ******************************************************************************/
  75. {
  76.     AROS_LIBFUNC_INIT
  77.     assert (node);
  78.     /*
  79.     Unfortunately, there is no (quick) check that the node
  80.     is in a list.
  81.     */
  82.  
  83.     /*
  84.     Just bend the pointers around the node, ie. we make our
  85.     predecessor point to our successor and vice versa
  86.     */
  87.     node->ln_Pred->ln_Succ = node->ln_Succ;
  88.     node->ln_Succ->ln_Pred = node->ln_Pred;
  89.     AROS_LIBFUNC_EXIT
  90. } /* Remove */
  91.  
  92.