comparison src/tools.h @ 96:ca94493b75bb

-
author Thinker K.F. Li <thinker@branda.to>
date Sat, 30 Aug 2008 00:32:05 +0800
parents c3c41f88e776
children 6a8588df68af
comparison
equal deleted inserted replaced
95:7dfa4e60b26d 96:ca94493b75bb
43 do { \ 43 do { \
44 (follow)->field = (elm)->field; \ 44 (follow)->field = (elm)->field; \
45 (elm)->field = follow; \ 45 (elm)->field = follow; \
46 } while(0) 46 } while(0)
47 #define STAILQ_REMOVE(q, type, field, elm) \ 47 #define STAILQ_REMOVE(q, type, field, elm) \
48 ~ do { \ 48 do { \
49 if((elm) == (q).head) { \ 49 if((elm) == (q).head) { \
50 (q).head = (elm)->field; \ 50 (q).head = (elm)->field; \
51 if((q).head == NULL) \ 51 if((q).head == NULL) \
52 (q).tail = NULL; \ 52 (q).tail = NULL; \
53 } else { \ 53 } else { \