/*栈子系统*/
#include <stdio.h>
#include <malloc.h>
#define MAXSIZE 100
typedef int DataType;
typedef stuct stacknode
{
DataType data;
struct stacknode *next;
}LinkStack;
LinkStack *InitStack()
{
LinkStack *S;
S=NULL;
return S;
}
int EmptyStack(LinkStack *S)
{
if(S==NULL)
return 1;
else
return 0;
}
LinkStack *Push(LinkStack *S,DataType x)
{
LinkStack *P;
p=(LinkStack *)malloc(sizeof(Linkstack));
p->data=x;
p->next=S;
S=p;
return S;
}