![]() |
torcs - 1.2.2 | ![]() |
Defines | |
#define | GF_TAILQ_HEAD(name, type) |
Head type definition. | |
#define | GF_TAILQ_ENTRY(type) |
Entry in structure. | |
#define | GF_TAILQ_FIRST(head) ((head)->tqh_first) |
First element of a TAILQ. | |
#define | GF_TAILQ_NEXT(elm, field) ((elm)->field.tqe_next) |
Next element of a TAILQ. | |
#define | GF_TAILQ_END(head) NULL |
End of a TAILQ. | |
#define | GF_TAILQ_LAST(head, headname) (*(((struct headname *)((head)->tqh_last))->tqh_last)) |
Last element of a TAILQ. | |
#define | GF_TAILQ_PREV(elm, headname, field) (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last)) |
Previous element of a TAILQ. | |
#define | GF_TAILQ_INIT(head) |
Head initialization (Mandatory). | |
#define | GF_TAILQ_INIT_ENTRY(elm, field) |
Entry initialization (optionnal if inserted). | |
#define | GF_TAILQ_INSERT_HEAD(head, elm, field) |
Insert an element at the head. | |
#define | GF_TAILQ_INSERT_TAIL(head, elm, field) |
Insert an element at the tail. | |
#define | GF_TAILQ_INSERT_AFTER(head, listelm, elm, field) |
Insert an element after another element. | |
#define | GF_TAILQ_INSERT_BEFORE(listelm, elm, field) |
Insert an element before another element. | |
#define | GF_TAILQ_REMOVE(head, elm, field) |
Remove an element. |
|
End of a TAILQ.
|
|
Value: Entry in structure.
|
|
First element of a TAILQ.
|
|
Value: Head type definition.
|
|
Value: do { \ (head)->tqh_first = NULL; \ (head)->tqh_last = &(head)->tqh_first; \ } while (0)
|
|
Value: do { \ (elm)->field.tqe_next = 0; \ (elm)->field.tqe_prev = 0; \ } while (0)
|
|
Value: do { \ if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL)\ (elm)->field.tqe_next->field.tqe_prev = \ &(elm)->field.tqe_next; \ else \ (head)->tqh_last = &(elm)->field.tqe_next; \ (listelm)->field.tqe_next = (elm); \ (elm)->field.tqe_prev = &(listelm)->field.tqe_next; \ } while (0)
|
|
Value: do { \ (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \ (elm)->field.tqe_next = (listelm); \ *(listelm)->field.tqe_prev = (elm); \ (listelm)->field.tqe_prev = &(elm)->field.tqe_next; \ } while (0)
|
|
Value: do { \ if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \ (head)->tqh_first->field.tqe_prev = \ &(elm)->field.tqe_next; \ else \ (head)->tqh_last = &(elm)->field.tqe_next; \ (head)->tqh_first = (elm); \ (elm)->field.tqe_prev = &(head)->tqh_first; \ } while (0)
|
|
Value: do { \ (elm)->field.tqe_next = NULL; \ (elm)->field.tqe_prev = (head)->tqh_last; \ *(head)->tqh_last = (elm); \ (head)->tqh_last = &(elm)->field.tqe_next; \ } while (0)
|
|
Last element of a TAILQ.
|
|
Next element of a TAILQ.
|
|
Previous element of a TAILQ.
|
|
Value: do { \ if (((elm)->field.tqe_next) != NULL) \ (elm)->field.tqe_next->field.tqe_prev = \ (elm)->field.tqe_prev; \ else \ (head)->tqh_last = (elm)->field.tqe_prev; \ *(elm)->field.tqe_prev = (elm)->field.tqe_next; \ } while (0)
|