#ifndef __STACK_H__
#define __STACK_H__

#include <stdbool.h>
#include <stddef.h>

struct string_stack *
initialize (void);
/* produces value allocated from heap; requires free after use */

size_t
size (const struct string_stack * stack);

bool
isEmpty (const struct string_stack * stack);

bool
isFull (const struct string_stack * stack);

bool
push (struct string_stack * stack, char * item);
/* post-conditions:  item string is added to stack and returns true
                     or else stack is unmodified and returns false 
                     (i.e., when stack is full). */

char *
pop (struct string_stack * stack);
/* pre-condition: stack is not empty
   post-condition: top element is removed from stack */

char *
top (const struct string_stack * stack);
/* pre-condition: stack is not empty
   post-condition: stack is unmodified
   produces: reference to item at top of stack */

void
print (const struct string_stack * stack);

char *
get (const struct string_stack * stack, int index);
/* assume indexing starts at 1 (top of heap) */

#endif
