ZE-Standard-Libraries/include/list/list_simple.h

80 lines
3.2 KiB
C
Raw Normal View History

2018-08-23 16:57:38 +00:00
#ifndef list_simple_h
#define list_simple_h
#include <list/list_type.h>
/************************************************
*: ,
* 使.
************************************************/
/*
*, 使
*: ,NULL.*/
extern s_Node *s_nodeWithInt(int);
/*
*, 使
*: ,NULL.*/
extern s_Node *s_nodeWithUInt(unsigned int);
/*
*, 使
*: ,NULL.*/
extern s_Node *s_nodeWithDouble(double);
/*
*, 使
*: ,NULL.*/
extern s_Node *s_nodeWithString(const char *);
/*
*, 使
*: ,NULL.*/
extern s_Node *s_nodeWithPointer(const void *);
/*
*,List结构中.
*.,便.
*: ,NULL.*/
extern s_Node *s_initNode(void);
/*在单项链表的头部插入一个节点
*: 0,-1.*/
extern int s_insertInHead(List *p_list, s_Node *s_p_node);
/*
*
*: 0,-1.*/
extern int s_insertInTail(List *p_list, s_Node *s_p_node);
/*
*
*: 0, -1.*/
extern int s_releaseNode(s_Node *s_p_node);
/*
*
*: 0, -1.*/
extern int s_releaseList(List *p_list);
/*
*
*: func是一个函数指针,,
* ,.
* 0,-1.
*: 0, -1.*/
extern int s_releaseListForCustom(List *p_list, int (*func)(void *));
/*
*
*: func是一个函数指针,,
* ,.
* 0,-1.
*: 0, -1.*/
extern int s_releaseNodeForCustom(s_Node *s_p_node, int (*func)(void *));
#endif /* list_simple_h */