Home | History | Annotate | Download | only in src

Lines Matching refs:curr

137     /* update curr to newly inserted node */
138 list->curr = list->head;
143 /* curr not specified, insert from the end */
144 if(list->curr == NULL){
145 list->curr = list->tail;
149 if(list->curr == list->tail){
151 newnode->prev = list->curr;
153 (list->curr)->next = newnode;
155 /* update both curr and end */
156 list->curr = newnode;
160 }else if(list->curr == list->head){
166 /* update curr to newly inserted node */
167 list->curr = list->head;
174 newnode->prev = list->curr;
175 newnode->next = (list->curr)->next;
176 (list->curr)->next = newnode;
179 /* update curr to newly inserted node */
180 list->curr = newnode;
194 LNode *curr;
200 /* start deleting from the end if curr not specified */
201 if(list->curr == NULL){
202 list->curr = list->tail;
205 curr = list->curr;
207 if(curr == list->head){
209 list->head = curr->next;
215 FreeNode(curr);
216 list->curr = list->head;
219 }else if(curr == list->tail){
221 list->tail = curr->prev;
227 FreeNode(curr);
228 list->curr = list->tail;
233 list->curr = curr->next;
236 if(curr->next != NULL){
237 (curr->next)->prev = curr->prev;
239 if(curr->prev != NULL){
240 (curr->prev)->next = curr->next;
243 FreeNode(curr);