Lines Matching refs:a_field
12 #define qr_new(a_qr, a_field) do { \ argument
13 (a_qr)->a_field.qre_next = (a_qr); \
14 (a_qr)->a_field.qre_prev = (a_qr); \
17 #define qr_next(a_qr, a_field) ((a_qr)->a_field.qre_next) argument
19 #define qr_prev(a_qr, a_field) ((a_qr)->a_field.qre_prev) argument
21 #define qr_before_insert(a_qrelm, a_qr, a_field) do { \ argument
22 (a_qr)->a_field.qre_prev = (a_qrelm)->a_field.qre_prev; \
23 (a_qr)->a_field.qre_next = (a_qrelm); \
24 (a_qr)->a_field.qre_prev->a_field.qre_next = (a_qr); \
25 (a_qrelm)->a_field.qre_prev = (a_qr); \
28 #define qr_after_insert(a_qrelm, a_qr, a_field) do { \ argument
29 (a_qr)->a_field.qre_next = (a_qrelm)->a_field.qre_next; \
30 (a_qr)->a_field.qre_prev = (a_qrelm); \
31 (a_qr)->a_field.qre_next->a_field.qre_prev = (a_qr); \
32 (a_qrelm)->a_field.qre_next = (a_qr); \
35 #define qr_meld(a_qr_a, a_qr_b, a_type, a_field) do { \ argument
37 (a_qr_a)->a_field.qre_prev->a_field.qre_next = (a_qr_b); \
38 (a_qr_b)->a_field.qre_prev->a_field.qre_next = (a_qr_a); \
39 t = (a_qr_a)->a_field.qre_prev; \
40 (a_qr_a)->a_field.qre_prev = (a_qr_b)->a_field.qre_prev; \
41 (a_qr_b)->a_field.qre_prev = t; \
48 #define qr_split(a_qr_a, a_qr_b, a_type, a_field) \ argument
49 qr_meld((a_qr_a), (a_qr_b), a_type, a_field)
51 #define qr_remove(a_qr, a_field) do { \ argument
52 (a_qr)->a_field.qre_prev->a_field.qre_next \
53 = (a_qr)->a_field.qre_next; \
54 (a_qr)->a_field.qre_next->a_field.qre_prev \
55 = (a_qr)->a_field.qre_prev; \
56 (a_qr)->a_field.qre_next = (a_qr); \
57 (a_qr)->a_field.qre_prev = (a_qr); \
60 #define qr_foreach(var, a_qr, a_field) \ argument
63 (var) = (((var)->a_field.qre_next != (a_qr)) \
64 ? (var)->a_field.qre_next : NULL))
66 #define qr_reverse_foreach(var, a_qr, a_field) \ argument
67 for ((var) = ((a_qr) != NULL) ? qr_prev(a_qr, a_field) : NULL; \
70 ? (var)->a_field.qre_prev : NULL))