blob: 5a157865824504de3eebc8a230e29eecee029078 (
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
|
#ifndef LIST_H
#define LIST_H
#include "main.h"
#define LIST_ALLOC_LIMIT 16
typedef struct list_str
{
void **list;
int count;
int alloc;
} list_t;
extern list_t* newList();
extern list_t* cloneList(list_t *p);
extern list_t* cloneListItem(list_t *p, void *f);
extern void addList(list_t *p, void *item);
extern void insList(list_t *p, int n, void *item);
extern void *getList(list_t *p,int n);
extern int searchListItem(list_t *p, void *n);
extern void delList(list_t *p,int n);
extern void delListItem(list_t *p,int n,void *f);
extern void listDoEmpty(list_t *p);
extern void destroyList(list_t *p);
extern void destroyListItem(list_t *p,void *f);
#endif
|