|
| iMatix home page | << | < | > | >> |
SFLVersion 2.11 |
#include "sfllist.h" void * list_add (LIST *list, void *data, size_t size)
Creates a node at the head of a list of a specified size and copies the specified data into it. Use with the stack & queue macros list_push and list_queue.
{
LIST
*node;
node = mem_alloc (sizeof (LIST) + size);
if (node)
{
list_reset (node);
list_relink_after (node, list);
memcpy ((char *) node + sizeof (LIST), (char *) data, size);
}
return node;
}
| | << | < | > | >> |
|