Main Page | Data Structures | File List | Globals | Related Pages

list.c File Reference

Provides the implementantion of list utility functions. More...

#include <list.h>

Functions

void list_clear (List *list)
 Clear the list.

ListIterator list_insert (ListIterator position, void *value)
 Insert into a list.

void * list_remove (ListIterator position)
 Remove from a list.

unsigned int list_size (List *list)
 Count list elements.


Detailed Description

Provides the implementantion of list utility functions.

Author:
Lee Salzman (lsalzman)

Hassaan Moin Khan (hkhan)

Bug:
No known bugs.

Function Documentation

void list_clear List *  list  ) 
 

Clear the list.

Clears the list to be empty.

Parameters:
list the list to clear
Returns:
Void

ListIterator list_insert ListIterator  position,
void *  value
 

Insert into a list.

Inserts a new value before the specified position in a list.

Parameters:
position iterator for the list position
value the value to insert into the list
Returns:
the iterator of the inserted item

void* list_remove ListIterator  position  ) 
 

Remove from a list.

Remove the specified position from a list.

Parameters:
position iterator for the list position
Returns:
the value at the position that was removed

unsigned int list_size List *  list  ) 
 

Count list elements.

Return the number of elements in a list.

Parameters:
list the list to count
Returns:
the number of elements in the list


Generated on Fri Apr 9 21:59:16 2004 for 15-410 Project 3 by doxygen 1.3.2