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

📄 single_list.h

📁 This is a safe double linked list data structure in order to store data on void* pointer for data se
💻 H
字号:
/**Author jmanous..*//**A Little nice list with n complexity.Hope not so may SIGSEGV*/enum {	ASCII,	SOUND,	MULTIMEDIA,	NOTYPE};typedef struct sNode {	int id;	int type;	struct sNode* next;}Node_sl;/*Call this to get a new Head*/Node_sl *CreateNew(void);/*Insert a node with id and type.Call this with a	head node.Resulting list will be ordered by id	return 1 on succes , 0 on failure*/int Insert_sl (int id,int type,Node_sl* head);/*Delete elem with id */int Delete_sl(int id , Node_sl* head);/*Because list is ordered, this will return o node itself	if exists or the previous node where it should be*/Node_sl *Find_sl(int id , Node_sl* head);/*Print list from head Node..(Or anything else xD);*/void print_sl( Node_sl* head);

⌨️ 快捷键说明

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