linkedlist.h File Reference

A simple doubly linked, unsorted list implementation. More...

#include <malloc.h>

Data Structures

struct  LinkedList
 A node for the linked list. More...

Typedefs

typedef struct LinkedList LinkedList
 A node for the linked list.

Functions

LinkedListlinkedlistAdd (LinkedList **front, void *data)
 Adds data to a linked list.
void linkedlistRemove (LinkedList *node)
 Removes a node from a linked list.

Detailed Description

A simple doubly linked, unsorted list implementation.


Function Documentation

LinkedList* linkedlistAdd ( LinkedList **  front,
void *  data 
)

Adds data to a linked list.

This will only store the pointer to the data, so you have to make sure that the pointer stays valid.

Parameters:
front A pointer to a pointer to the front of the linked list (or a pointer to NULL if you don't have a linked list yet).
data A pointer to the data you want to store.
Returns:
A pointer to the new node, which is also the new front, or NULL if there is not enough memory.
void linkedlistRemove ( LinkedList node  ) 

Removes a node from a linked list.

The data pointer of the node will be lost after this, so make sure you don't need it anymore.

Parameters:
node The node you want to remove.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines
Generated on Sat Oct 2 12:55:13 2010 for libnds by  doxygen 1.6.3