Lines Matching refs:closure_avl
159 typedef struct closure_avl closure_avl; typedef
168 struct closure_avl { struct
171 closure_avl *pList; /* A linked list of nodes */ argument
172 closure_avl *pBefore; /* Other elements less than id */ argument
173 closure_avl *pAfter; /* Other elements greater than id */ argument
174 closure_avl *pUp; /* Parent element */ argument
182 static void closureAvlRecomputeHeight(closure_avl *p){ in closureAvlRecomputeHeight()
197 static closure_avl *closureAvlRotateBefore(closure_avl *pP){ in closureAvlRotateBefore()
198 closure_avl *pB = pP->pBefore; in closureAvlRotateBefore()
199 closure_avl *pY = pB->pAfter; in closureAvlRotateBefore()
218 static closure_avl *closureAvlRotateAfter(closure_avl *pP){ in closureAvlRotateAfter()
219 closure_avl *pA = pP->pAfter; in closureAvlRotateAfter()
220 closure_avl *pY = pA->pBefore; in closureAvlRotateAfter()
235 static closure_avl **closureAvlFromPtr(closure_avl *p, closure_avl **pp){ in closureAvlFromPtr()
236 closure_avl *pUp = p->pUp; in closureAvlFromPtr()
246 static closure_avl *closureAvlBalance(closure_avl *p){ in closureAvlBalance()
247 closure_avl *pTop = p; in closureAvlBalance()
248 closure_avl **pp; in closureAvlBalance()
252 closure_avl *pB = p->pBefore; in closureAvlBalance()
257 closure_avl *pA = p->pAfter; in closureAvlBalance()
271 static closure_avl *closureAvlSearch(closure_avl *p, sqlite3_int64 id){ in closureAvlSearch()
280 static closure_avl *closureAvlFirst(closure_avl *p){ in closureAvlFirst()
287 closure_avl *closureAvlNext(closure_avl *p){ in closureAvlNext()
288 closure_avl *pPrev = 0; in closureAvlNext()
303 static closure_avl *closureAvlInsert( in closureAvlInsert()
304 closure_avl **ppHead, /* Head of the tree */ in closureAvlInsert()
305 closure_avl *pNew /* New node to be inserted */ in closureAvlInsert()
307 closure_avl *p = *ppHead; in closureAvlInsert()
344 static void closureAvlDestroy(closure_avl *p, void (*xDestroy)(closure_avl*)){ in closureAvlDestroy() argument
376 closure_avl *pCurrent; /* Current element of output */
377 closure_avl *pClosure; /* The complete closure tree */
382 closure_avl *pFirst; /* Oldest node on the queue */
383 closure_avl *pLast; /* Youngest node on the queue */
389 static void queuePush(closure_queue *pQueue, closure_avl *pNode){ in queuePush()
402 static closure_avl *queuePull(closure_queue *pQueue){ in queuePull()
403 closure_avl *p = pQueue->pFirst; in queuePull()
596 closureAvlDestroy(pCur->pClosure, (void(*)(closure_avl*))sqlite3_free); in closureClearCursor()
636 closure_avl *pNew = sqlite3_malloc( sizeof(*pNew) ); in closureInsertNode()
668 closure_avl *pAvl; in closureFilter()