libnds
|
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 | |
LinkedList * | linkedlistAdd (LinkedList **front, void *data) |
Adds data to a linked list. More... | |
void | linkedlistRemove (LinkedList *node) |
Removes a node from a linked list. More... | |
A simple doubly linked, unsorted list implementation.
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.
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. |
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.
node | The node you want to remove. |