Azinix

list.c File Reference

Double linked list code. More...

#include "util.h"
#include "list.h"

Go to the source code of this file.

Defines

#define TYPE   lsElem
#define SORT   lsSortItems
#define NEXT   nextPtr
#define FIELD   userData

Typedefs

typedef list_elem lsElem
typedef list_desc lsDesc
typedef gen_desc lsGenInternal

Functions

lsList lsCreate ()
lsStatus lsDestroy (lsList list, void(*delFunc)())
lsList lsCopy (lsList list, lsGeneric(*copyFunc)())
lsStatus lsNewBegin (lsList list, lsGeneric data, lsHandle *itemHandle)
lsStatus lsNewEnd (lsList list, lsGeneric data, lsHandle *itemHandle)
lsStatus lsFirstItem (lsList list, lsGeneric *data, lsHandle *itemHandle)
lsStatus lsLastItem (lsList list, lsGeneric *data, lsHandle *itemHandle)
int lsLength (lsList list)
lsStatus lsDelBegin (lsList list, lsGeneric *data)
lsStatus lsDelEnd (lsList list, lsGeneric *data)
lsGen lsStart (lsList list)
lsGen lsEnd (lsList list)
lsGen lsGenHandle (lsHandle itemHandle, lsGeneric *data, int option)
lsStatus lsNext (lsGen generator, lsGeneric *data, lsHandle *itemHandle)
lsStatus lsPrev (lsGen generator, lsGeneric *data, lsHandle *itemHandle)
lsStatus lsInBefore (lsGen generator, lsGeneric data, lsHandle *itemHandle)
lsStatus lsInAfter (lsGen generator, lsGeneric data, lsHandle *itemHandle)
lsStatus lsDelBefore (lsGen generator, lsGeneric *data)
lsStatus lsDelAfter (lsGen generator, lsGeneric *data)
lsStatus lsFinish (lsGen generator)
lsStatus lsForeach (lsList list, lsStatus(*userFunc)(), lsGeneric arg)
lsStatus lsBackeach (lsList list, lsStatus(*userFunc)(), lsGeneric arg)
lsList lsQueryHandle (lsHandle itemHandle)
lsGeneric lsFetchHandle (lsHandle itemHandle)
lsStatus lsRemoveItem (lsHandle itemHandle, lsGeneric *userData)
lsStatus lsUniq (lsList list, int(*compare)(), void(*delFunc)())


Detailed Description

Double linked list code.

It uses a doubly linked list structure and provides some standard operations for storing and retrieving data from the list.

Definition in file list.c.


Define Documentation

#define FIELD   userData

Definition at line 951 of file list.c.

#define NEXT   nextPtr

Definition at line 950 of file list.c.

#define SORT   lsSortItems

Definition at line 949 of file list.c.

#define TYPE   lsElem

Definition at line 948 of file list.c.


Typedef Documentation

typedef struct list_desc lsDesc

typedef struct list_elem lsElem

AutomaticEnd

typedef struct gen_desc lsGenInternal


Function Documentation

lsStatus lsBackeach ( lsList  list,
lsStatus(*)()  userFunc,
lsGeneric  arg 
)

Definition at line 840 of file list.c.

lsList lsCopy ( lsList  list,
lsGeneric(*)()  copyFunc 
)

Definition at line 131 of file list.c.

lsList lsCreate ( void   ) 

Definition at line 74 of file list.c.

lsStatus lsDelAfter ( lsGen  generator,
lsGeneric data 
)

Definition at line 728 of file list.c.

lsStatus lsDelBefore ( lsGen  generator,
lsGeneric data 
)

Definition at line 678 of file list.c.

lsStatus lsDelBegin ( lsList  list,
lsGeneric data 
)

Definition at line 327 of file list.c.

lsStatus lsDelEnd ( lsList  list,
lsGeneric data 
)

Definition at line 370 of file list.c.

lsStatus lsDestroy ( lsList  list,
void(*)()  delFunc 
)

Definition at line 89 of file list.c.

lsGen lsEnd ( lsList  list  ) 

Definition at line 440 of file list.c.

lsGeneric lsFetchHandle ( lsHandle  itemHandle  ) 

Definition at line 914 of file list.c.

lsStatus lsFinish ( lsGen  generator  ) 

Definition at line 779 of file list.c.

lsStatus lsFirstItem ( lsList  list,
lsGeneric data,
lsHandle itemHandle 
)

Definition at line 241 of file list.c.

lsStatus lsForeach ( lsList  list,
lsStatus(*)()  userFunc,
lsGeneric  arg 
)

Definition at line 814 of file list.c.

lsGen lsGenHandle ( lsHandle  itemHandle,
lsGeneric data,
int  option 
)

Definition at line 460 of file list.c.

lsStatus lsInAfter ( lsGen  generator,
lsGeneric  data,
lsHandle itemHandle 
)

Definition at line 628 of file list.c.

lsStatus lsInBefore ( lsGen  generator,
lsGeneric  data,
lsHandle itemHandle 
)

Definition at line 579 of file list.c.

lsStatus lsLastItem ( lsList  list,
lsGeneric data,
lsHandle itemHandle 
)

Definition at line 272 of file list.c.

int lsLength ( lsList  list  ) 

Definition at line 309 of file list.c.

lsStatus lsNewBegin ( lsList  list,
lsGeneric  data,
lsHandle itemHandle 
)

Definition at line 168 of file list.c.

lsStatus lsNewEnd ( lsList  list,
lsGeneric  data,
lsHandle itemHandle 
)

Definition at line 206 of file list.c.

lsStatus lsNext ( lsGen  generator,
lsGeneric data,
lsHandle itemHandle 
)

Definition at line 501 of file list.c.

lsStatus lsPrev ( lsGen  generator,
lsGeneric data,
lsHandle itemHandle 
)

Definition at line 540 of file list.c.

lsList lsQueryHandle ( lsHandle  itemHandle  ) 

Definition at line 893 of file list.c.

lsStatus lsRemoveItem ( lsHandle  itemHandle,
lsGeneric userData 
)

Definition at line 926 of file list.c.

lsGen lsStart ( lsList  list  ) 

Definition at line 419 of file list.c.

lsStatus lsUniq ( lsList  list,
int(*)()  compare,
void(*)()  delFunc 
)

Definition at line 954 of file list.c.