1.seqn[tail] = data;
Tail = (tail+1)%SEQLEN;
2.data = seqn[head];
Head = (head+1)%SEQLEN;
3.tail == head;
4.tail+1 == head;
5.while(head!=tail)
{head=(head+1)%SEQLEN;}
6.(tail-head+SEQLEN)%SEQLEN;
7.SEQLEN-1;
1.new=(struct list_head*)malloc(sizeof(struct list_head*));
if(new==NULL)
{
printf("失败\n");
return;
}
new->next=prev->next;
prev->next=new;
return;
2.struct list_head* p=prev->next;
prev->next=p->next;
p->next->prev=prev;
free(temp);
temp=NULL;
return;
3.temp=(struct list_head*)malloc(sizeof(struct list_head*));
if(temp==NULL)
{
printf("失败\n");
return;
}
struct list_head* p=head;
while(p->next!=NULL)
{
p=p->next;
}
Temp->next=NULL;
p->next=temp;
temp->prev=p;
return;
4. entry->next->prev=entry->prev;
entry->prev->next=entry->next;
free(entry);
entry=NULL;
return;
5. if(head->next==NULL)
{
printf("链表为空\n");
}
return;