/*-------------------------------------------------------------------*/ /* stackao.h (A Stack Abstract Object Interface) */ /*-------------------------------------------------------------------*/ #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(double dItem); /* Push dItem onto the Stack. It is a checked runtime error for the Stack to be uninitialized. */ double Stack_pop(void); /* Pop the Stack, and return the popped item. It is a checked runtime error for the Stack to be uninitialized or 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. */ #endif