Lines Matching refs:el

419 #define LL_COUNT(head,el,counter)                                                              \  argument
420 LL_COUNT2(head,el,counter,next) \
422 #define LL_COUNT2(head,el,counter,next) \ argument
425 LL_FOREACH2(head,el,next){ ++counter; } \
428 #define LL_FOREACH(head,el) \ argument
429 LL_FOREACH2(head,el,next)
431 #define LL_FOREACH2(head,el,next) \ argument
432 for(el=head;el;el=(el)->next)
434 #define LL_FOREACH_SAFE(head,el,tmp) \ argument
435 LL_FOREACH_SAFE2(head,el,tmp,next)
437 #define LL_FOREACH_SAFE2(head,el,tmp,next) \ argument
438 for((el)=(head);(el) && (tmp = (el)->next, 1); (el) = tmp)
460 #define LL_REPLACE_ELEM(head, el, add) \ argument
464 assert(el != NULL); \
466 (add)->next = (el)->next; \
467 if ((head) == (el)) { \
471 while (_tmp->next && (_tmp->next != (el))) { \
480 #define LL_PREPEND_ELEM(head, el, add) \ argument
484 assert(el != NULL); \
486 (add)->next = (el); \
487 if ((head) == (el)) { \
491 while (_tmp->next && (_tmp->next != (el))) { \
575 #define DL_COUNT(head,el,counter) \ argument
576 DL_COUNT2(head,el,counter,next) \
578 #define DL_COUNT2(head,el,counter,next) \ argument
581 DL_FOREACH2(head,el,next){ ++counter; } \
584 #define DL_FOREACH(head,el) \ argument
585 DL_FOREACH2(head,el,next)
587 #define DL_FOREACH2(head,el,next) \ argument
588 for(el=head;el;el=(el)->next)
591 #define DL_FOREACH_SAFE(head,el,tmp) \ argument
592 DL_FOREACH_SAFE2(head,el,tmp,next)
594 #define DL_FOREACH_SAFE2(head,el,tmp,next) \ argument
595 for((el)=(head);(el) && (tmp = (el)->next, 1); (el) = tmp)
603 #define DL_REPLACE_ELEM(head, el, add) \ argument
606 assert(el != NULL); \
608 if ((head) == (el)) { \
610 (add)->next = (el)->next; \
611 if ((el)->next == NULL) { \
614 (add)->prev = (el)->prev; \
618 (add)->next = (el)->next; \
619 (add)->prev = (el)->prev; \
621 if ((el)->next == NULL) { \
629 #define DL_PREPEND_ELEM(head, el, add) \ argument
632 assert(el != NULL); \
634 (add)->next = (el); \
635 (add)->prev = (el)->prev; \
636 (el)->prev = (add); \
637 if ((head) == (el)) { \
679 #define CDL_COUNT(head,el,counter) \ argument
680 CDL_COUNT2(head,el,counter,next) \
682 #define CDL_COUNT2(head, el, counter,next) \ argument
685 CDL_FOREACH2(head,el,next){ ++counter; } \
688 #define CDL_FOREACH(head,el) \ argument
689 CDL_FOREACH2(head,el,next)
691 #define CDL_FOREACH2(head,el,next) \ argument
692 for(el=head;el;el=((el)->next==head ? 0L : (el)->next))
694 #define CDL_FOREACH_SAFE(head,el,tmp1,tmp2) \ argument
695 CDL_FOREACH_SAFE2(head,el,tmp1,tmp2,prev,next)
697 #define CDL_FOREACH_SAFE2(head,el,tmp1,tmp2,prev,next) \ argument
698 for((el)=(head), ((tmp1)=(head)?((head)->prev):NULL); \
699 (el) && ((tmp2)=(el)->next, 1); \
700 ((el) = (((el)==(tmp1)) ? 0L : (tmp2))))
722 #define CDL_REPLACE_ELEM(head, el, add) \ argument
725 assert(el != NULL); \
727 if ((el)->next == (el)) { \
732 (add)->next = (el)->next; \
733 (add)->prev = (el)->prev; \
736 if ((head) == (el)) { \
742 #define CDL_PREPEND_ELEM(head, el, add) \ argument
745 assert(el != NULL); \
747 (add)->next = (el); \
748 (add)->prev = (el)->prev; \
749 (el)->prev = (add); \
751 if ((head) == (el)) { \