Newer
Older
static struct node
{ int key; struct node *next; };
static struct node *head, *z, *t;
{
head = (struct node *) malloc(sizeof *head);
z = (struct node *) malloc(sizeof *z);
head->next = z; head->key=0;
z->next = z;
z->key = 0;
}
int *p;
{
int v;
v = *p;
t = (struct node *) malloc(sizeof *t);
t->key = v; t->next = head->next;
head->next =t;
}
int *x;
{
t = head->next; head->next = t->next;
*x = t->key;
free(t);
}