Main Page   Modules   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

LIST handler


Files

file  list.c
file  list.h

Functions

entryLIST_head (list *l)
 returns a pointer to the head entry of a list. More...

entryLIST_tail (list *l)
 returns a pointer to the tail entry of a list. More...

void LIST_init (list *l)
 initializes a list for first use. More...

int LIST_entries (list *l)
 returns the number of entries in a list. More...

void LIST_insert_after (entry *e, entry *x)
 inserts an entry after another entry in a list. More...

void LIST_insert_before (entry *e, entry *x)
 inserts an entry before another entry in a list. More...

void LIST_insert_head (list *l, entry *e)
 inserts an entry into a list as head entry and moves the previous head entry. More...

void LIST_insert_tail (list *l, entry *e)
 inserts an entry into a list as tail entry and moves the previous tail entry. More...

void LIST_delete (entry *e)
 deletes an entry from its current list. More...

void LIST_makeentry (entry *e)
 prepares an entry for (re-)use. More...


Detailed Description

This component deals with lists of things

Function Documentation

void LIST_delete entry   e
 

deletes an entry from its current list.

Parameters:
e  is a pointer to the entry
If e is not in a list, the function fails.

Definition at line 195 of file list.c.

References list_s::entries, list_s::head, entry_s::list, entry_s::next, entry_s::prev, and list_s::tail.

int LIST_entries list   l
 

returns the number of entries in a list.

Parameters:
l  is a pointer to a list

Definition at line 68 of file list.c.

References list_s::entries.

entry* LIST_head list   l
 

returns a pointer to the head entry of a list.

Parameters:
l  is a pointer to a list

Definition at line 28 of file list.c.

References list_s::head.

void LIST_init list   l
 

initializes a list for first use.

Parameters:
l  is a pointer to a list

Definition at line 53 of file list.c.

References list_s::entries, list_s::head, LIST_TYPE_USER, list_s::tail, and list_s::type.

void LIST_insert_after entry   e,
entry   x
 

inserts an entry after another entry in a list.

Parameters:
e  is a pointer to the entry to be inserted
x  is a pointer to the entry after which e is to be inserted
The list for e to be inserted to is determined by dereferencing x's list field. If e is already in a list, the function fails.

Definition at line 84 of file list.c.

References list_s::entries, entry_s::list, entry_s::next, entry_s::prev, and list_s::tail.

void LIST_insert_before entry   e,
entry   x
 

inserts an entry before another entry in a list.

Parameters:
e  is a pointer to the entry to be inserted
x  is a pointer to the entry before which e is to be inserted
The list for e to be inserted to is determined by dereferencing x's list field. If e is already in a list, the function fails.

Definition at line 113 of file list.c.

References list_s::entries, list_s::head, entry_s::list, entry_s::next, and entry_s::prev.

void LIST_insert_head list   l,
entry   e
 

inserts an entry into a list as head entry and moves the previous head entry.

Parameters:
l  is a pointer to the list
e  is a pointer to the entry
If e is already in a list, the function fails.

Definition at line 141 of file list.c.

References list_s::entries, list_s::head, entry_s::list, LIST_insert_before, entry_s::next, entry_s::prev, and list_s::tail.

void LIST_insert_tail list   l,
entry   e
 

inserts an entry into a list as tail entry and moves the previous tail entry.

Parameters:
l  is a pointer to the list
e  is a pointer to the entry
If e is already in a list, the function fails.

Definition at line 168 of file list.c.

References list_s::entries, list_s::head, entry_s::list, LIST_insert_after, entry_s::next, entry_s::prev, and list_s::tail.

void LIST_makeentry entry   e
 

prepares an entry for (re-)use.

Parameters:
e  is a pointer to the entry

Definition at line 218 of file list.c.

References entry_s::data, entry_s::len, entry_s::list, entry_s::next, and entry_s::prev.

entry* LIST_tail list   l
 

returns a pointer to the tail entry of a list.

Parameters:
l  is a pointer to a list

Definition at line 41 of file list.c.

References list_s::tail.


Generated on Thu Feb 20 15:39:02 2003 for cubeOS by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002