48 if (pAddList->
count == 0)
51 if (pDstList->
count == 0) {
131 while(pnode != pEndNode)
136 pSrcList->
count -= count;
137 pDstList->
count += count;
209 if ((nodeNum < 1) || (pList->
count == 0))
212 if (nodeNum > pList->
count/2) {
213 if (nodeNum > pList->
count)
217 nodeNum = pList->
count - nodeNum;
226 while (--nodeNum > 0)
240 while ((pNode !=
NULL) && nStep) {
245 while ((pNode !=
NULL) && nStep) {
263 while ((got != pNode) && (got !=
NULL)) {
287 while (nnode !=
NULL)
ELLNODE * ellNStep(ELLNODE *pNode, int nStep)
Find the list node nStep steps away from a specified node.
#define assert(exp)
Declare that a condition should be true.
#define ellCount(PLIST)
Report the number of nodes in a list.
An EPICS-specific replacement for ANSI C's assert.
ELLNODE * ellNth(ELLLIST *pList, int nodeNum)
Find the Nth node in a list.
void ellFree2(ELLLIST *pList, FREEFUNC freeFunc)
Free all the nodes in a list.
ELLNODE * ellGet(ELLLIST *pList)
Deletes and returns the first node from a list.
#define ellPrevious(PNODE)
Find the previous node in list.
A doubly-linked list library.
void ellAdd(ELLLIST *pList, ELLNODE *pNode)
Adds a node to the end of a list.
#define ellNext(PNODE)
Find the next node in list.
int ellFind(ELLLIST *pList, ELLNODE *pNode)
Find the index of a specific node in a list.
void(* FREEFUNC)(void *)
Pointer to free() for use by ellFree() macro.
#define ellLast(PLIST)
Find the last node in list.
struct ELLNODE * previous
Pointer to previous node in list.
struct ELLNODE * next
Pointer to next node in list.
int count
Number of nodes on the list.
void ellInsert(ELLLIST *plist, ELLNODE *pPrev, ELLNODE *pNode)
Inserts a node into a list immediately after a specific node.
void ellConcat(ELLLIST *pDstList, ELLLIST *pAddList)
Concatenates a list to the end of another list. The list to be added is left empty. Either list (or both) can be empty at the beginning of the operation.
ELLNODE * ellPop(ELLLIST *pList)
Deletes and returns the last node from a list.
void ellExtract(ELLLIST *pSrcList, ELLNODE *pStartNode, ELLNODE *pEndNode, ELLLIST *pDstList)
Extract a sublist from a list.
void ellVerify(ELLLIST *pList)
Verifies that the list is consistent.
void ellDelete(ELLLIST *pList, ELLNODE *pNode)
Deletes a node from a list.
ELLNODE node
Pointers to the first and last nodes on list.
#define ellFirst(PLIST)
Find the first node in list.