#include<iostream>
#include<stdio.h>
#include<stdlib.h>
using namespace std;
typedef struct DNode{
int data;
struct DNode *prior,*next;
}DNode,*DLinkList;
bool InitDList(DLinkList &L){
L = (DNode *)malloc(sizeof(DNode));
if(L == NULL){
return false;
}
L->prior = NULL;
L->next = NULL;
return true;
}
bool Empty(DLinkList L){
if(L->next == NULL){
return false;
} else{
return true;
}
}
bool InsertNextDNode(DNode *p,DNode *s){
if(p == NULL || s == NULL){
return false;
}
s->next = p->next;
if(p->next!=NULL){
p->next->prior = s;
}
p->next = s;
s->prior = p;
return true;
}
bool DeleteNextDNode(DNode *p){
if(p == NULL){
return false;
}
DNode *q = p->next;
if(q == NULL){
return false;
}
p->next = q->next;
if(q->next!=NULL){
q->next->prior = p;
}
free(p);
return true;
}
int main(){
DLinkList L;
InitDList(L);
}