Azinix

list.h File Reference

Double linked list code. More...

Go to the source code of this file.

Defines

#define LS_NIL   0
#define LS_BADSTATE   -3
#define LS_BADPARAM   -2
#define LS_NOMORE   -1
#define LS_OK   0
#define LS_BEFORE   1
#define LS_AFTER   2
#define LS_STOP   3
#define LS_DELETE   4
#define LS_NH   (lsHandle *) 0
#define lsForEachItem(list,gen,data)

Typedefs

typedef void ls_dummy
typedef ls_dummylsList
typedef ls_dummylsGen
typedef ls_dummylsHandle
typedef int lsStatus
typedef char * lsGeneric
typedef lsGeneric(*) LS_PFLSG ()

Functions

lsList lsCreate (void)
lsStatus lsDestroy (lsList, void(*)())
lsList lsCopy (lsList, LS_PFLSG)
lsStatus lsFirstItem (lsList, lsGeneric *, lsHandle *)
lsStatus lsLastItem (lsList, lsGeneric *, lsHandle *)
lsStatus lsNewBegin (lsList, lsGeneric, lsHandle *)
lsStatus lsNewEnd (lsList, lsGeneric, lsHandle *)
lsStatus lsDelBegin (lsList, lsGeneric *)
lsStatus lsDelEnd (lsList, lsGeneric *)
int lsLength (lsList)
lsGen lsStart (lsList)
lsGen lsEnd (lsList)
lsGen lsGenHandle (lsHandle, lsGeneric *, int)
lsStatus lsNext (lsGen, lsGeneric *, lsHandle *)
lsStatus lsPrev (lsGen, lsGeneric *, lsHandle *)
lsStatus lsInBefore (lsGen, lsGeneric, lsHandle *)
lsStatus lsInAfter (lsGen, lsGeneric, lsHandle *)
lsStatus lsDelBefore (lsGen, lsGeneric *)
lsStatus lsDelAfter (lsGen, lsGeneric *)
lsStatus lsFinish (lsGen)
lsList lsQueryHandle (lsHandle)
lsGeneric lsFetchHandle (lsHandle)
lsStatus lsRemoveItem (lsHandle, lsGeneric *)
lsStatus lsSort (lsList, int(*)())
lsStatus lsUniq (lsList, int(*)(), void(*)())


Detailed Description

Double linked list code.

Definition in file list.h.


Define Documentation

#define LS_AFTER   2

Definition at line 38 of file list.h.

#define LS_BADPARAM   -2

Definition at line 32 of file list.h.

#define LS_BADSTATE   -3

Definition at line 31 of file list.h.

#define LS_BEFORE   1

Definition at line 37 of file list.h.

#define LS_DELETE   4

Definition at line 40 of file list.h.

#define LS_NH   (lsHandle *) 0

Definition at line 47 of file list.h.

#define LS_NIL   0

Definition at line 29 of file list.h.

#define LS_NOMORE   -1

Definition at line 33 of file list.h.

#define LS_OK   0

Definition at line 35 of file list.h.

#define LS_STOP   3

Definition at line 39 of file list.h.

#define lsForEachItem ( list,
gen,
data   ) 

Value:

for(gen = lsStart(list);                       \
      (lsNext(gen, (lsGeneric *) &data, LS_NH) == LS_OK)       \
      || ((void) lsFinish(gen), 0);                            \
      )

Definition at line 120 of file list.h.


Typedef Documentation

typedef void ls_dummy

Definition at line 21 of file list.h.

typedef lsGeneric(*) LS_PFLSG()

Definition at line 49 of file list.h.

typedef ls_dummy* lsGen

Definition at line 24 of file list.h.

typedef char* lsGeneric

Definition at line 27 of file list.h.

typedef ls_dummy* lsHandle

Definition at line 25 of file list.h.

typedef ls_dummy* lsList

Definition at line 23 of file list.h.

typedef int lsStatus

Definition at line 26 of file list.h.


Function Documentation

lsList lsCopy ( lsList  ,
LS_PFLSG   
)

lsList lsCreate ( void   ) 

Definition at line 74 of file list.c.

lsStatus lsDelAfter ( lsGen  ,
lsGeneric  
)

Definition at line 728 of file list.c.

lsStatus lsDelBefore ( lsGen  ,
lsGeneric  
)

Definition at line 678 of file list.c.

lsStatus lsDelBegin ( lsList  ,
lsGeneric  
)

Definition at line 327 of file list.c.

lsStatus lsDelEnd ( lsList  ,
lsGeneric  
)

Definition at line 370 of file list.c.

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

Definition at line 89 of file list.c.

lsGen lsEnd ( lsList   ) 

Definition at line 440 of file list.c.

lsGeneric lsFetchHandle ( lsHandle   ) 

Definition at line 914 of file list.c.

lsStatus lsFinish ( lsGen   ) 

Definition at line 779 of file list.c.

lsStatus lsFirstItem ( lsList  ,
lsGeneric ,
lsHandle  
)

Definition at line 241 of file list.c.

lsGen lsGenHandle ( lsHandle  ,
lsGeneric ,
int   
)

Definition at line 460 of file list.c.

lsStatus lsInAfter ( lsGen  ,
lsGeneric  ,
lsHandle  
)

Definition at line 628 of file list.c.

lsStatus lsInBefore ( lsGen  ,
lsGeneric  ,
lsHandle  
)

Definition at line 579 of file list.c.

lsStatus lsLastItem ( lsList  ,
lsGeneric ,
lsHandle  
)

Definition at line 272 of file list.c.

int lsLength ( lsList   ) 

Definition at line 309 of file list.c.

lsStatus lsNewBegin ( lsList  ,
lsGeneric  ,
lsHandle  
)

Definition at line 168 of file list.c.

lsStatus lsNewEnd ( lsList  ,
lsGeneric  ,
lsHandle  
)

Definition at line 206 of file list.c.

lsStatus lsNext ( lsGen  ,
lsGeneric ,
lsHandle  
)

Definition at line 501 of file list.c.

lsStatus lsPrev ( lsGen  ,
lsGeneric ,
lsHandle  
)

Definition at line 540 of file list.c.

lsList lsQueryHandle ( lsHandle   ) 

Definition at line 893 of file list.c.

lsStatus lsRemoveItem ( lsHandle  ,
lsGeneric  
)

Definition at line 926 of file list.c.

lsStatus lsSort ( lsList  ,
int(*)()   
)

lsGen lsStart ( lsList   ) 

Definition at line 419 of file list.c.

lsStatus lsUniq ( lsList  ,
int(*)()  ,
void(*)()   
)

Definition at line 954 of file list.c.