31 #include "rtxsrc/osSysTypes.h" 32 #include "rtxsrc/rtxExternDefs.h" 33 #include "rtxsrc/rtxCommonDefs.h" 83 #define DLISTBUF_SEG 16 88 OSUTF8CHAR utf8chars[1];
363 OSSIZE* pElemCount, OSSIZE elemSize);
405 OSSIZE numElements, OSSIZE elemSize);
424 OSSIZE numElements, OSSIZE elemSize);
442 (
struct OSCTXT* pctxt,
OSRTDList* pList, OSUTF8CHAR** ppstr,
char sep);
446 typedef int (*PEqualsFunc) (
const void* a,
const void* b,
447 const void* sortCtxt);
450 (
struct OSCTXT* pctxt,
OSRTDList* pList,
void* pData, PEqualsFunc equalsFunc,
460 #if defined(_MSC_VER) 463 #pragma warning(disable: 4127) 467 #define OSRTDLISTNODESIZE ((sizeof(OSRTDListNode)+7)&(~7)) 469 #define rtxDListAllocNodeAndData(pctxt,type,ppnode,ppdata) do { \ 470 *ppnode = (OSRTDListNode*) \ 471 rtxMemAlloc (pctxt, sizeof(type)+OSRTDLISTNODESIZE); \ 472 if (0 != *ppnode) { \ 473 (*ppnode)->data = (void*)((char*)(*ppnode)+OSRTDLISTNODESIZE); \ 474 *ppdata = (type*)((*ppnode)->data); \ 475 } else { *ppdata = 0; } \ 478 #define rtxDListAppendData(pctxt,pList,pData) do { \ 479 rtxDListAppend(pctxt,pList,pData); \ 484 #define rtxDListFastInit(pList) do { \ 485 if ((pList) != 0) { \ 486 (pList)->head = (pList)->tail = (OSRTDListNode*) 0; \ 487 (pList)->count = 0; } \ 490 #define rtxDListFreeTailNode(pctxt,pList) \ 491 rtxDListFreeNode(pctxt,pList,(pList)->tail) 493 #define rtxDListFreeHeadNode(pctxt,pList) \ 494 rtxDListFreeNode(pctxt,pList,(pList)->head) 499 OSSIZE segSz,
void** ppdata, OSSIZE elemSz);
void rtxDListFreeNodes(struct OSCTXT *pctxt, OSRTDList *pList)
OSRTDListNode * tail
Definition: rtxDList.h:67
OSRTDListNode * head
Definition: rtxDList.h:66
OSRTDListNode * rtxDListInsert(struct OSCTXT *pctxt, OSRTDList *pList, OSSIZE idx, void *pData)
struct OSRTDListNode * next
Definition: rtxDList.h:54
OSRTDListNode * rtxDListFindByIndex(const OSRTDList *pList, OSSIZE idx)
void rtxDListFreeNode(struct OSCTXT *pctxt, OSRTDList *pList, OSRTDListNode *node)
OSRTDListNode * rtxDListFindByData(const OSRTDList *pList, void *data)
void rtxDListInit(OSRTDList *pList)
Definition: rtxDList.h:64
struct OSRTDListNode * prev
Definition: rtxDList.h:55
int rtxDListAppendArray(struct OSCTXT *pctxt, OSRTDList *pList, void *pArray, OSSIZE numElements, OSSIZE elemSize)
void rtxDListFreeAll(struct OSCTXT *pctxt, OSRTDList *pList)
OSRTDListNode * rtxDListAppend(struct OSCTXT *pctxt, OSRTDList *pList, void *pData)
Definition: rtxDList.h:86
OSRTDListNode * rtxDListAppendNode(OSRTDList *pList, OSRTDListNode *pListNode)
int rtxDListAppendArrayCopy(struct OSCTXT *pctxt, OSRTDList *pList, const void *pArray, OSSIZE numElements, OSSIZE elemSize)
int rtxDListToArray(struct OSCTXT *pctxt, OSRTDList *pList, void **ppArray, OSSIZE *pElemCount, OSSIZE elemSize)
Definition: rtxDList.h:52
OSSIZE count
Definition: rtxDList.h:65
OSRTDListNode * rtxDListInsertBefore(struct OSCTXT *pctxt, OSRTDList *pList, OSRTDListNode *node, void *pData)
OSRTDListNode * rtxDListFindFirstData(const OSRTDList *pList)
int rtxDListToPointerArray(struct OSCTXT *pctxt, OSRTDList *pList, void ***ppArray, OSSIZE *pElemCount)
void rtxDListRemove(OSRTDList *pList, OSRTDListNode *node)
Definition: rtxContext.h:198
Definition: rtxDList.h:72
void * data
Definition: rtxDList.h:53
int rtxDListFindIndexByData(const OSRTDList *pList, void *data)
int rtxDListToUTF8Str(struct OSCTXT *pctxt, OSRTDList *pList, OSUTF8CHAR **ppstr, char sep)
OSRTDListNode * rtxDListAppendCharArray(struct OSCTXT *pctxt, OSRTDList *pList, size_t length, char *pData)
OSRTDListNode * rtxDListInsertAfter(struct OSCTXT *pctxt, OSRTDList *pList, OSRTDListNode *node, void *pData)