|
10 | 10 | /* add node to queue */
|
11 | 11 | #define vq_enq(pHead) list_ins_head(pHead)
|
12 | 12 |
|
| 13 | +/* push node onto stack - with data */ |
| 14 | +#define vq_enq_data(pHead, pData) list_ins_head_data(pHead, pData) |
| 15 | + |
13 | 16 | /* remove node from queue */
|
14 | 17 | #define vq_deq(pHead) list_rm_node(pHead, list_tail(pHead))
|
15 | 18 |
|
|
31 | 34 | /* print out contents of queue to stdout */
|
32 | 35 | #define vq_print(pHead) list_print(pHead)
|
33 | 36 |
|
| 37 | +/* reverse contents of list */ |
| 38 | +#define vq_reverse(pHead) list_reverse(pHead) |
| 39 | + |
34 | 40 | /* get address of node at num - first node is 1 */
|
35 | 41 | #define vq_get_num(pHead, count) list_get_num(pHead, count)
|
36 | 42 |
|
| 43 | +/* append high list to last node of low list - does not modify pHi list */ |
| 44 | +#define vq_append(pLo, pHi) list_append(pLo, pHi) |
| 45 | + |
37 | 46 | /* reverse current nodes - modify pointer to next in each */
|
38 | 47 | #define vq_node_swap(pPrev, pCurr) list_node_swap(pPrev, pCurr)
|
39 | 48 |
|
40 |
| -/* reverse contents of list */ |
41 |
| -#define vq_reverse(pHead) list_reverse(pHead) |
| 49 | +/* return an array of pointers to data payload in list - does not modify list */ |
| 50 | +#define vq_data_array(pHead, pArr, len) list_data_array(pHead, pArr, len) |
| 51 | + |
| 52 | +/* return an array of pointers to nodes in list - does not modify list */ |
| 53 | +#define vq_node_array(pHead, pArr, len) list_node_array(pHead, pArr, len) |
42 | 54 |
|
43 | 55 | #endif /* LIB_VQUEUE_H_ */
|
0 commit comments