2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
5 Desc: Remove the first node of a list
9 #include <aros/debug.h>
11 /*****************************************************************************
14 #include <exec/lists.h>
15 #include <proto/exec.h>
17 AROS_LH1I(struct Node
*, RemHead
,
20 AROS_LHA(struct List
*, list
, A0
),
23 struct ExecBase
*, SysBase
, 43, Exec
)
26 Remove the first node from a list.
29 list - Remove the node from this list
32 The node that has been removed.
40 // Remove node and return it
41 head = RemHead (list);
49 ******************************************************************************/
56 Unfortunately, there is no (quick) check that the node
60 /* Get the address of the first node or NULL */
61 node
= list
->lh_Head
->ln_Succ
;
64 node
->ln_Pred
= (struct Node
*)list
;
66 list
->lh_Head
= node
->ln_Succ
;
69 /* Return the address or NULL */