struct QUEUE {
  int *base;
  int pos;
  int items;
  int size;
};

int queue_get_item (struct QUEUE *q, int pos);
int queue_search_for_item (struct QUEUE *q, int item);
void queue_prepend (struct QUEUE *q, struct DIR_INFO *d, int item);
void queue_append (struct QUEUE *q, struct DIR_INFO *d, int item);
void queue_append_dir (struct QUEUE *q, struct DIR_INFO *d, int item);
void queue_skip (struct QUEUE *q, struct DIR_INFO *d);
void queue_delete (struct QUEUE *q, struct DIR_INFO *d, int pos);
void queue_delete_dir (struct QUEUE *q, struct DIR_INFO *d, int pos);
void queue_clear (struct QUEUE *q, struct DIR_INFO *d);
void queue_shuffle (struct QUEUE *q, struct DIR_INFO *d);
void queue_init (struct QUEUE *q, struct DIR_INFO *d);
