Lines Matching refs:lk

59 xmlLinkDeallocator(xmlListPtr l, xmlLinkPtr lk)  in xmlLinkDeallocator()  argument
61 (lk->prev)->next = lk->next; in xmlLinkDeallocator()
62 (lk->next)->prev = lk->prev; in xmlLinkDeallocator()
64 l->linkDeallocator(lk); in xmlLinkDeallocator()
65 xmlFree(lk); in xmlLinkDeallocator()
100 xmlLinkPtr lk; in xmlListLowerSearch() local
104 … for(lk = l->sentinel->next;lk != l->sentinel && l->linkCompare(lk->data, data) <0 ;lk = lk->next); in xmlListLowerSearch()
105 return lk; in xmlListLowerSearch()
120 xmlLinkPtr lk; in xmlListHigherSearch() local
124 … for(lk = l->sentinel->prev;lk != l->sentinel && l->linkCompare(lk->data, data) >0 ;lk = lk->prev); in xmlListHigherSearch()
125 return lk; in xmlListHigherSearch()
140 xmlLinkPtr lk; in xmlListLinkSearch() local
143 lk = xmlListLowerSearch(l, data); in xmlListLinkSearch()
144 if (lk == l->sentinel) in xmlListLinkSearch()
147 if (l->linkCompare(lk->data, data) ==0) in xmlListLinkSearch()
148 return lk; in xmlListLinkSearch()
165 xmlLinkPtr lk; in xmlListLinkReverseSearch() local
168 lk = xmlListHigherSearch(l, data); in xmlListLinkReverseSearch()
169 if (lk == l->sentinel) in xmlListLinkReverseSearch()
172 if (l->linkCompare(lk->data, data) ==0) in xmlListLinkReverseSearch()
173 return lk; in xmlListLinkReverseSearch()
233 xmlLinkPtr lk; in xmlListSearch() local
236 lk = xmlListLinkSearch(l, data); in xmlListSearch()
237 if (lk) in xmlListSearch()
238 return (lk->data); in xmlListSearch()
254 xmlLinkPtr lk; in xmlListReverseSearch() local
257 lk = xmlListLinkReverseSearch(l, data); in xmlListReverseSearch()
258 if (lk) in xmlListReverseSearch()
259 return (lk->data); in xmlListReverseSearch()
355 xmlLinkPtr lk; in xmlListRemoveFirst() local
360 lk = xmlListLinkSearch(l, data); in xmlListRemoveFirst()
361 if (lk != NULL) { in xmlListRemoveFirst()
362 xmlLinkDeallocator(l, lk); in xmlListRemoveFirst()
380 xmlLinkPtr lk; in xmlListRemoveLast() local
385 lk = xmlListLinkReverseSearch(l, data); in xmlListRemoveLast()
386 if (lk != NULL) { in xmlListRemoveLast()
387 xmlLinkDeallocator(l, lk); in xmlListRemoveLast()
424 xmlLinkPtr lk; in xmlListClear() local
428 lk = l->sentinel->next; in xmlListClear()
429 while(lk != l->sentinel) { in xmlListClear()
430 xmlLinkPtr next = lk->next; in xmlListClear()
432 xmlLinkDeallocator(l, lk); in xmlListClear()
433 lk = next; in xmlListClear()
496 xmlLinkPtr lk; in xmlListSize() local
502 for(lk = l->sentinel->next; lk != l->sentinel; lk = lk->next, count++); in xmlListSize()
604 xmlLinkGetData(xmlLinkPtr lk) in xmlLinkGetData() argument
606 if (lk == NULL) in xmlLinkGetData()
608 return lk->data; in xmlLinkGetData()
620 xmlLinkPtr lk; in xmlListReverse() local
626 for (lk = l->sentinel->next; lk != l->sentinel; lk = lk->next) { in xmlListReverse()
628 lkPrev->prev = lk; in xmlListReverse()
629 lkPrev = lk; in xmlListReverse()
633 lkPrev->prev = lk; in xmlListReverse()
677 xmlLinkPtr lk; in xmlListWalk() local
681 for(lk = l->sentinel->next; lk != l->sentinel; lk = lk->next) { in xmlListWalk()
682 if((walker(lk->data, user)) == 0) in xmlListWalk()
698 xmlLinkPtr lk; in xmlListReverseWalk() local
702 for(lk = l->sentinel->prev; lk != l->sentinel; lk = lk->prev) { in xmlListReverseWalk()
703 if((walker(lk->data, user)) == 0) in xmlListReverseWalk()
764 xmlLinkPtr lk; in xmlListCopy() local
768 for(lk = old->sentinel->next; lk != old->sentinel; lk = lk->next) { in xmlListCopy()
769 if (0 !=xmlListInsert(cur, lk->data)) { in xmlListCopy()