cocos2d-x  3.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
utlist.h File Reference
#include <assert.h>

Macros

#define UTLIST_VERSION   1.9.8
#define LDECLTYPE(x)   __typeof(x)
#define _SV(elt, list)
#define _NEXT(elt, list, next)   ((elt)->next)
#define _NEXTASGN(elt, list, to, next)   ((elt)->next)=(to)
#define _PREVASGN(elt, list, to, prev)   ((elt)->prev)=(to)
#define _RS(list)
#define _CASTASGN(a, b)   (a)=(b)
#define LL_SORT(list, cmp)   LL_SORT2(list, cmp, next)
#define LL_SORT2(list, cmp, next)
#define DL_SORT(list, cmp)   DL_SORT2(list, cmp, prev, next)
#define DL_SORT2(list, cmp, prev, next)
#define CDL_SORT(list, cmp)   CDL_SORT2(list, cmp, prev, next)
#define CDL_SORT2(list, cmp, prev, next)
#define LL_PREPEND(head, add)   LL_PREPEND2(head,add,next)
#define LL_PREPEND2(head, add, next)
#define LL_CONCAT(head1, head2)   LL_CONCAT2(head1,head2,next)
#define LL_CONCAT2(head1, head2, next)
#define LL_APPEND(head, add)   LL_APPEND2(head,add,next)
#define LL_APPEND2(head, add, next)
#define LL_DELETE(head, del)   LL_DELETE2(head,del,next)
#define LL_DELETE2(head, del, next)
#define LL_APPEND_VS2008(head, add)   LL_APPEND2_VS2008(head,add,next)
#define LL_APPEND2_VS2008(head, add, next)
#define LL_DELETE_VS2008(head, del)   LL_DELETE2_VS2008(head,del,next)
#define LL_DELETE2_VS2008(head, del, next)
#define LL_FOREACH(head, el)   LL_FOREACH2(head,el,next)
#define LL_FOREACH2(head, el, next)   for(el=head;el;el=(el)->next)
#define LL_FOREACH_SAFE(head, el, tmp)   LL_FOREACH_SAFE2(head,el,tmp,next)
#define LL_FOREACH_SAFE2(head, el, tmp, next)   for((el)=(head);(el) && (tmp = (el)->next, 1); (el) = tmp)
#define LL_SEARCH_SCALAR(head, out, field, val)   LL_SEARCH_SCALAR2(head,out,field,val,next)
#define LL_SEARCH_SCALAR2(head, out, field, val, next)
#define LL_SEARCH(head, out, elt, cmp)   LL_SEARCH2(head,out,elt,cmp,next)
#define LL_SEARCH2(head, out, elt, cmp, next)
#define LL_REPLACE_ELEM(head, el, add)
#define LL_PREPEND_ELEM(head, el, add)
#define DL_PREPEND(head, add)   DL_PREPEND2(head,add,prev,next)
#define DL_PREPEND2(head, add, prev, next)
#define DL_APPEND(head, add)   DL_APPEND2(head,add,prev,next)
#define DL_APPEND2(head, add, prev, next)
#define DL_CONCAT(head1, head2)   DL_CONCAT2(head1,head2,prev,next)
#define DL_CONCAT2(head1, head2, prev, next)
#define DL_DELETE(head, del)   DL_DELETE2(head,del,prev,next)
#define DL_DELETE2(head, del, prev, next)
#define DL_FOREACH(head, el)   DL_FOREACH2(head,el,next)
#define DL_FOREACH2(head, el, next)   for(el=head;el;el=(el)->next)
#define DL_FOREACH_SAFE(head, el, tmp)   DL_FOREACH_SAFE2(head,el,tmp,next)
#define DL_FOREACH_SAFE2(head, el, tmp, next)   for((el)=(head);(el) && (tmp = (el)->next, 1); (el) = tmp)
#define DL_SEARCH_SCALAR   LL_SEARCH_SCALAR
#define DL_SEARCH   LL_SEARCH
#define DL_SEARCH_SCALAR2   LL_SEARCH_SCALAR2
#define DL_SEARCH2   LL_SEARCH2
#define DL_REPLACE_ELEM(head, el, add)
#define DL_PREPEND_ELEM(head, el, add)
#define CDL_PREPEND(head, add)   CDL_PREPEND2(head,add,prev,next)
#define CDL_PREPEND2(head, add, prev, next)
#define CDL_DELETE(head, del)   CDL_DELETE2(head,del,prev,next)
#define CDL_DELETE2(head, del, prev, next)
#define CDL_FOREACH(head, el)   CDL_FOREACH2(head,el,next)
#define CDL_FOREACH2(head, el, next)   for(el=head;el;el=((el)->next==head ? 0L : (el)->next))
#define CDL_FOREACH_SAFE(head, el, tmp1, tmp2)   CDL_FOREACH_SAFE2(head,el,tmp1,tmp2,prev,next)
#define CDL_FOREACH_SAFE2(head, el, tmp1, tmp2, prev, next)
#define CDL_SEARCH_SCALAR(head, out, field, val)   CDL_SEARCH_SCALAR2(head,out,field,val,next)
#define CDL_SEARCH_SCALAR2(head, out, field, val, next)
#define CDL_SEARCH(head, out, elt, cmp)   CDL_SEARCH2(head,out,elt,cmp,next)
#define CDL_SEARCH2(head, out, elt, cmp, next)
#define CDL_REPLACE_ELEM(head, el, add)
#define CDL_PREPEND_ELEM(head, el, add)

