#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); \TAI
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/17 07:54:36
#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); \TAI
#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)
#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); \TAI
具体是什么地方不清楚,这是一个首尾队列插入元素的宏封装.