CrntNod->Next->Previous = InsertNode;
}
CrntNode->Next = InsertNode;
}
:
InsertNode CrntNode( )
CrntNode->Next
:
CrntNode InsertNode
:
StartNode NewMiddleNode FollowingNode
C :
void insert_link
(
NODE StartNode,
NODE NewMiddleNode
)
{
NODE * FollowingNode;
/ insert "NewMiddleNode" between "StartNode" and "FollowingNode /
FollowingNode = StartNode->Next;
NewMiddleNode->Next = FollowingNode;
NewMiddleNode->Previous = StartNode;
if ( FollowingNode != NULL )
{
FollowingNode->Previous = NewMiddleNode;
}
StartNode->Next = NewMiddleNode;
}
CrntNote->Next->Previous
P.q.r.s.^.data p->q->r->S.data C |
---|