Go to the source code of this file.
#define DL_APPEND |
( |
|
head, |
|
|
|
add |
|
) |
| |
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);
Definition at line 44 of file utlist.h.
#define DL_DELETE |
( |
|
head, |
|
|
|
del |
|
) |
| |
Value:do { \
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);
Definition at line 58 of file utlist.h.
#define DL_FOREACH |
( |
|
head, |
|
|
|
el |
|
) |
| for(el=head;el;el=el->next) |
#define DL_FOREACH_SAFE |
( |
|
head, |
|
|
|
el, |
|
|
|
tmp |
|
) |
| for((el)=(head);(el) && (tmp = (el)->next, 1); (el) = tmp) |
#define DL_PREPEND |
( |
|
head, |
|
|
|
add |
|
) |
| |
Value:do { \
(add)->next = head; \
if (head) { \
(add)->prev = (head)->prev; \
(head)->prev = (add); \
} else { \
(add)->prev = (add); \
} \
(head) = (add); \
} while (0)
Definition at line 32 of file utlist.h.
#define DL_SEARCH LL_SEARCH |
#define DL_SEARCH_SCALAR LL_SEARCH_SCALAR |
#define UTLIST_VERSION 1.9.1 |