Lines Matching refs:head
287 #define LL_PREPEND(head,add) \ argument
289 (add)->next = head; \
290 head = add; \
293 #define LL_APPEND(head,add) \ argument
295 LDECLTYPE(head) _tmp; \
297 if (head) { \
298 _tmp = head; \
302 (head)=(add); \
306 #define LL_DELETE(head,del) \ argument
308 LDECLTYPE(head) _tmp; \
309 if ((head) == (del)) { \
310 (head)=(head)->next; \
312 _tmp = head; \
323 #define LL_APPEND_VS2008(head,add) \ argument
325 if (head) { \
326 (add)->next = head; /* use add->next as a temp variable */ \
330 (head)=(add); \
335 #define LL_DELETE_VS2008(head,del) \ argument
337 if ((head) == (del)) { \
338 (head)=(head)->next; \
340 char *_tmp = (char*)(head); \
341 while (head->next && (head->next != (del))) { \
342 head = head->next; \
344 if (head->next) { \
345 head->next = ((del)->next); \
348 char **_head_alias = (char**)&(head); \
361 #define LL_FOREACH(head,el) \ argument
362 for(el=head;el;el=el->next)
364 #define LL_FOREACH_SAFE(head,el,tmp) \ argument
365 for((el)=(head);(el) && (tmp = (el)->next, 1); (el) = tmp)
367 #define LL_SEARCH_SCALAR(head,out,field,val) \ argument
369 LL_FOREACH(head,out) { \
374 #define LL_SEARCH(head,out,elt,cmp) \ argument
376 LL_FOREACH(head,out) { \
384 #define DL_PREPEND(head,add) \ argument
386 (add)->next = head; \
387 if (head) { \
388 (add)->prev = (head)->prev; \
389 (head)->prev = (add); \
393 (head) = (add); \
396 #define DL_APPEND(head,add) \ argument
398 if (head) { \
399 (add)->prev = (head)->prev; \
400 (head)->prev->next = (add); \
401 (head)->prev = (add); \
404 (head)=(add); \
405 (head)->prev = (head); \
406 (head)->next = NULL; \
410 #define DL_DELETE(head,del) \ argument
413 (head)=NULL; \
414 } else if ((del)==(head)) { \
416 (head) = (del)->next; \
422 (head)->prev = (del)->prev; \
428 #define DL_FOREACH(head,el) \ argument
429 for(el=head;el;el=el->next)
432 #define DL_FOREACH_SAFE(head,el,tmp) \ argument
433 for((el)=(head);(el) && (tmp = (el)->next, 1); (el) = tmp)
442 #define CDL_PREPEND(head,add) \ argument
444 if (head) { \
445 (add)->prev = (head)->prev; \
446 (add)->next = (head); \
447 (head)->prev = (add); \
453 (head)=(add); \
456 #define CDL_DELETE(head,del) \ argument
458 if ( ((head)==(del)) && ((head)->next == (head))) { \
459 (head) = 0L; \
463 if ((del) == (head)) (head)=(del)->next; \
467 #define CDL_FOREACH(head,el) \ argument
468 for(el=head;el;el=(el->next==head ? 0L : el->next))
470 #define CDL_FOREACH_SAFE(head,el,tmp1,tmp2) \ argument
471 for((el)=(head), ((tmp1)=(head)?((head)->prev):NULL); \
475 #define CDL_SEARCH_SCALAR(head,out,field,val) \ argument
477 CDL_FOREACH(head,out) { \
482 #define CDL_SEARCH(head,out,elt,cmp) \ argument
484 CDL_FOREACH(head,out) { \