Ludum Dare 29
HackSoc's entry for the Ludum Dare Jam 29
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Functions
list.c File Reference
#include <assert.h>
#include <stddef.h>
#include "list.h"
Include dependency graph for list.c:

Functions

void setnext (List *list, List *next)
 
void setprev (List *list, List *prev)
 
Listgethead (List *list)
 
Listgettail (List *list)
 
Listdrop (List *list)
 
Listdropall (List **items)
 
Listinsert (List *list, List *insert)
 
Listinsertall (List *list, List **items)
 
Listappend (List *target, List *source)
 
unsigned int length (List *list)
 

Function Documentation

List* append ( List target,
List source 
)

Appends the source list to the target list. Returns the new head.

Parameters
targetThe list to append to
sourceThe list to append

Here is the call graph for this function:

Here is the caller graph for this function:

List* drop ( List list)

Chop the given item out of the list, updating the prev and next. Returns the head of the list (may not have changed)

Parameters
listThe list item to remove

Here is the call graph for this function:

Here is the caller graph for this function:

List* dropall ( List **  items)

Remove all the given list items. Returns the new head

Parameters
itemsList of list items to remove

Here is the call graph for this function:

Here is the caller graph for this function:

List* gethead ( List list)

Find the head of a list

Parameters
listList to search

Here is the caller graph for this function:

List* gettail ( List list)

Find the tail of a list

Parameters
listList to search

Here is the caller graph for this function:

List* insert ( List list,
List insert 
)

Insert an item to a list. Returns the head.

Parameters
listThe list to mutate
insertThe list item to insert

Here is the call graph for this function:

Here is the caller graph for this function:

List* insertall ( List list,
List **  items 
)

Insert all the given items to the list. Returns the new head.

Parameters
listThe list to mutate
itemsList of list items to insert

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned int length ( List list)

Get the length of the list

Parameters
listThe list

Here is the caller graph for this function:

void setnext ( List list,
List next 
)

Set the next entry of a list.

Parameters
listThe list to mutate
nextThe new next entry

Here is the caller graph for this function:

void setprev ( List list,
List prev 
)

Set the previous entry of a list.

Parameters
listThe list to mutate
prevThe new prev entry

Here is the caller graph for this function: