31 #include "rtxsrc/osSysTypes.h" 32 #include "rtxsrc/rtxExternDefs.h" 33 #include "rtxsrc/rtxCommonDefs.h" 83 #define DLISTBUF_SEG 16 88 OSUTF8CHAR utf8chars[1];
360 OSSIZE* pElemCount, OSSIZE elemSize);
380 OSSIZE numElements, OSSIZE elemSize);
399 OSSIZE numElements, OSSIZE elemSize);
417 (
struct OSCTXT* pctxt,
OSRTDList* pList, OSUTF8CHAR** ppstr,
char sep);
421 typedef int (*PEqualsFunc) (
const void* a,
const void* b,
422 const void* sortCtxt);
425 (
struct OSCTXT* pctxt,
OSRTDList* pList,
void* pData, PEqualsFunc equalsFunc,
435 #if defined(_MSC_VER) 438 #pragma warning(disable: 4127) 442 #define OSRTDLISTNODESIZE ((sizeof(OSRTDListNode)+7)&(~7)) 444 #define rtxDListAllocNodeAndData(pctxt,type,ppnode,ppdata) do { \ 445 *ppnode = (OSRTDListNode*) \ 446 rtxMemAlloc (pctxt, sizeof(type)+OSRTDLISTNODESIZE); \ 447 if (0 != *ppnode) { \ 448 (*ppnode)->data = (void*)((char*)(*ppnode)+OSRTDLISTNODESIZE); \ 449 *ppdata = (type*)((*ppnode)->data); \ 450 } else { *ppdata = 0; } \ 453 #define rtxDListAppendData(pctxt,pList,pData) do { \ 454 rtxDListAppend(pctxt,pList,pData); \ 459 #define rtxDListFastInit(pList) do { \ 460 if ((pList) != 0) { \ 461 (pList)->head = (pList)->tail = (OSRTDListNode*) 0; \ 462 (pList)->count = 0; } \ 465 #define rtxDListFreeTailNode(pctxt,pList) \ 466 rtxDListFreeNode(pctxt,pList,(pList)->tail) 468 #define rtxDListFreeHeadNode(pctxt,pList) \ 469 rtxDListFreeNode(pctxt,pList,(pList)->head) 474 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)
void rtxDListRemove(OSRTDList *pList, OSRTDListNode *node)
Definition: rtxContext.h:185
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)