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

📄 devlist.c

📁 神龙卡开发原代码
💻 C
字号:
#include <stdio.h>#include <stdlib.h>#include "device.h"/* * linked list routines * * 1/28/98 g haerr * Copyright (c) 1999 Greg Haerr <greg@censoft.com> */void *GdItemAlloc(unsigned int size){	return (void *)calloc(size, 1);}/* insert at tail of list*/voidGdListAdd(PMWLISTHEAD pHead,PMWLIST pItem){	if( pHead->tail) {		pItem->prev = pHead->tail;		pHead->tail->next = pItem;	} else		pItem->prev = NULL;	pItem->next = NULL;	pHead->tail = pItem;	if( !pHead->head)		pHead->head = pItem;}/* insert at head of list*/voidGdListInsert(PMWLISTHEAD pHead,PMWLIST pItem){	if( pHead->head) {		pItem->next = pHead->head;		pHead->head->prev = pItem;	} else		pItem->next = NULL;	pItem->prev = NULL;	pHead->head = pItem;	if( !pHead->head)		pHead->head = pItem;}voidGdListRemove(PMWLISTHEAD pHead,PMWLIST pItem){	if( pItem->next)		pItem->next->prev = pItem->prev;	if( pItem->prev)		pItem->prev->next = pItem->next;	if( pHead->head == pItem)		pHead->head = pItem->next;	if( pHead->tail == pItem)		pHead->tail = pItem->prev;	pItem->next = pItem->prev = NULL;}

⌨️ 快捷键说明

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