/************************************************************ * * stack.h * * Include file for the simple stack module. This example * illustrates how modules are implemented. * ***********************************************************/ #ifndef STACK_H #define STACK_H /* * The Stack type is used as a handle to a stack object. * User programs don't know the stack data structure, but * only a pointer is passed, so they don't need to know. */ typedef struct stack_struct* Stack; /* * Declarations of the functions in the stack module. */ Stack stack_create( int size ); Stack stack_destroy( Stack ); void stack_push( Stack, int item ); int stack_pop( Stack ); int stack_peek( Stack ); int stack_full( Stack ); int stack_empty( Stack ); #endif