EBOOK-TOOLS
linklist.h File Reference
#include <stdio.h>
#include <stdlib.h>
Include dependency graph for linklist.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ListNode
struct  LList

Macros

#define CIRCULAR_QUEUE   (QUEUE | LISTCIRCULAR)
#define DCOUNT   dcount
#define DFREE   dfree
#define DMALLOC   malloc
#define FIFO   (LISTADDTAIL | LISTREADHEAD | LISTDELHEAD)
#define LIFO   (LISTADDHEAD | LISTREADHEAD | LISTDELHEAD)
#define LIST   (LISTADDCURR | LISTREADCURR | LISTDELCURR)
#define LISTADDCURR   0x300
#define LISTADDHEAD   0x100
#define LISTADDMASK   0xF00
#define LISTADDSPLAY   0x400
#define LISTADDTAIL   0x200
#define LISTBTREE   0x4000
#define LISTCIRCULAR   0x2000
#define LISTDELCURR   0x030
#define LISTDELHEAD   0x010
#define LISTDELMASK   0x0F0
#define LISTDELREAD   0x1000
#define LISTDELSPLAY   0x040
#define LISTDELTAIL   0x020
#define LISTFLAGMASK   0xF000
#define LISTREADCURR   0x003
#define LISTREADHEAD   0x001
#define LISTREADMASK   0x00F
#define LISTREADTAIL   0x002
#define LLIST_BADVALUE   LLIST_NULL
#define LLIST_ERROR   -1
#define LLIST_NOERROR   0
#define LLIST_NULL   1
#define LLIST_OK   LLIST_NOERROR
#define NewList(Type)
#define NewNode(Data)
#define QUEUE   (FIFO | LISTDELREAD)
#define STACK   (LIFO | LISTDELREAD)
#define STREE   (LISTBTREE | LISTADDSPLAY | LISTDELSPLAY | LISTREADCURR)

Typedefs

typedef void *(*) ListAlloc(size_t size)
typedef int(*) ListDumpFunc(void *)
typedef void(*) ListFreeFunc(void *)
typedef struct ListNode listnode
typedef struct ListNode * listnodePtr
typedef struct LList * listPtr
typedef struct LList llist
typedef int(*) NodeCompareFunc(void *, void *)

Functions

int AddNode (listPtr List, listnodePtr Node)
void * BTFind (listPtr List, void *Data)
int DelHeadList (listPtr List)
int DelNode (listPtr List)
int DelTailList (listPtr List)
int DoubleCompare (double *First, double *Second)
int DumpList (listPtr List, ListDumpFunc DataDump)
void * FindNode (listPtr List, void *Data)
int FreeList (listPtr List, ListFreeFunc DataFree)
void * GetNode (listPtr List)
void * GetNodeData (listnodePtr Node)
int HeadList (listPtr List, listnodePtr Node)
void * IndexNode (listPtr List, int Index)
int InsertList (listPtr List, listnodePtr Node)
int IntCompare (int *First, int *Second)
listPtr NewListAlloc (int ListType, ListAlloc Lalloc, ListFreeFunc Lfree, NodeCompareFunc Cfunc)
listnodePtr NewListNode (listPtr List, void *Data)
void * NextNode (listPtr List)
void * PrevNode (listPtr List)
int RemoveList (listPtr List)
void SortList (listPtr List)
int SplayInsertList (listPtr List, listnodePtr Node)
void * SplayList (listPtr List, void *Data)
int StringCompare (char *First, char *Second)
void SwapList (listPtr List)
int TailList (listPtr List, listnodePtr Node)

Macro Definition Documentation

◆ CIRCULAR_QUEUE

#define CIRCULAR_QUEUE   (QUEUE | LISTCIRCULAR)

Definition at line 103 of file linklist.h.

◆ DCOUNT

#define DCOUNT   dcount

Definition at line 170 of file linklist.h.

◆ DFREE

#define DFREE   dfree

Definition at line 167 of file linklist.h.

◆ DMALLOC

#define DMALLOC   malloc

