35 unsigned char *
dgl_mempush(
unsigned char *pstack,
long *istack,
long size,
40 pstack = realloc(pstack, size * (1 + *istack));
43 memcpy(&pstack[(*istack) * size], pv, size);
48 unsigned char *
dgl_mempop(
unsigned char *pstack,
long *istack,
long size)
52 return &pstack[size * (--(*istack))];
57 unsigned char *pb = (
unsigned char *)pn;
70 unsigned char *pb = (
unsigned char *)pn;
96 register int iEdge1, iEdge2;
101 findPriItem.
nKey = nPriId;
104 if (pPriItem && pPriItem->
pnData) {
113 for (iEdge1 = 0, iEdge2 = 0; iEdge2 < pPriItem->
cnData; iEdge2++) {
114 if (pPriItem->
pnData[iEdge2] != nId) {
115 pnNew[iEdge1++] = pPriItem->
pnData[iEdge2];
127 pPriItem->
cnData = iEdge1;
148 if (pPriItem ==
NULL) {
152 if (pPriItem->
cnData == 0) {
dglEdgePrioritizer_s edgePrioritizer
void dgl_swapInt64Bytes(dglInt64_t *pn)
int dgl_edge_prioritizer_add(dglGraph_s *pG, dglInt32_t nId, dglInt32_t nPriId)
void dgl_swapInt32Bytes(dglInt32_t *pn)
#define DGL_ERR_MemoryExhausted
void * dglTreeGetAllocator()
unsigned char * dgl_mempop(unsigned char *pstack, long *istack, long size)
dglTreeEdgePri32_s * dglTreeEdgePri32Add(void *pavl, dglInt32_t nKey)
unsigned char * dgl_mempush(unsigned char *pstack, long *istack, long size, void *pv)
int dgl_edge_prioritizer_del(dglGraph_s *pG, dglInt32_t nId, dglInt32_t nPriId)
int dglTreeEdgePri32Compare(const void *pvEdgePri32A, const void *pvEdgePri32B, void *pvParam)