| 138 | piterator pqueue_iterator(pqueue_s *pq) { return pq->items; } |
| 139 | |
| 140 | pitem *pqueue_next(piterator *item) { |
| 141 | pitem *ret; |
| 142 | |
| 143 | if (item == NULL || *item == NULL) { |
| 144 | return NULL; |
| 145 | } |
| 146 | |
| 147 | ret = *item; |
| 148 | *item = (*item)->next; |
| 149 | |
| 150 | return ret; |
| 151 | } |
| 152 | |
| 153 | pitem *pqueue_insert(pqueue_s *pq, pitem *item) { |
| 154 | pitem *curr, *next; |
no outgoing calls