Definition at line 164 of file linklist.h.

◆ FIFO

#define FIFO   (LISTADDTAIL | LISTREADHEAD | LISTDELHEAD)

Definition at line 99 of file linklist.h.

◆ LIFO

#define LIFO   (LISTADDHEAD | LISTREADHEAD | LISTDELHEAD)

Definition at line 100 of file linklist.h.

◆ LIST

#define LIST   (LISTADDCURR | LISTREADCURR | LISTDELCURR)

Definition at line 98 of file linklist.h.

◆ LISTADDCURR

#define LISTADDCURR   0x300

Definition at line 75 of file linklist.h.

◆ LISTADDHEAD

#define LISTADDHEAD   0x100

Definition at line 76 of file linklist.h.

◆ LISTADDMASK

#define LISTADDMASK   0xF00

Definition at line 92 of file linklist.h.

◆ LISTADDSPLAY

#define LISTADDSPLAY   0x400

Definition at line 78 of file linklist.h.

◆ LISTADDTAIL

#define LISTADDTAIL   0x200

Definition at line 77 of file linklist.h.

◆ LISTBTREE

#define LISTBTREE   0x4000

Definition at line 89 of file linklist.h.

◆ LISTCIRCULAR

#define LISTCIRCULAR   0x2000

Definition at line 88 of file linklist.h.

◆ LISTDELCURR

#define LISTDELCURR   0x030

Definition at line 79 of file linklist.h.

◆ LISTDELHEAD

#define LISTDELHEAD   0x010

Definition at line 80 of file linklist.h.

◆ LISTDELMASK

#define LISTDELMASK   0x0F0

Definition at line 93 of file linklist.h.

◆ LISTDELREAD

#define LISTDELREAD   0x1000

Definition at line 87 of file linklist.h.

◆ LISTDELSPLAY

#define LISTDELSPLAY   0x040

Definition at line 82 of file linklist.h.

◆ LISTDELTAIL

#define LISTDELTAIL   0x020

Definition at line 81 of file linklist.h.

◆ LISTFLAGMASK

#define LISTFLAGMASK   0xF000

Definition at line 95 of file linklist.h.

◆ LISTREADCURR

#define LISTREADCURR   0x003

Definition at line 83 of file linklist.h.

◆ LISTREADHEAD

#define LISTREADHEAD   0x001

Definition at line 84 of file linklist.h.

◆ LISTREADMASK

#define LISTREADMASK   0x00F

Definition at line 94 of file linklist.h.

◆ LISTREADTAIL

#define LISTREADTAIL   0x002

Definition at line 85 of file linklist.h.

◆ LLIST_BADVALUE

#define LLIST_BADVALUE   LLIST_NULL

Definition at line 114 of file linklist.h.

◆ LLIST_ERROR

#define LLIST_ERROR   -1

Definition at line 111 of file linklist.h.

◆ LLIST_NOERROR

#define LLIST_NOERROR   0

Definition at line 109 of file linklist.h.

◆ LLIST_NULL

#define LLIST_NULL   1

Definition at line 110 of file linklist.h.

◆ LLIST_OK

#define LLIST_OK   LLIST_NOERROR

Definition at line 113 of file linklist.h.

◆ NewList

#define NewList ( Type)
Value:
NewListAlloc(Type, NULL, NULL, NULL)

Definition at line 190 of file linklist.h.

◆ NewNode

#define NewNode ( Data)
Value:
NewListNode(NULL, Data)

Definition at line 202 of file linklist.h.

◆ QUEUE

#define QUEUE   (FIFO | LISTDELREAD)

Definition at line 101 of file linklist.h.

◆ STACK

#define STACK   (LIFO | LISTDELREAD)

Definition at line 102 of file linklist.h.

◆ STREE

#define STREE   (LISTBTREE | LISTADDSPLAY | LISTDELSPLAY | LISTREADCURR)

Definition at line 104 of file linklist.h.

Typedef Documentation

◆ ListAlloc

typedef void *(*) ListAlloc(size_t size)

Definition at line 123 of file linklist.h.

