-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdlist.h
More file actions
49 lines (35 loc) · 732 Bytes
/
dlist.h
File metadata and controls
49 lines (35 loc) · 732 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
*Copyright@2009 of 周顺利.
*All right reserved.
*
*文件名称 : dlist.h
*功能描述: 双向链表的接口定义文件
*作者: 周顺利
*日期: 2009-8-4
*
*修改记录:
*修改人 修改日期 修改描述
*
*/
#ifndef DLIST_H
#define DLIST_H
#ifdef __cplusplus
extern "C" {
#endif
#include "stdio.h"
#include "stdlib.h"
#include "Locker.h"
struct _node;
typedef struct _node node;
typedef node* dlist;
typedef int (*equal)(void* src, void* dest);
typedef int (*func_ptr)(void* data);
int init(dlist* list,Locker* locker);
int add(dlist list, void* data);
int delNode(dlist list, void* data,equal eq);
void destroy(dlist list);
void foreach(dlist list,func_ptr visit,void* ctx);
#ifdef __cplusplus
}
#endif
#endif