dunno if it's going to be of any use...

This commit is contained in:
Pierangelo Masarati 2007-01-10 00:51:20 +00:00
parent 6abf92338e
commit c09a12fef7

View file

@ -111,6 +111,7 @@
* _HEAD + + + + + * _HEAD + + + + +
* _ENTRY + + + + + * _ENTRY + + + + +
* _INIT + + + + + * _INIT + + + + +
* _ENTRY_INIT + + + + +
* _EMPTY + + + + + * _EMPTY + + + + +
* _FIRST + + + + + * _FIRST + + + + +
* _NEXT + + + + + * _NEXT + + + + +
@ -160,6 +161,10 @@ struct { \
(head)->slh_first = NULL; \ (head)->slh_first = NULL; \
} }
#define LDAP_SLIST_ENTRY_INIT(var, field) { \
(var)->field.sle_next = NULL; \
}
#define LDAP_SLIST_INSERT_AFTER(slistelm, elm, field) do { \ #define LDAP_SLIST_INSERT_AFTER(slistelm, elm, field) do { \
(elm)->field.sle_next = (slistelm)->field.sle_next; \ (elm)->field.sle_next = (slistelm)->field.sle_next; \
(slistelm)->field.sle_next = (elm); \ (slistelm)->field.sle_next = (elm); \
@ -219,6 +224,10 @@ struct { \
(head)->stqh_last = &(head)->stqh_first; \ (head)->stqh_last = &(head)->stqh_first; \
} while (0) } while (0)
#define LDAP_STAILQ_ENTRY_INIT(var, field) { \
(entry)->field.stqe_next = NULL; \
}
#define LDAP_STAILQ_FIRST(head) ((head)->stqh_first) #define LDAP_STAILQ_FIRST(head) ((head)->stqh_first)
#define LDAP_STAILQ_LAST(head, type, field) \ #define LDAP_STAILQ_LAST(head, type, field) \
@ -310,6 +319,11 @@ struct { \
(head)->lh_first = NULL; \ (head)->lh_first = NULL; \
} while (0) } while (0)
#define LDAP_LIST_ENTRY_INIT(var, field) do { \
(var)->field.le_next = NULL; \
(var)->field.le_prev = NULL; \
} while (0)
#define LDAP_LIST_INSERT_AFTER(listelm, elm, field) do { \ #define LDAP_LIST_INSERT_AFTER(listelm, elm, field) do { \
if (((elm)->field.le_next = (listelm)->field.le_next) != NULL) \ if (((elm)->field.le_next = (listelm)->field.le_next) != NULL) \
(listelm)->field.le_next->field.le_prev = \ (listelm)->field.le_next->field.le_prev = \
@ -396,6 +410,11 @@ struct { \
(head)->tqh_last = &(head)->tqh_first; \ (head)->tqh_last = &(head)->tqh_first; \
} while (0) } while (0)
#define LDAP_TAILQ_ENTRY_INIT(var, field) do { \
(var)->field.tqe_next = NULL; \
(var)->field.tqe_prev = NULL; \
} while (0)
#define LDAP_TAILQ_INSERT_HEAD(head, elm, field) do { \ #define LDAP_TAILQ_INSERT_HEAD(head, elm, field) do { \
if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \ if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \
(head)->tqh_first->field.tqe_prev = \ (head)->tqh_first->field.tqe_prev = \
@ -476,6 +495,11 @@ struct { \
(head)->cqh_last = (void *)(head); \ (head)->cqh_last = (void *)(head); \
} while (0) } while (0)
#define LDAP_CIRCLEQ_ENTRY_INIT(var, field) do { \
(var)->field.cqe_next = NULL; \
(var)->field.cqe_prev = NULL; \
} while (0)
#define LDAP_CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) do { \ #define LDAP_CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) do { \
(elm)->field.cqe_next = (listelm)->field.cqe_next; \ (elm)->field.cqe_next = (listelm)->field.cqe_next; \
(elm)->field.cqe_prev = (listelm); \ (elm)->field.cqe_prev = (listelm); \