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. struct list_head* 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;