#define TAILQ_INSERT_AFTER(head,listelm,elm,field) do { \

題目:

#define TAILQ_INSERT_AFTER(head,listelm,elm,field) do { \
if ((TAILQ_NEXT((elm),field) = TAILQ_NEXT((listelm),field)) = NULL)\
TAILQ_NEXT((elm),field)->field.tqe_prev = \
&TAILQ_NEXT((elm),field); \
else \
(head)->tqh_last = &TAILQ_NEXT((elm),field); \
TAILQ_NEXT((listelm),field) = (elm); \
(elm)->field.tqe_prev = &TAILQ_NEXT((listelm),field); \
} while (0)

解答:

具體是什麼地方不清楚,這是一個首尾隊列插入元素的宏封裝.

添加新評論

暱稱
郵箱
網站