#include <stdio.h>
#include <stdlib.h>
#include "stack.h"

int
main (void)
{
  /* Allocate stack */
  struct string_stack * stack = malloc (stackByteSize());
  
  /* Read stack from a binary file */
  FILE * fp = fopen ("stack.dat","rb");
  
  fread (stack, stackByteSize(), 1, fp);
  fclose (fp);

  while (!isEmpty (stack) )
    printf ("%s\n", pop (stack));

  free (stack);
}
