• Home
  • Raw
  • Download

Lines Matching refs:el

404 #define LL_COUNT(head,el,counter)                                                              \  argument
405 LL_COUNT2(head,el,counter,next) \
407 #define LL_COUNT2(head,el,counter,next) \ argument
410 LL_FOREACH2(head,el,next) { ++(counter); } \
413 #define LL_FOREACH(head,el) \ argument
414 LL_FOREACH2(head,el,next)
416 #define LL_FOREACH2(head,el,next) \ argument
417 for ((el) = (head); el; (el) = (el)->next)
419 #define LL_FOREACH_SAFE(head,el,tmp) \ argument
420 LL_FOREACH_SAFE2(head,el,tmp,next)
422 #define LL_FOREACH_SAFE2(head,el,tmp,next) \ argument
423 for ((el) = (head); (el) && ((tmp) = (el)->next, 1); (el) = (tmp))
445 #define LL_REPLACE_ELEM2(head, el, add, next) \ argument
449 assert((el) != NULL); \
451 (add)->next = (el)->next; \
452 if ((head) == (el)) { \
456 while (_tmp->next && (_tmp->next != (el))) { \
465 #define LL_REPLACE_ELEM(head, el, add) \ argument
466 LL_REPLACE_ELEM2(head, el, add, next)
468 #define LL_PREPEND_ELEM2(head, el, add, next) \ argument
470 if (el) { \
474 (add)->next = (el); \
475 if ((head) == (el)) { \
479 while (_tmp->next && (_tmp->next != (el))) { \
491 #define LL_PREPEND_ELEM(head, el, add) \ argument
492 LL_PREPEND_ELEM2(head, el, add, next)
494 #define LL_APPEND_ELEM2(head, el, add, next) \ argument
496 if (el) { \
499 (add)->next = (el)->next; \
500 (el)->next = (add); \
506 #define LL_APPEND_ELEM(head, el, add) \ argument
507 LL_APPEND_ELEM2(head, el, add, next)
574 #define LL_REPLACE_ELEM2(head, el, add, next) \ argument
577 assert((el) != NULL); \
579 if ((head) == (el)) { \
583 while ((add)->next->next && ((add)->next->next != (el))) { \
590 (add)->next = (el)->next; \
594 #define LL_PREPEND_ELEM2(head, el, add, next) \ argument
596 if (el) { \
599 if ((head) == (el)) { \
603 while ((add)->next->next && ((add)->next->next != (el))) { \
610 (add)->next = (el); \
725 #define DL_COUNT(head,el,counter) \ argument
726 DL_COUNT2(head,el,counter,next) \
728 #define DL_COUNT2(head,el,counter,next) \ argument
731 DL_FOREACH2(head,el,next) { ++(counter); } \
734 #define DL_FOREACH(head,el) \ argument
735 DL_FOREACH2(head,el,next)
737 #define DL_FOREACH2(head,el,next) \ argument
738 for ((el) = (head); el; (el) = (el)->next)
741 #define DL_FOREACH_SAFE(head,el,tmp) \ argument
742 DL_FOREACH_SAFE2(head,el,tmp,next)
744 #define DL_FOREACH_SAFE2(head,el,tmp,next) \ argument
745 for ((el) = (head); (el) && ((tmp) = (el)->next, 1); (el) = (tmp))
753 #define DL_REPLACE_ELEM2(head, el, add, prev, next) \ argument
756 assert((el) != NULL); \
758 if ((head) == (el)) { \
760 (add)->next = (el)->next; \
761 if ((el)->next == NULL) { \
764 (add)->prev = (el)->prev; \
768 (add)->next = (el)->next; \
769 (add)->prev = (el)->prev; \
771 if ((el)->next == NULL) { \
779 #define DL_REPLACE_ELEM(head, el, add) \ argument
780 DL_REPLACE_ELEM2(head, el, add, prev, next)
782 #define DL_PREPEND_ELEM2(head, el, add, prev, next) \ argument
784 if (el) { \
787 (add)->next = (el); \
788 (add)->prev = (el)->prev; \
789 (el)->prev = (add); \
790 if ((head) == (el)) { \
800 #define DL_PREPEND_ELEM(head, el, add) \ argument
801 DL_PREPEND_ELEM2(head, el, add, prev, next)
803 #define DL_APPEND_ELEM2(head, el, add, prev, next) \ argument
805 if (el) { \
808 (add)->next = (el)->next; \
809 (add)->prev = (el); \
810 (el)->next = (add); \
821 #define DL_APPEND_ELEM(head, el, add) \ argument
822 DL_APPEND_ELEM2(head, el, add, prev, next)
940 #define CDL_COUNT(head,el,counter) \ argument
941 CDL_COUNT2(head,el,counter,next) \
943 #define CDL_COUNT2(head, el, counter,next) \ argument
946 CDL_FOREACH2(head,el,next) { ++(counter); } \
949 #define CDL_FOREACH(head,el) \ argument
950 CDL_FOREACH2(head,el,next)
952 #define CDL_FOREACH2(head,el,next) \ argument
953 for ((el)=(head);el;(el)=(((el)->next==(head)) ? NULL : (el)->next))
955 #define CDL_FOREACH_SAFE(head,el,tmp1,tmp2) \ argument
956 CDL_FOREACH_SAFE2(head,el,tmp1,tmp2,prev,next)
958 #define CDL_FOREACH_SAFE2(head,el,tmp1,tmp2,prev,next) \ argument
959 for ((el) = (head), (tmp1) = (head) ? (head)->prev : NULL; \
960 (el) && ((tmp2) = (el)->next, 1); \
961 (el) = ((el) == (tmp1) ? NULL : (tmp2)))
983 #define CDL_REPLACE_ELEM2(head, el, add, prev, next) \ argument
986 assert((el) != NULL); \
988 if ((el)->next == (el)) { \
993 (add)->next = (el)->next; \
994 (add)->prev = (el)->prev; \
997 if ((head) == (el)) { \
1003 #define CDL_REPLACE_ELEM(head, el, add) \ argument
1004 CDL_REPLACE_ELEM2(head, el, add, prev, next)
1006 #define CDL_PREPEND_ELEM2(head, el, add, prev, next) \ argument
1008 if (el) { \
1011 (add)->next = (el); \
1012 (add)->prev = (el)->prev; \
1013 (el)->prev = (add); \
1015 if ((head) == (el)) { \
1023 #define CDL_PREPEND_ELEM(head, el, add) \ argument
1024 CDL_PREPEND_ELEM2(head, el, add, prev, next)
1026 #define CDL_APPEND_ELEM2(head, el, add, prev, next) \ argument
1028 if (el) { \
1031 (add)->next = (el)->next; \
1032 (add)->prev = (el); \
1033 (el)->next = (add); \
1040 #define CDL_APPEND_ELEM(head, el, add) \ argument
1041 CDL_APPEND_ELEM2(head, el, add, prev, next)