◆ ListDumpFunc

typedef int(*) ListDumpFunc(void *)

Definition at line 135 of file linklist.h.

◆ ListFreeFunc

typedef void(*) ListFreeFunc(void *)

Definition at line 120 of file linklist.h.

◆ listnode

typedef struct ListNode listnode

◆ listnodePtr

typedef struct ListNode* listnodePtr

Definition at line 138 of file linklist.h.

◆ listPtr

typedef struct LList* listPtr

Definition at line 146 of file linklist.h.

◆ llist

typedef struct LList llist

◆ NodeCompareFunc

typedef int(*) NodeCompareFunc(void *, void *)

Definition at line 126 of file linklist.h.

Function Documentation

◆ AddNode()

int AddNode ( listPtr List,
listnodePtr Node )

References AddNode().

Referenced by AddNode().

◆ BTFind()

void * BTFind ( listPtr List,
void * Data )

References BTFind().

Referenced by BTFind().

◆ DelHeadList()

int DelHeadList ( listPtr List)

References DelHeadList().

Referenced by DelHeadList().

◆ DelNode()

int DelNode ( listPtr List)

References DelNode().

Referenced by DelNode().

◆ DelTailList()

int DelTailList ( listPtr List)

References DelTailList().

Referenced by DelTailList().

◆ DoubleCompare()

int DoubleCompare ( double * First,
double * Second )

References DoubleCompare().

Referenced by DoubleCompare().

◆ DumpList()

int DumpList ( listPtr List,
ListDumpFunc DataDump )

References DumpList().

Referenced by DumpList().

◆ FindNode()

void * FindNode ( listPtr List,
void * Data )

References FindNode().

Referenced by FindNode().

◆ FreeList()

int FreeList ( listPtr List,
ListFreeFunc DataFree )

References FreeList().

Referenced by FreeList().

◆ GetNode()

void * GetNode ( listPtr List)

References GetNode().

Referenced by GetNode().

◆ GetNodeData()

void * GetNodeData ( listnodePtr Node)

References GetNodeData().

Referenced by GetNodeData().

◆ HeadList()

int HeadList ( listPtr List,
listnodePtr Node )

References HeadList().

Referenced by HeadList().

◆ IndexNode()

void * IndexNode ( listPtr List,
int Index )

References IndexNode().

Referenced by IndexNode().

◆ InsertList()

int InsertList ( listPtr List,
listnodePtr Node )

References InsertList().

Referenced by InsertList().

◆ IntCompare()

int IntCompare ( int * First,
int * Second )

References IntCompare().

Referenced by IntCompare().

◆ NewListAlloc()

listPtr NewListAlloc ( int ListType,
ListAlloc Lalloc,
ListFreeFunc Lfree,
NodeCompareFunc Cfunc )

References NewListAlloc().

Referenced by NewListAlloc().

◆ NewListNode()

listnodePtr NewListNode ( listPtr List,
void * Data )

References NewListNode().

Referenced by NewListNode().

◆ NextNode()

void * NextNode ( listPtr List)

References NextNode().

Referenced by NextNode().

◆ PrevNode()

void * PrevNode ( listPtr List)

References PrevNode().

Referenced by PrevNode().

◆ RemoveList()

int RemoveList ( listPtr List)

References RemoveList().

Referenced by RemoveList().

◆ SortList()

void SortList ( listPtr List)

References SortList().

Referenced by SortList().

◆ SplayInsertList()

int SplayInsertList ( listPtr List,
listnodePtr Node )

References SplayInsertList().

Referenced by SplayInsertList().

◆ SplayList()

void * SplayList ( listPtr List,
void * Data )

References SplayList().

Referenced by SplayList().

◆ StringCompare()

int StringCompare ( char * First,
char * Second )

References StringCompare().

Referenced by StringCompare().

◆ SwapList()

void SwapList ( listPtr List)

References SwapList().

Referenced by SwapList().

◆ TailList()

int TailList ( listPtr List,
listnodePtr Node )

References TailList().

Referenced by TailList().