#define OVERFLOW -1
#define ERROR -2
#define OK 1
#define NULL 0
#define STACK_INT_SIZE 100
#define STACKINCREMENT 10
#include <stdio.h>
typedef struct{
char *base;
char *top;
int stacksize;
}SqStack;
#define OK 1
#define NULL 0
#define STACK_INT_SIZE 100
#define STACKINCREMENT 10
#include <stdio.h>
typedef struct{
char *base;
char *top;
int stacksize;
}SqStack;
int CreatStack(SqStack *S)
{
(*S).base=(char *)malloc(STACK_INT_SIZE*sizeof(char));
if(!(*S).base) return ERROR;
(*S).top=(*S).base;
(*S).stacksize=STACK_INT_SIZE;
return OK;
}
{
}
int StackLength(SqStack S)
{SqStack p;
int length=0;
p=S;
while(p.base!&
{SqStack p;