/*---------------------------------------------------------- * HTBLA-Leonding / Class: * --------------------------------------------------------- * Exercise Number: S03 * Title: Queue implementation * Author: */;/* * ---------------------------------------------------------- * Description: * Implementation of a queue based on an advanced singly linked list. * ---------------------------------------------------------- */ /* Implementation notes: 1) The 'QueueData' struct SHALL encapsulate the underlying list to decouple queue and queue interfaces. No further members are required. 2) Queue allocation: Use functions `mem_alloc(…)` and `mem_free(…)` declared in `allocator.h`. DO NOT use `malloc(…)` and `free(…)` directly as unit tests will fail. 3) Avoid code duplication wherever (reasonably) possible. The implemenation of each function mostly delegates to the corresponding queue function (one-liners). Implement the combined functionality of 'dequeue' and 'peek' as a single private function which is used by 'dequeue' and 'peek'. */ /* includes */ /** The implementation of queue data */ /* ===================================================================== */ /* private queue functions */ /* ===================================================================== */