blob: 04e14d33eb0535b2a58a5eef52476f6c0b7b19d3 (
plain)
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
|
#ifndef __KLIST_H__
#define __KLIST_H__
#include "../dlib/dlib.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
typedef struct {
int Key; /* primary key */
void *Data; /* data reference */
} KlistNode_t;
typedef struct {
Dlist *List;
int Clean; /* check flag */
int Counter; /* counter (for making keys) */
} Klist_t;
/*
* Function prototypes
*/
void* a_Klist_get_data(Klist_t *Klist, int Key);
int a_Klist_insert(Klist_t **Klist, void *Data);
void a_Klist_remove(Klist_t *Klist, int Key);
int a_Klist_length(Klist_t *Klist);
void a_Klist_free(Klist_t **Klist);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __KLIST_H__ */
|