#ifndef STACK_H
#define STACK_H

#include "list.h"

//
// The Stack data type is just a wrapper for List. It uses wrapper
// functions to provide the functionality of these particular abstract
// data types. The usage of these functions are very similar to the 
// usage of the List functions. Use the descriptions provided in the
// List header file (list.h) as a primary reference, but notes will
// be provided to discern differences between the two.
//


struct Stack
{
	List list;
};

typedef struct Stack Stack;

void Stack_Create(Stack*,size_t);
void Stack_Destroy(Stack*);
void Stack_Push(Stack*,Pointer); //Places a copy of the data pointed to by
                                 //data onto the stack.
                                 //Stack_Push(&stack,&data);

void Stack_Pop(Stack*);          //Removes the topmost element on the stack.
                                 //Stack_Pop(&stack);
size_t Stack_Length(Stack*);
Pointer Stack_Top(Stack*);       //Returns a pointer data pointed to by the 
                                 //topmost element on the stack.
                                 //int *x; ... x = Stack_Top(&stack);
#endif
