/* * declarations for an integer stack */ /* a type for integer stacks */ typedef struct { int *valueList; /* an array of values */ int top; /* top of stack, -1 if empty */ int max; /* capacity of this stack */ } intStack; /* a boolean type */ typedef enum {FALSE, TRUE} boolean; /* push a value on the stack */ boolean push(intStack *stack, int value); /* pop a value off the stack */ int pop(intStack *stack); /* examine the top value */ int peek(intStack *stack); /* initialize a stack to hold capacity ints */ boolean initialize(intStack *stack, int capacity); /* destroy a stack */ boolean destroy(intStack *stack); /* number of items */ int count(intStack* stack); /* is the stack empty? */ boolean empty(intStack *stack); /* is the stack full? */ boolean full(intStack *stack); /* print stack contents */ void printStack(intStack *stack);