Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
BitchX
GitHub Repository: BitchX/BitchX1.3
Path: blob/master/dll/possum/llist.h
1069 views
1
#ifndef LLIST_H
2
#define LLIST_H 1
3
4
struct lnode_struct {
5
void *object;
6
struct lnode_struct *prev, *next;
7
};
8
9
struct llist_struct {
10
struct lnode_struct *first, *last, *current;
11
size_t length, size;
12
};
13
14
typedef struct lnode_struct lnode;
15
typedef struct llist_struct llist;
16
17
llist *lmake(size_t size);
18
int ldelete(llist *l);
19
int lpush(llist *l, void *object);
20
void *lindex(llist *l, size_t x);
21
22
23
#endif
24
25
26