Macro Definition Documentation

#define _CASTASGN (   a,
 
)    (a)=(b)
var _CASTASGN (   var,
  var 
)    (a)=(b)
local _CASTASGN (   local,
  local 
)    (a)=(b)
#define _NEXT (   elt,
  list,
  next 
)    ((elt)->next)
var _NEXT (   var,
  var,
  var 
)    ((elt)->next)
local _NEXT (   local,
  local,
  local 
)    ((elt)->next)
#define _NEXTASGN (   elt,
  list,
  to,
  next 
)    ((elt)->next)=(to)
var _NEXTASGN (   var,
  var,
  var,
  var 
)    ((elt)->next)=(to)
local _NEXTASGN (   local,
  local,
  local,
  local 
)    ((elt)->next)=(to)
#define _PREVASGN (   elt,
  list,
  to,
  prev 
)    ((elt)->prev)=(to)
var _PREVASGN (   var,
  var,
  var,
  var 
)    ((elt)->prev)=(to)
local _PREVASGN (   local,
  local,
  local,
  local 
)    ((elt)->prev)=(to)
#define _RS (   list)
var _RS (   var)
local _RS (   local)
#define _SV (   elt,
  list 
)
var _SV (   var,
  var 
)
local _SV (   local,
  local 
)
#define CDL_DELETE (   head,
  del 
)    CDL_DELETE2(head,del,prev,next)
var CDL_DELETE (   var,
  var 
)    CDL_DELETE2(head,del,prev,next)
local CDL_DELETE (   local,
  local 
)    CDL_DELETE2(head,del,prev,next)
#define CDL_DELETE2 (   head,
  del,
  prev,
  next 
)
Value:
do { \
if ( ((head)==(del)) && ((head)->next == (head))) { \
(head) = 0L; \
} else { \
(del)->next->prev = (del)->prev; \
(del)->prev->next = (del)->next; \
if ((del) == (head)) (head)=(del)->next; \
} \
} while (0)
var CDL_DELETE2 (   var,
  var,
  var,
  var 
)
Value:
do { \
if ( ((head)==(del)) && ((head)->next == (head))) { \
(head) = 0L; \
} else { \
(del)->next->prev = (del)->prev; \
(del)->prev->next = (del)->next; \
if ((del) == (head)) (head)=(del)->next; \
} \
} while (0)
local CDL_DELETE2 (   local,
  local,
  local,
  local 
)
Value:
do { \
if ( ((head)==(del)) && ((head)->next == (head))) { \
(head) = 0L; \
} else { \
(del)->next->prev = (del)->prev; \
(del)->prev->next = (del)->next; \
if ((del) == (head)) (head)=(del)->next; \
} \
} while (0)
#define CDL_FOREACH (   head,
  el 
)    CDL_FOREACH2(head,el,next)
#define CDL_FOREACH2 (   head,
  el,
  next 
)    for(el=head;el;el=((el)->next==head ? 0L : (el)->next))
var CDL_FOREACH2 (   var,
  var,
  var 
)    for(el=head;el;el=((el)->next==head ? 0L : (el)->next))
local CDL_FOREACH2 (   local,
  local,
  local 
)    for(el=head;el;el=((el)->next==head ? 0L : (el)->next))
#define CDL_FOREACH_SAFE (   head,
  el,
  tmp1,
  tmp2 
)    CDL_FOREACH_SAFE2(head,el,tmp1,tmp2,prev,next)
var CDL_FOREACH_SAFE (   var,
  var,
  var,
  var 
)    CDL_FOREACH_SAFE2(head,el,tmp1,tmp2,prev,next)
local CDL_FOREACH_SAFE (   local,
  local,
  local,
  local 
)    CDL_FOREACH_SAFE2(head,el,tmp1,tmp2,prev,next)
#define CDL_FOREACH_SAFE2 (   head,
  el,
  tmp1,
  tmp2,
  prev,
  next 
)
Value:
for((el)=(head), ((tmp1)=(head)?((head)->prev):NULL); \
(el) && ((tmp2)=(el)->next, 1); \
((el) = (((el)==(tmp1)) ? 0L : (tmp2))))
#define NULL
Definition: CCPlatformDefine.h:61
var CDL_FOREACH_SAFE2 (   var,
  var,
  var,
  var,
  var,
  var 
)
Value:
for((el)=(head), ((tmp1)=(head)?((head)->prev):NULL); \
(el) && ((tmp2)=(el)->next, 1); \
((el) = (((el)==(tmp1)) ? 0L : (tmp2))))
#define NULL
Definition: CCPlatformDefine.h:61
local CDL_FOREACH_SAFE2 (   local,
  local,
  local,
  local,
  local,
  local 
)
Value:
for((el)=(head), ((tmp1)=(head)?((head)->prev):NULL); \
(el) && ((tmp2)=(el)->next, 1); \
((el) = (((el)==(tmp1)) ? 0L : (tmp2))))
#define NULL
Definition: CCPlatformDefine.h:61
#define CDL_PREPEND (   head,
  add 
)    CDL_PREPEND2(head,add,prev,next)
var CDL_PREPEND (   var,
  var 
)    CDL_PREPEND2(head,add,prev,next)
local CDL_PREPEND (   local,
  local 
)    CDL_PREPEND2(head,add,prev,next)
#define CDL_PREPEND2 (   head,
  add,
  prev,
  next 
)
Value:
do { \
if (head) { \
(add)->prev = (head)->prev; \
(add)->next = (head); \
(head)->prev = (add); \
(add)->prev->next = (add); \
} else { \
(add)->prev = (add); \
(add)->next = (add); \
} \
(head)=(add); \
} while (0)
#define CDL_PREPEND_ELEM (   head,
  el,
  add 
)
Value:
do { \
assert(head != NULL); \
assert(el != NULL); \
assert(add != NULL); \
(add)->next = (el); \
(add)->prev = (el)->prev; \
(el)->prev = (add); \
(add)->prev->next = (add); \
if ((head) == (el)) { \
(head) = (add); \
} \
} while (0) \
#define NULL
Definition: CCPlatformDefine.h:61
#define CDL_REPLACE_ELEM (   head,
  el,
  add 
)
Value:
do { \
assert(head != NULL); \
assert(el != NULL); \
assert(add != NULL); \
if ((el)->next == (el)) { \
(add)->next = (add); \
(add)->prev = (add); \
(head) = (add); \
} else { \
(add)->next = (el)->next; \
(add)->prev = (el)->prev; \
(add)->next->prev = (add); \
(add)->prev->next = (add); \
if ((head) == (el)) { \
(head) = (add); \
} \
} \
} while (0)
#define NULL
Definition: CCPlatformDefine.h:61
#define CDL_SEARCH (   head,
  out,
  elt,
  cmp 
)    CDL_SEARCH2(head,out,elt,cmp,next)
var CDL_SEARCH (   var,
  var,
  var,
  var 
)    CDL_SEARCH2(head,out,elt,cmp,next)
local CDL_SEARCH (   local,
  local,
  local,
  local 
)    CDL_SEARCH2(head,out,elt,cmp,next)
#define CDL_SEARCH2 (   head,
  out,
  elt,
  cmp,
  next 
)
Value:
do { \
CDL_FOREACH2(head,out,next) { \
if ((cmp(out,elt))==0) break; \
} \
} while(0)
#define CDL_FOREACH2(head, el, next)
Definition: utlist.h:662
#define CDL_SEARCH_SCALAR (   head,
  out,
  field,
  val 
)    CDL_SEARCH_SCALAR2(head,out,field,val,next)
var CDL_SEARCH_SCALAR (   var,
  var,
  var,
  var 
)    CDL_SEARCH_SCALAR2(head,out,field,val,next)
local CDL_SEARCH_SCALAR (   local,
  local,
  local,
  local 
)    CDL_SEARCH_SCALAR2(head,out,field,val,next)
#define CDL_SEARCH_SCALAR2 (   head,
  out,
  field,
  val,
  next 
)
Value:
do { \
CDL_FOREACH2(head,out,next) { \
if ((out)->field == (val)) break; \
} \
} while(0)
#define CDL_FOREACH2(head, el, next)
Definition: utlist.h:662
var CDL_SEARCH_SCALAR2 (   var,
  var,
  var,
  var,
  var 
)
Value:
do { \
CDL_FOREACH2(head,out,next) { \
if ((out)->field == (val)) break; \
} \
} while(0)
#define CDL_FOREACH2(head, el, next)
Definition: utlist.h:662
local CDL_SEARCH_SCALAR2 (   local,
  local,
  local,
  local,
  local 
)
Value:
do { \
CDL_FOREACH2(head,out,next) { \
if ((out)->field == (val)) break; \
} \
} while(0)
#define CDL_FOREACH2(head, el, next)
Definition: utlist.h:662
#define CDL_SORT (   list,
  cmp 
)    CDL_SORT2(list, cmp, prev, next)
var CDL_SORT (   var,
  var 
)    CDL_SORT2(list, cmp, prev, next)
local CDL_SORT (   local,
  local 
)    CDL_SORT2(list, cmp, prev, next)
#define CDL_SORT2 (   list,
  cmp,
  prev,
  next 
)
#define DL_APPEND (   head,
  add 
)    DL_APPEND2(head,add,prev,next)
#define DL_APPEND2 (   head,
  add,
  prev,
  next 
)
Value:
do { \
if (head) { \
(add)->prev = (head)->prev; \
(head)->prev->next = (add); \
(head)->prev = (add); \
(add)->next = NULL; \
} else { \
(head)=(add); \
(head)->prev = (head); \
(head)->next = NULL; \
} \
} while (0)
#define NULL
Definition: CCPlatformDefine.h:61
#define DL_CONCAT (   head1,
  head2 
)    DL_CONCAT2(head1,head2,prev,next)
var DL_CONCAT (   var,
  var 
)    DL_CONCAT2(head1,head2,prev,next)
local DL_CONCAT (   local,
  local 
)    DL_CONCAT2(head1,head2,prev,next)
#define DL_CONCAT2 (   head1,
  head2,
  prev,
  next 
)
Value:
do { \
LDECLTYPE(head1) _tmp; \
if (head2) { \
if (head1) { \
_tmp = (head2)->prev; \
(head2)->prev = (head1)->prev; \
(head1)->prev->next = (head2); \
(head1)->prev = _tmp; \
} else { \
(head1)=(head2); \
} \
} \
} while (0)
#define LDECLTYPE(x)
Definition: utlist.h:74
#define DL_DELETE (   head,
  del 
)    DL_DELETE2(head,del,prev,next)
var DL_DELETE (   var,
  var 
)    DL_DELETE2(head,del,prev,next)
local DL_DELETE (   local,
  local 
)    DL_DELETE2(head,del,prev,next)
#define DL_DELETE2 (   head,
  del,
  prev,
  next 
)
Value:
do { \
assert((del)->prev != NULL); \
if ((del)->prev == (del)) { \
(head)=NULL; \
} else if ((del)==(head)) { \
(del)->next->prev = (del)->prev; \
(head) = (del)->next; \
} else { \
(del)->prev->next = (del)->next; \
if ((del)->next) { \
(del)->next->prev = (del)->prev; \
} else { \
(head)->prev = (del)->prev; \
} \
} \
} while (0)
#define NULL
Definition: CCPlatformDefine.h:61
#define DL_FOREACH (   head,
  el 
)    DL_FOREACH2(head,el,next)
var DL_FOREACH (   var,
  var 
)    DL_FOREACH2(head,el,next)
local DL_FOREACH (   local,
  local 
)    DL_FOREACH2(head,el,next)
#define DL_FOREACH2 (   head,
  el,
  next 
)    for(el=head;el;el=(el)->next)
var DL_FOREACH2 (   var,
  var,
  var 
)    for(el=head;el;el=(el)->next)
#define DL_FOREACH_SAFE (   head,
  el,
  tmp 
)    DL_FOREACH_SAFE2(head,el,tmp,next)
#define DL_FOREACH_SAFE2 (   head,
  el,
  tmp,
  next 
)    for((el)=(head);(el) && (tmp = (el)->next, 1); (el) = tmp)
var DL_FOREACH_SAFE2 (   var,
  var,
  var,
  var 
)    for((el)=(head);(el) && (tmp = (el)->next, 1); (el) = tmp)
local DL_FOREACH_SAFE2 (   local,
  local,
  local,
  local 
)    for((el)=(head);(el) && (tmp = (el)->next, 1); (el) = tmp)
#define DL_PREPEND (   head,
  add 
)    DL_PREPEND2(head,add,prev,next)
var DL_PREPEND (   var,
  var 
)    DL_PREPEND2(head,add,prev,next)
local DL_PREPEND (   local,
  local 
)    DL_PREPEND2(head,add,prev,next)
#define DL_PREPEND2 (   head,
  add,
  prev,
  next 
)
Value:
do { \
(add)->next = head; \
if (head) { \
(add)->prev = (head)->prev; \
(head)->prev = (add); \
} else { \
(add)->prev = (add); \
} \
(head) = (add); \
} while (0)
var DL_PREPEND2 (   var,
  var,
  var,
  var 
)
Value:
do { \
(add)->next = head; \
if (head) { \
(add)->prev = (head)->prev; \
(head)->prev = (add); \
} else { \
(add)->prev = (add); \
} \
(head) = (add); \
} while (0)
#define DL_PREPEND_ELEM (   head,
  el,
  add 
)
Value:
do { \
assert(head != NULL); \
assert(el != NULL); \
assert(add != NULL); \
(add)->next = (el); \
(add)->prev = (el)->prev; \
(el)->prev = (add); \
if ((head) == (el)) { \
(head) = (add); \
} else { \
(add)->prev->next = (add); \
} \
} while (0) \
#define NULL
Definition: CCPlatformDefine.h:61
#define DL_REPLACE_ELEM (   head,
  el,
  add 
)
Value:
do { \
assert(head != NULL); \
assert(el != NULL); \
assert(add != NULL); \
if ((head) == (el)) { \
(head) = (add); \
(add)->next = (el)->next; \
if ((el)->next == NULL) { \
(add)->prev = (add); \
} else { \
(add)->prev = (el)->prev; \
(add)->next->prev = (add); \
} \
} else { \
(add)->next = (el)->next; \
(add)->prev = (el)->prev; \
(add)->prev->next = (add); \
if ((el)->next == NULL) { \
(head)->prev = (add); \
} else { \
(add)->next->prev = (add); \
} \
} \
} while (0)
#define NULL
Definition: CCPlatformDefine.h:61
#define DL_SEARCH   LL_SEARCH
var DL_SEARCH   LL_SEARCH
local DL_SEARCH   LL_SEARCH
#define DL_SEARCH2   LL_SEARCH2
var DL_SEARCH2   LL_SEARCH2
local DL_SEARCH2   LL_SEARCH2
#define DL_SEARCH_SCALAR   LL_SEARCH_SCALAR
#define DL_SEARCH_SCALAR2   LL_SEARCH_SCALAR2
var DL_SEARCH_SCALAR2   LL_SEARCH_SCALAR2
#define DL_SORT (   list,
  cmp 
)    DL_SORT2(list, cmp, prev, next)
var DL_SORT (   var,
  var 
)    DL_SORT2(list, cmp, prev, next)
local DL_SORT (   local,
  local 
)    DL_SORT2(list, cmp, prev, next)
#define DL_SORT2 (   list,
  cmp,
  prev,
  next 
)
#define LDECLTYPE (   x)    __typeof(x)
var LDECLTYPE (   var)    __typeof(x)
local LDECLTYPE (   local)    __typeof(x)
#define LL_APPEND (   head,
  add 
)    LL_APPEND2(head,add,next)
#define LL_APPEND2 (   head,
  add,
  next 
)
Value:
do { \
LDECLTYPE(head) _tmp; \
(add)->next=NULL; \
if (head) { \
_tmp = head; \
while (_tmp->next) { _tmp = _tmp->next; } \
_tmp->next=(add); \
} else { \
(head)=(add); \
} \
} while (0)
#define NULL
Definition: CCPlatformDefine.h:61
#define LDECLTYPE(x)
Definition: utlist.h:74
var LL_APPEND2 (   var,
  var,
  var 
)
Value:
do { \
LDECLTYPE(head) _tmp; \
(add)->next=NULL; \
if (head) { \
_tmp = head; \
while (_tmp->next) { _tmp = _tmp->next; } \
_tmp->next=(add); \
} else { \
(head)=(add); \
} \
} while (0)
#define NULL
Definition: CCPlatformDefine.h:61
#define LDECLTYPE(x)
Definition: utlist.h:74
local LL_APPEND2 (   local,
  local,
  local 
)
Value:
do { \
LDECLTYPE(head) _tmp; \
(add)->next=NULL; \
if (head) { \
_tmp = head; \
while (_tmp->next) { _tmp = _tmp->next; } \
_tmp->next=(add); \
} else { \
(head)=(add); \
} \
} while (0)
#define NULL
Definition: CCPlatformDefine.h:61
#define LDECLTYPE(x)
Definition: utlist.h:74
#define LL_APPEND2_VS2008 (   head,
  add,
  next 
)
Value:
do { \
if (head) { \
(add)->next = head; /* use add->next as a temp variable */ \
while ((add)->next->next) { (add)->next = (add)->next->next; } \
(add)->next->next=(add); \
} else { \
(head)=(add); \
} \
(add)->next=NULL; \
} while (0)
#define NULL
Definition: CCPlatformDefine.h:61
#define LL_APPEND_VS2008 (   head,
  add 
)    LL_APPEND2_VS2008(head,add,next)
var LL_APPEND_VS2008 (   var,
  var 
)    LL_APPEND2_VS2008(head,add,next)
local LL_APPEND_VS2008 (   local,
  local 
)    LL_APPEND2_VS2008(head,add,next)
#define LL_CONCAT (   head1,
  head2 
)    LL_CONCAT2(head1,head2,next)
var LL_CONCAT (   var,
  var 
)    LL_CONCAT2(head1,head2,next)
local LL_CONCAT (   local,
  local 
)    LL_CONCAT2(head1,head2,next)
#define LL_CONCAT2 (   head1,
  head2,
  next 
)
Value:
do { \
LDECLTYPE(head1) _tmp; \
if (head1) { \
_tmp = head1; \
while (_tmp->next) { _tmp = _tmp->next; } \
_tmp->next=(head2); \
} else { \
(head1)=(head2); \
} \
} while (0)
#define LDECLTYPE(x)
Definition: utlist.h:74
var LL_CONCAT2 (   var,
  var,
  var 
)
Value:
do { \
LDECLTYPE(head1) _tmp; \
if (head1) { \
_tmp = head1; \
while (_tmp->next) { _tmp = _tmp->next; } \
_tmp->next=(head2); \
} else { \
(head1)=(head2); \
} \
} while (0)
#define LDECLTYPE(x)
Definition: utlist.h:74
local LL_CONCAT2 (   local,
  local,
  local 
)
Value:
do { \
LDECLTYPE(head1) _tmp; \
if (head1) { \
_tmp = head1; \
while (_tmp->next) { _tmp = _tmp->next; } \
_tmp->next=(head2); \
} else { \
(head1)=(head2); \
} \
} while (0)
#define LDECLTYPE(x)
Definition: utlist.h:74
#define LL_DELETE (   head,
  del 
)    LL_DELETE2(head,del,next)
#define LL_DELETE2 (   head,
  del,
  next 
)
Value:
do { \
LDECLTYPE(head) _tmp; \
if ((head) == (del)) { \
(head)=(head)->next; \
} else { \
_tmp = head; \
while (_tmp->next && (_tmp->next != (del))) { \
_tmp = _tmp->next; \
} \
if (_tmp->next) { \
_tmp->next = ((del)->next); \
} \
} \
} while (0)
#define LDECLTYPE(x)
Definition: utlist.h:74
#define LL_DELETE2_VS2008 (   head,
  del,
  next 
)
Value:
do { \
if ((head) == (del)) { \
(head)=(head)->next; \
} else { \
char *_tmp = (char*)(head); \
while ((head)->next && ((head)->next != (del))) { \
head = (head)->next; \
} \
if ((head)->next) { \
(head)->next = ((del)->next); \
} \
{ \
char **_head_alias = (char**)&(head); \
*_head_alias = _tmp; \
} \
} \
} while (0)
#define LL_DELETE_VS2008 (   head,
  del 
)    LL_DELETE2_VS2008(head,del,next)
#define LL_FOREACH (   head,
  el 
)    LL_FOREACH2(head,el,next)
var LL_FOREACH (   var,
  var 
)    LL_FOREACH2(head,el,next)
local LL_FOREACH (   local,
  local 
)    LL_FOREACH2(head,el,next)
#define LL_FOREACH2 (   head,
  el,
  next 
)    for(el=head;el;el=(el)->next)
var LL_FOREACH2 (   var,
  var,
  var 
)    for(el=head;el;el=(el)->next)
local LL_FOREACH2 (   local,
  local,
  local 
)    for(el=head;el;el=(el)->next)
#define LL_FOREACH_SAFE (   head,
  el,
  tmp 
)    LL_FOREACH_SAFE2(head,el,tmp,next)
var LL_FOREACH_SAFE (   var,
  var,
  var 
)    LL_FOREACH_SAFE2(head,el,tmp,next)
local LL_FOREACH_SAFE (   local,
  local,
  local 
)    LL_FOREACH_SAFE2(head,el,tmp,next)
#define LL_FOREACH_SAFE2 (   head,
  el,
  tmp,
  next 
)    for((el)=(head);(el) && (tmp = (el)->next, 1); (el) = tmp)
var LL_FOREACH_SAFE2 (   var,
  var,
  var,
  var 
)    for((el)=(head);(el) && (tmp = (el)->next, 1); (el) = tmp)
local LL_FOREACH_SAFE2 (   local,
  local,
  local,
  local 
)    for((el)=(head);(el) && (tmp = (el)->next, 1); (el) = tmp)
#define LL_PREPEND (   head,
  add 
)    LL_PREPEND2(head,add,next)
var LL_PREPEND (   var,
  var 
)    LL_PREPEND2(head,add,next)
local LL_PREPEND (   local,
  local 
)    LL_PREPEND2(head,add,next)
#define LL_PREPEND2 (   head,
  add,
  next 
)
Value:
do { \
(add)->next = head; \
head = add; \
} while (0)
var LL_PREPEND2 (   var,
  var,
  var 
)
Value:
do { \
(add)->next = head; \
head = add; \
} while (0)
local LL_PREPEND2 (   local,
  local,
  local 
)
Value:
do { \
(add)->next = head; \
head = add; \
} while (0)
#define LL_PREPEND_ELEM (   head,
  el,
  add 
)
Value:
do { \
LDECLTYPE(head) _tmp; \
assert(head != NULL); \
assert(el != NULL); \
assert(add != NULL); \
(add)->next = (el); \
if ((head) == (el)) { \
(head) = (add); \
} else { \
_tmp = head; \
while (_tmp->next && (_tmp->next != (el))) { \
_tmp = _tmp->next; \
} \
if (_tmp->next) { \
_tmp->next = (add); \
} \
} \
} while (0) \
#define NULL
Definition: CCPlatformDefine.h:61
#define LDECLTYPE(x)
Definition: utlist.h:74
#define LL_REPLACE_ELEM (   head,
  el,
  add 
)
Value:
do { \
LDECLTYPE(head) _tmp; \
assert(head != NULL); \
assert(el != NULL); \
assert(add != NULL); \
(add)->next = (el)->next; \
if ((head) == (el)) { \
(head) = (add); \
} else { \
_tmp = head; \
while (_tmp->next && (_tmp->next != (el))) { \
_tmp = _tmp->next; \
} \
if (_tmp->next) { \
_tmp->next = (add); \
} \
} \
} while (0)
#define NULL
Definition: CCPlatformDefine.h:61
#define LDECLTYPE(x)
Definition: utlist.h:74
#define LL_SEARCH (   head,
  out,
  elt,
  cmp 
)    LL_SEARCH2(head,out,elt,cmp,next)
var LL_SEARCH (   var,
  var,
  var,
  var 
)    LL_SEARCH2(head,out,elt,cmp,next)
local LL_SEARCH (   local,
  local,
  local,
  local 
)    LL_SEARCH2(head,out,elt,cmp,next)
#define LL_SEARCH2 (   head,
  out,
  elt,
  cmp,
  next 
)
Value:
do { \
LL_FOREACH2(head,out,next) { \
if ((cmp(out,elt))==0) break; \
} \
} while(0)
#define LL_FOREACH2(head, el, next)
Definition: utlist.h:419
#define LL_SEARCH_SCALAR (   head,
  out,
  field,
  val 
)    LL_SEARCH_SCALAR2(head,out,field,val,next)
var LL_SEARCH_SCALAR (   var,
  var,
  var,
  var 
)    LL_SEARCH_SCALAR2(head,out,field,val,next)
local LL_SEARCH_SCALAR (   local,
  local,
  local,
  local 
)    LL_SEARCH_SCALAR2(head,out,field,val,next)
#define LL_SEARCH_SCALAR2 (   head,
  out,
  field,
  val,
  next 
)
Value:
do { \
LL_FOREACH2(head,out,next) { \
if ((out)->field == (val)) break; \
} \
} while(0)
#define LL_FOREACH2(head, el, next)
Definition: utlist.h:419
var LL_SEARCH_SCALAR2 (   var,
  var,
  var,
  var,
  var 
)
Value:
do { \
LL_FOREACH2(head,out,next) { \
if ((out)->field == (val)) break; \
} \
} while(0)
#define LL_FOREACH2(head, el, next)
Definition: utlist.h:419
local LL_SEARCH_SCALAR2 (   local,
  local,
  local,
  local,
  local 
)
Value:
do { \
LL_FOREACH2(head,out,next) { \
if ((out)->field == (val)) break; \
} \
} while(0)
#define LL_FOREACH2(head, el, next)
Definition: utlist.h:419
#define LL_SORT (   list,
  cmp 
)    LL_SORT2(list, cmp, next)
var LL_SORT (   var,
  var 
)    LL_SORT2(list, cmp, next)
local LL_SORT (   local,
  local 
)    LL_SORT2(list, cmp, next)
#define LL_SORT2 (   list,
  cmp,
  next 
)
#define UTLIST_VERSION   1.9.8
var UTLIST_VERSION   1.9.8
local UTLIST_VERSION   1.9.8