list.h File Reference

Linked lists header. More...

Go to the source code of this file.

Data Structures

struct  node_l
struct  _data

Typedefs

typedef node_l node_l
typedef _data data

Functions

int list_push (node_l **_x, void *_data)
 Adds a new node to the list.
void * list_pop (node_l **_x)
 Removes the first node from the list and returns its node data.
int list_move (node_l **_dest, node_l **_src)
 Moves a node from _src to _dest.
int list_reverse (node_l **_x)
 Reverses the order of a list.
node_llist_sub (const node_l *_x, int _pos)
 Returns a sub-list of _x.
int list_insert (node_l **_x, int _pos, void *_data)
 Inserts a new node at the specified position.
void * list_remove (node_l **_x, int _pos)
 Removes element at position _pos+1 from the list, returning its data.
void * list_get (const node_l *_x, int _n)
 Get data item of a list element.
size_t list_size (const node_l *_x)
 Computes the size of a list.
node_llist_join (node_l *_a, node_l *_b)
 Appends the list _src to the list _dest.
void list_print (const node_l *_a)
 Prints list elements.
int list_split (node_l **_src, node_l **_front, node_l **_back)
 Splits a list in two equal-sized sublists.
int list_merge (node_l **_dest, node_l **_a, node_l **_b, int _cmp(void *, void *))
 Merges two lists using _cmp to compare nodes.
int list_sort (node_l **_x, int _cmp(void *, void *))
 Sorts a list.
int list_copy (const node_l *_src, node_l **_dest)
 Makes a copy of a list, not including its data items (see list_dup()).
int list_realloc (node_l *_x, size_t _sz)
 Re-allocates storage for a list.
int list_dup (node_l *_src, node_l **_dest, size_t _sz)
 Duplicates a list, including its data items (see list_copy()).
void list_delete (node_l **_x)
 Deletes a list, not including its data items.
void list_destroy (node_l **_x)
 Destroys a list, including its data items.
int list_foreach (node_l *_x, int _func(void *))
 Calls a function for each list element.


Detailed Description

Linked lists header.

Definition in file list.h.


Typedef Documentation

typedef struct node_l node_l

Definition at line 35 of file list.h.

typedef struct _data data


Generated on Thu Jul 19 13:36:09 2007 for libv by  doxygen 1.5.1-p1. Thank you, SourceForge.net Logo