blob: 7f9cbeaa1d24b841271507e21f5f2f676347f97d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#ifndef INDEX_H
# define INDEX_H
# include "main.h"
# include "list.h"
typedef struct index_item_struct {
int key;
void *data;
} index_item_t;
extern list_t *newIndex();
extern void addToIndex(list_t * list, int key, void *data);
extern void *getFromIndex(list_t * list, int key);
extern void delFromIndex(list_t * list, int key);
extern void delFromIndexWithObject(list_t * list, int key, void *f);
extern void actionIndexWithObject(list_t * list, void *f);
extern void destroyIndex(list_t * list);
extern void destroyIndexWithObject(list_t * list, void *f);
#endif
|