cucon/slink.h: A singly linked list.
[Linear Containers (lists, stacks, arrays)]

Data Structures

struct  cucon_slink

Functions

cucon_slink_t cucon_slink_prepend_mem (cucon_slink_t rest, size_t size)
cucon_slink_t cucon_slink_prepend_ptr (cucon_slink_t slink, void *ptr)
cucon_slink_t cucon_slink_next (cucon_slink_t l)
void * cucon_slink_mem (cucon_slink_t l)
void * cucon_slink_ptr (cucon_slink_t l)

Function Documentation

void* cucon_slink_mem ( cucon_slink_t  l  ) 

The memory slot of the head node of l.

Precondition:
l is not empty.
cucon_slink_t cucon_slink_next ( cucon_slink_t  l  ) 

The list l with the head node removed.

Precondition:
l is not empty (NULL).
cucon_slink_t cucon_slink_prepend_mem ( cucon_slink_t  rest,
size_t  size 
)

Prepend a node with slot size size in front of rest, and return the result. Use cucon_slink_mem to obtain a pointer to the allocated slot.

cucon_slink_t cucon_slink_prepend_ptr ( cucon_slink_t  slink,
void *  ptr 
)

Prepend a node in front of rest with a slot containing ptr, and return the result.

void* cucon_slink_ptr ( cucon_slink_t  l  ) 

The value of the head node of l, assuming it's slot contains a pointer.

Precondition:
l is not empty.
Generated 2009-11-23 for culibs-0.25 using Doxygen. Maintained by Petter Urkedal.