/* * queue.h */ #ifndef QUEUE_H #define QUEUE_H #include "point.h" typedef COORD queueElem[3]; typedef struct queueNode { queueElem e; struct queueNode* next; } QNODE; typedef QNODE* QUEUE; //create a head , point it to NULL and return a pointer to the head of the list QUEUE Q_init(); // insert element e at the head of the list by copying its contents into QNODE void Q_insert_elem_head(QUEUE h, queueElem e); // insert QNODE at head of the list void Q_insert_qnode_head(QUEUE h, QNODE* n); // remove the first element in the queue QNODE* Q_remove_first(QUEUE h); // remove the first element and free it from memory short Q_delete_first(QUEUE h); void Q_free_queue(QUEUE h); //returns first element after head QNODE* Q_first(QUEUE h); //returns p->next QNODE* Q_next(QUEUE h, QNODE* p); //returns 1 if p is the last element in the queue else 0 short Q_isEnd(QUEUE h, QNODE* p); #endif // QUEUE_H