⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dll_ins2.c

📁 与C语言四书五经之《C和指针》的配套的书上源代码。
💻 C
字号:
	/*
	** Add the new node to the list.
	*/
	if( next != NULL ){
		/*
		** Case 1 or 2: not at end of the list 
		*/
		newnode->fwd = next;
		if( this != rootp ){	   /* Case 1: not at front */
			this->fwd = newnode;
			newnode->bwd = this;
		}
		else {			   /* Case 2: at front */
			rootp->fwd = newnode;
			newnode->bwd = NULL;
		}
		next->bwd = newnode;
	}
	else {
		/*
		** Case 3 or 4: at end of the list
		*/
		newnode->fwd = NULL;
		if( this != rootp ){	   /* Case 3: not at front */
			this->fwd = newnode;
			newnode->bwd = this;
		}
		else {			   /* Case 4: at front */
			rootp->fwd = newnode;
			newnode->bwd = NULL;
		}
		rootp->bwd = newnode;
	}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -