Lines Matching defs:items
46 struct prioq_item *items;
64 free(q->items);
91 assert(!q->items[j].idx || *(q->items[j].idx) == j);
92 assert(!q->items[k].idx || *(q->items[k].idx) == k);
94 saved_data = q->items[j].data;
95 saved_idx = q->items[j].idx;
96 q->items[j].data = q->items[k].data;
97 q->items[j].idx = q->items[k].idx;
98 q->items[k].data = saved_data;
99 q->items[k].idx = saved_idx;
101 if (q->items[j].idx)
102 *q->items[j].idx = j;
104 if (q->items[k].idx)
105 *q->items[k].idx = k;
116 if (q->compare_func(q->items[k].data, q->items[idx].data) <= 0)
138 if (q->compare_func(q->items[j].data, q->items[idx].data) < 0)
147 q->compare_func(q->items[k].data, q->items[s].data) < 0)
153 /* s now points to the smallest of the three items */
177 j = realloc(q->items, sizeof(struct prioq_item) * n);
181 q->items = j;
186 i = q->items + k;
204 l = q->items + q->n_items - 1;
215 k = i - q->items;
238 i = q->items + *idx;
244 for (i = q->items; i < q->items + q->n_items; i++)
275 k = i - q->items;
289 return q->items[0].data;
301 data = q->items[0].data;
302 remove_item(q, q->items);