// *****************************************************************************
// File: stack.h
// Definition of the long_stack.
// *****************************************************************************

#ifndef __STACK
#define __STACK

#include <stdio.h>
#include "typedefs.h"

class long_stack {
private:
   struct s_node {
      long info;
      s_node *prev;
   };

   s_node *top;
   int stack_length;

public:
   long_stack() { top = NULL; stack_length = 0; }

   void clear();
   void push(long item);
   long pop();

   int length() { return stack_length; }
   boolean empty() { return (stack_length == 0) ? true : false; }

   ~long_stack() { clear(); }
};

#endif
