/*------------------------------------------------------------------*/ /* stackao.h: A Stack Abstract Object */ /*------------------------------------------------------------------*/ #ifndef STACKAO_INCLUDED #define STACKAO_INCLUDED void Stack_init(void); /* Initialize the Stack. It is a checked runtime error for the Stack to be initialized. */ void Stack_free(void); /* Free the resources consumed by the Stack. It is a checked runtime error for the Stack to be uninitialized. */ void Stack_push(int iItem); /* Push iItem onto the Stack. It is a checked runtime error for the Stack to uninitialized or to be full. */ int Stack_pop(void); /* Pop the Stack, and return the popped item. It is a checked runtime error for the Stack to be uninitialized or to be empty. */ int Stack_isEmpty(void); /* Return 1 (TRUE) iff the Stack is empty. It is a checked runtime error for the Stack to be uninitialized. */ int Stack_isFull(void); /* Return 1 (TRUE) iff the Stack is full. It is a checked runtime error for the Stack to be uninitialized. */ #endif