34 unsigned char *
dgl_mempush(
unsigned char *pstack,
long *istack,
long size,
39 pstack = realloc(pstack, size * (1 + *istack));
42 memcpy(&pstack[(*istack) * size], pv, size);
47 unsigned char *
dgl_mempop(
unsigned char *pstack,
long *istack,
long size)
51 return &pstack[size * (--(*istack))];
56 unsigned char *pb = (
unsigned char *)pn;
69 unsigned char *pb = (
unsigned char *)pn;
94 register int iEdge1, iEdge2;
99 findPriItem.
nKey = nPriId;
102 if (pPriItem && pPriItem->
pnData) {
111 for (iEdge1 = 0, iEdge2 = 0; iEdge2 < pPriItem->
cnData; iEdge2++) {
112 if (pPriItem->
pnData[iEdge2] != nId) {
113 pnNew[iEdge1++] = pPriItem->
pnData[iEdge2];
125 pPriItem->
cnData = iEdge1;
145 if (pPriItem ==
NULL) {
149 if (pPriItem->
cnData == 0) {
#define DGL_ERR_MemoryExhausted
unsigned char * dgl_mempop(unsigned char *pstack, long *istack, long size)
int dgl_edge_prioritizer_del(dglGraph_s *pG, dglInt32_t nId, dglInt32_t nPriId)
void dgl_swapInt64Bytes(dglInt64_t *pn)
void dgl_swapInt32Bytes(dglInt32_t *pn)
int dgl_edge_prioritizer_add(dglGraph_s *pG, dglInt32_t nId, dglInt32_t nPriId)
unsigned char * dgl_mempush(unsigned char *pstack, long *istack, long size, void *pv)
dglEdgePrioritizer_s edgePrioritizer
dglTreeEdgePri32_s * dglTreeEdgePri32Add(void *pavl, dglInt32_t nKey)
void * dglTreeGetAllocator(void)
int dglTreeEdgePri32Compare(const void *pvEdgePri32A, const void *pvEdgePri32B, void *pvParam UNUSED)