/* File: cityStk.h
 * Desc: Interface for cityStk library
 * The cityStk library implements a stack (ie a last-in, first out list)
 * of pairs of cities (to, from).
 * Cristina Cifuentes
 * 3 August 1997
 */

#ifndef __citystk_h
#define __citystk_h

#include "bool.h"
#include "cities.h"

#define MAX_N_CITYPAIRS 100	/* depth of the stack */

typedef struct _stack {
	cityPair elem[MAX_N_CITYPAIRS];
	int nElems;
} stack;


/* FUNCTION PROTOTYPES */

void newStack (stack *s);
	/* initializes a new stack s */

void push (stack *s, cityPair c);
	/* pushes the cityPair c onto the stack s */

void pop (stack *s, cityPair *c);
	/* pops the last cityPair from the stack s, removes it from
	 * the stack, and places it in c */

bool isEmpty (stack s);
	/* returns whether the stack is empty or not */

#endif /* __cityStk_h */


