blob: faeadd2c64da8e5a14d0145280711e4155df005d (
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 _SEATD_LIST_H
#define _SEATD_LIST_H
#include <stddef.h>
struct list {
size_t capacity;
size_t length;
void **items;
};
void list_init(struct list *);
void list_free(struct list *list);
void list_add(struct list *list, void *item);
void list_insert(struct list *list, size_t index, void *item);
void list_del(struct list *list, size_t index);
void list_concat(struct list *list, struct list *source);
void list_truncate(struct list *list);
void *list_pop_front(struct list *list);
void *list_pop_back(struct list *list);
size_t list_find(struct list *list, const void *item);
#endif
|