// ID: arlist.h / Header file for "arlist" handling functions // RCS: $Revision$ $Date$ // AUTHOR: student name // INSTALLATION: MIDDLE TENNESSEE STATE UNIVERSITY // REMARKS: This version of "arlist" uses a dummy header node #ifndef arlist_h /* To prevent multiple inclusion problems */ #define arlist_h typedef int tItemType; // Can be any storage type const int NONE = -1; // Sentinel value indicating "no item" struct tNode { tItemType item; // Data to be stored ("payload") int next; // Where following item is stored }; void tsil(tNode list[]); // INOUT void traverse(const tNode list[]); // IN bool insert(tItemType newitem, tNode list[], int& n, int& avail); // IN INOUT INOUT INOUT bool remove(tItemType target, tNode list[], int& n, int& avail); // IN INOUT INOUT INOUT void init(tNode list[], int& n, int& avail, int capacity); // OUT OUT OUT IN int PopAvail(tNode list[], int& avail); // INOUT INOUT void PushAvail(tNode list[], int pos, int& avail); // INOUT IN INOUT #endif