| iMatix home page | << | < | > | >> |
SFL Version 2.11 |
#include "sfllist.h" void list_remove (LIST *list, void *data, size_t size)
Removes the node at the head of a list, copying the specified amount of data to the specified data block. This size must be exactly equal to the size of the data block. The list may not be empty. Use this with the macro list_pop.
{ LIST *node; ASSERT (!list_empty (list)); node = list-> next; ASSERT (mem_size (node) - sizeof (LIST) == size); memcpy ((char *) data, (char *) node + sizeof (LIST), size); list unlink (node); mem_free (node); }
| << | < | > | >> | Copyright © 1996-2000 iMatix Corporation |