Main Page | Modules | Data Structures | File List | Data Fields | Globals

List system.

Widely used in kernel and libraries, PBList and derivated are very usefull. More...


Files

file  list.c
 List core file.
file  list.h
 List Header file.

Data Structures

struct  TBListItem
 Basic List Item. More...
struct  TSListItem
 Simple List Item. More...
struct  TBList
 Basic and Simple List (identical). More...

Typedefs

typedef TBListItem TBListItem
 Basic List Item.
typedef TSListItem TSListItem
 Simple List Item.
typedef TSListItemPSListItem
 Simple List Item.
typedef TBList TBList
 Basic and Simple List (identical).
typedef TBListPBList
 Basic and Simple List (identical).
typedef TBListPSList
 Basic and Simple List (identical).

Functions

PListItem ListAtItem (PList o, unsigned long Index)
 Found the item that index is specified one.
void * ListAt (PList o, unsigned long Index)
 Found the data associated to item that index is specified one.
PListItem ListKeyItem (PList o, char *Key)
 Found the item that Key is specified one.
void * ListKey (PList o, char *Key)
 Found the data associated to item that Key is specified one.
PListItem ListKeyCaseItem (PList o, char *Key)
 Found the item that Key is specified one ignoring the case.
void * ListKeyCase (PList o, char *Key)
 Found the data associated to item that Key is specified one ignoring the case.
PListItem ListFoundItem (PList o, void *Data)
 Found the item that Data is specified one.
unsigned long ListFoundIndex (PList o, void *Data)
 Determines the index of item that Data is specified one.
PList NewList (void)
 Creates a PList.
void FreeList (PList o)
 Free a list and items data (using the FreeData procedure if specified, else doesn't free data).
void KickList (PList o)
 Free a List but do not free items data.

Detailed Description

Widely used in kernel and libraries, PBList and derivated are very usefull.

PList is the most used system as it is the oldest and have interresting functionalities. PBList and PSList provide an inline module, so very fast, and lightweight structures but have little funtionalities.
PSList is derivated form PBList : PBList functions can be used for PSList.
PList is derivated from PSList : PBList and PSList functions can be used for PList (to get better performances).
*BUT* do not allocate a PSList item in a PList, system will crash.


Function Documentation

void FreeList PList  o  ) 
 

Free a list and items data (using the FreeData procedure if specified, else doesn't free data).

Parameters:
o List to free

void KickList PList  o  ) 
 

Free a List but do not free items data.

Note:
Similar to FreeSList((PSList)o,NULL)

void * ListAt PList  o,
unsigned long  Index
 

Found the data associated to item that index is specified one.

Parameters:
o List containing the item
Index Index to found
Returns:
NULL on error, or searched data

PListItem ListAtItem PList  o,
unsigned long  Index
 

Found the item that index is specified one.

Parameters:
o List containing the item
Index Index to found
Returns:
NULL on error, or searched data

unsigned long ListFoundIndex PList  o,
void *  Data
 

Determines the index of item that Data is specified one.

Parameters:
o List containing the item
Data Data to found
Returns:
-1 on error, or item index

PListItem ListFoundItem PList  o,
void *  Data
 

Found the item that Data is specified one.

Parameters:
o List containing the item
Data Data to found
Returns:
NULL on error, or a pointer to item
Note:
Similar to ((PListItem)SListFoundItem((PSList)o,Data))

void * ListKey PList  o,
char *  Key
 

Found the data associated to item that Key is specified one.

Case sensitive.

Parameters:
o List containing the item
Key Item key to found
Returns:
NULL on error, or searched data

void * ListKeyCase PList  o,
char *  Key
 

Found the data associated to item that Key is specified one ignoring the case.

Parameters:
o List containing the item
Key Item key to found
Returns:
NULL on error, or searched data

PListItem ListKeyCaseItem PList  o,
char *  Key
 

Found the item that Key is specified one ignoring the case.

Parameters:
o List containing the item
Key Item key to found
Returns:
NULL on error, or a pointer to item

PListItem ListKeyItem PList  o,
char *  Key
 

Found the item that Key is specified one.

Case sensitive.

Parameters:
o List containing the item
Key Item key to found
Returns:
NULL on error, or a pointer to item

PList NewList void   ) 
 

Creates a PList.

Note:
Never forget to free the returned list after use.
See also:
FreeList


Generated on Fri Oct 29 14:32:53 2004 for oZone GUI by doxygen 1.3.8