/*
* ==============================================================
* File name: doubly_circular_insert_head.c
* Author: 3360652783@qq.com
* Date created: 2026-07-24
* Description: Insert a new node at the head of a doubly circular linked list (with head node).
* Copyright notice: All right Reserved
* ==============================================================
*/
//构造在双向链表头部插入新结点的函数
bool DouLListFirNode_Insert(*L,*new){
if( L->next == NULL ){ //如果链表为空则直接插入
L->next = new;
return true;
}
new->next = L->next; //链表不为空则插入成为首结点
L->next->prev = new;
L->next = new;
return true;
}