EBOOK-TOOLS
|
#include <stdio.h>
#include <stdlib.h>
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 /* Add New Node At Current Record In List */ |
#define | LISTADDHEAD 0x100 /* Add New Nodes At Head Of List */ |
#define | LISTADDMASK 0xF00 /* Add New Node Method */ |
#define | LISTADDSPLAY 0x400 /* Add New Nodes As A Splay Tree */ |
#define | LISTADDTAIL 0x200 /* Add New Nodes At Tail Of List */ |
#define | LISTBTREE 0x4000 /* List is actually a binary tree */ |
#define | LISTCIRCULAR 0x2000 /* Circular List - Head->Next=Tail, etc */ |
#define | LISTDELCURR 0x030 /* Delete Nodes At Current Record */ |
#define | LISTDELHEAD 0x010 /* Delete Nodes At Head Of List */ |
#define | LISTDELMASK 0x0F0 /* Delete Node Method */ |
#define | LISTDELREAD 0x1000 /* Delete Node On Reading */ |
#define | LISTDELSPLAY 0x040 /* Delete Nodes As A Splay Tree */ |
#define | LISTDELTAIL 0x020 /* Delete Nodes At Tail Of List */ |
#define | LISTFLAGMASK 0xF000 /* Operation Flags */ |
#define | LISTREADCURR 0x003 /* Read List At Current Node */ |
#define | LISTREADHEAD 0x001 /* Read Head Of List */ |
#define | LISTREADMASK 0x00F /* Read Node Method */ |
#define | LISTREADTAIL 0x002 /* Read Tail Of List */ |
#define | LLIST_BADVALUE LLIST_NULL |
#define | LLIST_ERROR -1 /* Misc. program/library error. Serious trouble! */ |
#define | LLIST_NOERROR 0 /* No problem! */ |
#define | LLIST_NULL 1 /* Bad value passed to function */ |
#define | LLIST_OK LLIST_NOERROR /* duplicate definitions for compatibility */ |
#define | NewList(Type) NewListAlloc(Type, NULL, NULL, NULL) |
#define | NewNode(Data) NewListNode(NULL, 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) |
#define CIRCULAR_QUEUE (QUEUE | LISTCIRCULAR) |
Definition at line 103 of file linklist.h.
#define DCOUNT dcount |
Definition at line 170 of file linklist.h.
#define DFREE dfree |
Definition at line 167 of file linklist.h.
#define DMALLOC malloc |
Definition at line 164 of file linklist.h.
#define FIFO (LISTADDTAIL | LISTREADHEAD | LISTDELHEAD) |
Definition at line 99 of file linklist.h.
#define LIFO (LISTADDHEAD | LISTREADHEAD | LISTDELHEAD) |
Definition at line 100 of file linklist.h.
#define LIST (LISTADDCURR | LISTREADCURR | LISTDELCURR) |
Definition at line 98 of file linklist.h.
#define LISTADDCURR 0x300 /* Add New Node At Current Record In List */ |
Definition at line 75 of file linklist.h.
#define LISTADDHEAD 0x100 /* Add New Nodes At Head Of List */ |
Definition at line 76 of file linklist.h.
#define LISTADDMASK 0xF00 /* Add New Node Method */ |
Definition at line 92 of file linklist.h.
#define LISTADDSPLAY 0x400 /* Add New Nodes As A Splay Tree */ |
Definition at line 78 of file linklist.h.
#define LISTADDTAIL 0x200 /* Add New Nodes At Tail Of List */ |
Definition at line 77 of file linklist.h.
#define LISTBTREE 0x4000 /* List is actually a binary tree */ |
Definition at line 89 of file linklist.h.
#define LISTCIRCULAR 0x2000 /* Circular List - Head->Next=Tail, etc */ |
Definition at line 88 of file linklist.h.
#define LISTDELCURR 0x030 /* Delete Nodes At Current Record */ |
Definition at line 79 of file linklist.h.
#define LISTDELHEAD 0x010 /* Delete Nodes At Head Of List */ |
Definition at line 80 of file linklist.h.
#define LISTDELMASK 0x0F0 /* Delete Node Method */ |
Definition at line 93 of file linklist.h.
#define LISTDELREAD 0x1000 /* Delete Node On Reading */ |
Definition at line 87 of file linklist.h.
#define LISTDELSPLAY 0x040 /* Delete Nodes As A Splay Tree */ |
Definition at line 82 of file linklist.h.
#define LISTDELTAIL 0x020 /* Delete Nodes At Tail Of List */ |
Definition at line 81 of file linklist.h.
#define LISTFLAGMASK 0xF000 /* Operation Flags */ |
Definition at line 95 of file linklist.h.
#define LISTREADCURR 0x003 /* Read List At Current Node */ |
Definition at line 83 of file linklist.h.
#define LISTREADHEAD 0x001 /* Read Head Of List */ |
Definition at line 84 of file linklist.h.
#define LISTREADMASK 0x00F /* Read Node Method */ |
Definition at line 94 of file linklist.h.
#define LISTREADTAIL 0x002 /* Read Tail Of List */ |
Definition at line 85 of file linklist.h.
#define LLIST_BADVALUE LLIST_NULL |
Definition at line 114 of file linklist.h.
#define LLIST_ERROR -1 /* Misc. program/library error. Serious trouble! */ |
Definition at line 111 of file linklist.h.
#define LLIST_NOERROR 0 /* No problem! */ |
Definition at line 109 of file linklist.h.
#define LLIST_NULL 1 /* Bad value passed to function */ |
Definition at line 110 of file linklist.h.
#define LLIST_OK LLIST_NOERROR /* duplicate definitions for compatibility */ |
Definition at line 113 of file linklist.h.
#define NewList | ( | Type | ) | NewListAlloc(Type, NULL, NULL, NULL) |
Definition at line 190 of file linklist.h.
#define NewNode | ( | Data | ) | NewListNode(NULL, Data) |
Definition at line 202 of file linklist.h.
#define QUEUE (FIFO | LISTDELREAD) |
Definition at line 101 of file linklist.h.
#define STACK (LIFO | LISTDELREAD) |
Definition at line 102 of file linklist.h.
#define STREE (LISTBTREE | LISTADDSPLAY | LISTDELSPLAY | LISTREADCURR) |
Definition at line 104 of file linklist.h.
typedef void *(* ListAlloc) (size_t size) |
Definition at line 123 of file linklist.h.
typedef int(* ListDumpFunc) (void *) |
Definition at line 135 of file linklist.h.
typedef void(* ListFreeFunc) (void *) |
Definition at line 120 of file linklist.h.
typedef struct ListNode* listnodePtr |
Definition at line 138 of file linklist.h.
Definition at line 146 of file linklist.h.
typedef int(* NodeCompareFunc) (void *, void *) |
Definition at line 126 of file linklist.h.
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 | ||
) |